pixela 3.7.0 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac725c43e18b7f621a1790023c139c09bcf7408222af5b068a396a8625cc340f
4
- data.tar.gz: d0a9c3e477df3e16c5034c4c87ef9aaf0f3ae531d4c4e528b7110334b5170768
3
+ metadata.gz: ce704480ca4688958b5613aa766068d2a3f261ada9faa9255fac7c9546329e7f
4
+ data.tar.gz: b35301d17ccc85f0b6ef8da01c7fdceea0813c876e063eb793e066a9bbb6ff47
5
5
  SHA512:
6
- metadata.gz: 1d367c35a73858e82ebb9825a0b45175492949924967353e0136a9f4b4ae8e196910a979ca75af37abdcab7db28d9c8c4e5dbdf293b718f3ec06e57a3bf7bed0
7
- data.tar.gz: d452290cb442e541a9609c4caa5cb958d6c201c17e05cfa4303a66654bf534f25cd54af7ec28bff3094610e8ee1da83ea5102c438885acb636d36f6da1f5367d
6
+ metadata.gz: 3720512d2bb653b34f2c8e9c20e0f1818e89888f722fefef1b3812b9183e6386d3ec103b08eb2ce44f2d93213476e912dee0464c5552234e2f3d21ec269e48cc
7
+ data.tar.gz: 656ce9cc32c3bed79a6d5d83b963f958b1247653a4accc3bc11c019567559d0225571e6dab8ceb2252cd892a2ba587f6d69018e59d21f20fe7521a3c73871bdb
@@ -5,37 +5,10 @@ on:
5
5
 
6
6
  jobs:
7
7
  release:
8
- if: github.repository == 'sue445/pixela'
9
- runs-on: ubuntu-latest
10
-
11
- environment:
12
- name: rubygems.org
13
- url: https://rubygems.org/gems/pixela
14
-
8
+ uses: sue445/workflows/.github/workflows/release_gem.yml@main
9
+ with:
10
+ repo-name: sue445/pixela
11
+ gem-name: pixela
15
12
  permissions:
16
13
  contents: write
17
14
  id-token: write
18
-
19
- steps:
20
- - name: Harden Runner
21
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
22
- with:
23
- egress-policy: audit
24
-
25
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26
-
27
- - name: Set up Ruby
28
- uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
29
- with:
30
- bundler-cache: true
31
- ruby-version: ruby
32
-
33
- - name: Publish to RubyGems
34
- uses: rubygems/release-gem@1c162a739e8b4cb21a676e97b087e8268d8fc40b # v1.1.2
35
-
36
- - name: Create GitHub release
37
- run: |
38
- tag_name="$(git describe --tags --abbrev=0)"
39
- gh release create "${tag_name}" --verify-tag --generate-notes
40
- env:
41
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -36,9 +36,9 @@ jobs:
36
36
  - faraday_2
37
37
 
38
38
  steps:
39
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
39
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
40
40
 
41
- - uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
41
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
42
42
  with:
43
43
  ruby-version: ${{ matrix.ruby }}
44
44
  bundler-cache: true
@@ -59,7 +59,7 @@ jobs:
59
59
  continue-on-error: true
60
60
 
61
61
  - name: Slack Notification (not success)
62
- uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
62
+ uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
63
63
  if: "! success()"
64
64
  continue-on-error: true
65
65
  with:
@@ -71,9 +71,9 @@ jobs:
71
71
  runs-on: ubuntu-latest
72
72
 
73
73
  steps:
74
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
74
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
75
75
 
76
- - uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
76
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
77
77
  with:
78
78
  ruby-version: ruby
79
79
  bundler-cache: true
@@ -91,7 +91,7 @@ jobs:
91
91
  ls -ld doc/
92
92
 
93
93
  - name: Slack Notification (not success)
94
- uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
94
+ uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
95
95
  if: "! success()"
96
96
  continue-on-error: true
97
97
  with:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  ## Unreleased
2
- [full changelog](http://github.com/sue445/pixela/compare/v3.7.0...master)
2
+ [full changelog](http://github.com/sue445/pixela/compare/v3.8.1...master)
3
+
4
+ ## [v3.8.1](https://github.com/sue445/pixela/releases/tag/v3.8.1)
5
+ [full changelog](http://github.com/sue445/pixela/compare/v3.8.0...v3.8.1)
6
+
7
+ * Migrate release_gem workflow to sue445/workflows (Also testing the gem release)
8
+ * https://github.com/sue445/pixela/pull/166
9
+
10
+ ## [v3.8.0](https://github.com/sue445/pixela/releases/tag/v3.8.0)
11
+ [full changelog](http://github.com/sue445/pixela/compare/v3.7.0...v3.8.0)
12
+
13
+ * Add `Pixela::Client::GraphMethods#get_graph_analyze` and `Pixela::Graph#analyze`
14
+ * https://github.com/sue445/pixela/pull/157
15
+ * https://github.com/a-know/Pixela/releases/tag/v1.35.0
3
16
 
4
17
  ## [v3.7.0](https://github.com/sue445/pixela/releases/tag/v3.7.0)
5
18
  [full changelog](http://github.com/sue445/pixela/compare/v3.6.0...v3.7.0)
@@ -314,4 +314,22 @@ module Pixela::Client::GraphMethods
314
314
  connection.get("users/#{username}/graphs/#{graph_id}/today", params.compact).body
315
315
  end
316
316
  end
317
+
318
+ # The AI analyzes the Pixel posted to the graph specified by <graphID> and responds with the results in a string of up to approximately 1000 characters.
319
+ #
320
+ # @param graph_id [String]
321
+ #
322
+ # @return [Pixela::Response]
323
+ #
324
+ # @raise [Pixela::PixelaError] API is failed
325
+ #
326
+ # @see https://docs.pixe.la/entry/get-ai-analysis
327
+ #
328
+ # @example
329
+ # client.get_graph_analyze(graph_id: "test-graph")
330
+ def get_graph_analyze(graph_id:)
331
+ with_error_handling do
332
+ connection.get("users/#{username}/graphs/#{graph_id}/analyze").body
333
+ end
334
+ end
317
335
  end
data/lib/pixela/graph.rb CHANGED
@@ -317,5 +317,19 @@ module Pixela
317
317
  def subtract_specific(quantity:, date:)
318
318
  client.subtract_specific_pixel(graph_id: graph_id, date: date, quantity: quantity)
319
319
  end
320
+
321
+ # The AI analyzes the Pixel posted to the graph specified by <graphID> and responds with the results in a string of up to approximately 1000 characters.
322
+ #
323
+ # @return [Pixela::Response]
324
+ #
325
+ # @raise [Pixela::PixelaError] API is failed
326
+ #
327
+ # @see https://docs.pixe.la/entry/get-ai-analysis
328
+ #
329
+ # @example
330
+ # client.get_graph_analyze(graph_id: "test-graph")
331
+ def analyze
332
+ client.get_graph_analyze(graph_id: graph_id)
333
+ end
320
334
  end
321
335
  end
@@ -1,3 +1,3 @@
1
1
  module Pixela
2
- VERSION = "3.7.0"
2
+ VERSION = "3.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixela
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
311
311
  - !ruby/object:Gem::Version
312
312
  version: '0'
313
313
  requirements: []
314
- rubygems_version: 4.0.3
314
+ rubygems_version: 4.0.16
315
315
  specification_version: 4
316
316
  summary: Pixela API client for Ruby
317
317
  test_files: []