pixela 3.7.0 → 3.8.0

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: 770ad35f9e91fc900f018bb36b0e2235bd08a9eaea9f5200d2ef68ef4700c302
4
+ data.tar.gz: b6b960288c77250ef66f911c993dafc97cf7d3bbe27bff76b7ec9713ad1d258c
5
5
  SHA512:
6
- metadata.gz: 1d367c35a73858e82ebb9825a0b45175492949924967353e0136a9f4b4ae8e196910a979ca75af37abdcab7db28d9c8c4e5dbdf293b718f3ec06e57a3bf7bed0
7
- data.tar.gz: d452290cb442e541a9609c4caa5cb958d6c201c17e05cfa4303a66654bf534f25cd54af7ec28bff3094610e8ee1da83ea5102c438885acb636d36f6da1f5367d
6
+ metadata.gz: 7ee2906c08ff6fad04fcc83f4b2de533a74172c56d521412cbbff4c0b5e0f6787bd45a20b3671bf032e51b40af1ff0e42be98eb3041c03ac6363b9257d93d09b
7
+ data.tar.gz: d7f82a4229ae458befa442ba89322e9765f0592890188de39f249fb8ea951fba894c9d72ca539b7da5dabd0f6486967a4b4855ca0306b70acabd058f77eaefa7
@@ -18,20 +18,20 @@ jobs:
18
18
 
19
19
  steps:
20
20
  - name: Harden Runner
21
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
21
+ uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
22
22
  with:
23
23
  egress-policy: audit
24
24
 
25
25
  - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26
26
 
27
27
  - name: Set up Ruby
28
- uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
28
+ uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
29
29
  with:
30
30
  bundler-cache: true
31
31
  ruby-version: ruby
32
32
 
33
33
  - name: Publish to RubyGems
34
- uses: rubygems/release-gem@1c162a739e8b4cb21a676e97b087e8268d8fc40b # v1.1.2
34
+ uses: rubygems/release-gem@6317d8d1f7e28c24d28f6eff169ea854948bd9f7 # v1.2.0
35
35
 
36
36
  - name: Create GitHub release
37
37
  run: |
@@ -38,7 +38,7 @@ jobs:
38
38
  steps:
39
39
  - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
40
40
 
41
- - uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
41
+ - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.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:
@@ -73,7 +73,7 @@ jobs:
73
73
  steps:
74
74
  - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
75
75
 
76
- - uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0
76
+ - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.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,12 @@
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.0...master)
3
+
4
+ ## [v3.8.0](https://github.com/sue445/pixela/releases/tag/v3.8.0)
5
+ [full changelog](http://github.com/sue445/pixela/compare/v3.7.0...v3.8.0)
6
+
7
+ * Add `Pixela::Client::GraphMethods#get_graph_analyze` and `Pixela::Graph#analyze`
8
+ * https://github.com/sue445/pixela/pull/157
9
+ * https://github.com/a-know/Pixela/releases/tag/v1.35.0
3
10
 
4
11
  ## [v3.7.0](https://github.com/sue445/pixela/releases/tag/v3.7.0)
5
12
  [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.0"
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.0
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.6
315
315
  specification_version: 4
316
316
  summary: Pixela API client for Ruby
317
317
  test_files: []