pixela 3.4.0 → 3.5.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 +4 -4
- data/.github/workflows/test.yml +1 -0
- data/CHANGELOG.md +9 -2
- data/README.md +1 -1
- data/lib/pixela/client/graph_methods.rb +24 -0
- data/lib/pixela/graph.rb +16 -0
- data/lib/pixela/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2294c4ab50d90e3081e699ad2c99b33b7a8e4c37e271fe061e45433910508080
|
4
|
+
data.tar.gz: 1421993d12f16a5243526cefa580a06a9c3415385297055af0223510c72bb095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d35da5fef54b3493635999a382ccb473af3e98e46dee0f014f3dfbcf99eeae4068e8d25a81523ccf525661e94139ab0755b9768ce11be84db8d921c9e9d2757e
|
7
|
+
data.tar.gz: 907b8a988c388f3a40656173441e9f3727cbb869c8723313d4bbcb00c44b149a7e18d5a0a6ffd26ff0a5d90d429e69a694b1fb45093a2b17c0af03bdbd5436b8
|
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
## Unreleased
|
2
|
-
[full changelog](http://github.com/sue445/pixela/compare/v3.
|
2
|
+
[full changelog](http://github.com/sue445/pixela/compare/v3.5.0...master)
|
3
3
|
|
4
|
-
## v3.
|
4
|
+
## [v3.5.0](https://github.com/sue445/pixela/releases/tag/v3.5.0)
|
5
|
+
[full changelog](http://github.com/sue445/pixela/compare/v3.4.0...v3.5.0)
|
6
|
+
|
7
|
+
* Add `Pixela::Client::GraphMethods#get_graph_today` and `Pixela::Graph#today`
|
8
|
+
* https://github.com/sue445/pixela/pull/117
|
9
|
+
* https://github.com/a-know/Pixela/releases/tag/v1.32.0
|
10
|
+
|
11
|
+
## [v3.4.0](https://github.com/sue445/pixela/releases/tag/v3.4.0)
|
5
12
|
[full changelog](http://github.com/sue445/pixela/compare/v3.3.0...v3.4.0)
|
6
13
|
|
7
14
|
* Add `appearance`, `less_than` and `greather_than` to `Pixela::Client::GraphMethods#graph_url` and `Pixela::Graph#url`
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
[](https://badge.fury.io/rb/pixela)
|
6
6
|
[](https://pixe.la/v1/users/sue445/graphs/pixela-gem-ci.html)
|
7
|
-
[](https://github.com/sue445/pixela/actions/workflows/test.yml)
|
8
8
|
[](https://codeclimate.com/github/sue445/pixela/maintainability)
|
9
9
|
[](https://coveralls.io/github/sue445/pixela)
|
10
10
|
|
@@ -282,4 +282,28 @@ module Pixela::Client::GraphMethods
|
|
282
282
|
connection.get("users/#{username}/graphs/#{graph_id}/latest").body
|
283
283
|
end
|
284
284
|
end
|
285
|
+
|
286
|
+
# This is an endpoint that responds with the Pixel of the day you requested this API.
|
287
|
+
#
|
288
|
+
# @param graph_id [String]
|
289
|
+
# @param return_empty [Boolean] Specifying `true` for this param will return an empty Pixel instead of `404 Not Found` if the Pixel is unregistered on the day of the request.
|
290
|
+
#
|
291
|
+
# @return [Pixela::Response]
|
292
|
+
#
|
293
|
+
# @raise [Pixela::PixelaError] API is failed
|
294
|
+
#
|
295
|
+
# @see https://docs.pixe.la/entry/get-today-pixel
|
296
|
+
#
|
297
|
+
# @example
|
298
|
+
# client.get_graph_today(graph_id: "test-graph", return_empty: true)
|
299
|
+
def get_graph_today(graph_id:, return_empty: false)
|
300
|
+
params = {}
|
301
|
+
if return_empty
|
302
|
+
params[:returnEmpty] = return_empty
|
303
|
+
end
|
304
|
+
|
305
|
+
with_error_handling do
|
306
|
+
connection.get("users/#{username}/graphs/#{graph_id}/today", params.compact).body
|
307
|
+
end
|
308
|
+
end
|
285
309
|
end
|
data/lib/pixela/graph.rb
CHANGED
@@ -261,5 +261,21 @@ module Pixela
|
|
261
261
|
def latest
|
262
262
|
client.get_graph_latest(graph_id: graph_id)
|
263
263
|
end
|
264
|
+
|
265
|
+
# This is an endpoint that responds with the Pixel of the day you requested this API.
|
266
|
+
#
|
267
|
+
# @param return_empty [Boolean] Specifying `true` for this param will return an empty Pixel instead of `404 Not Found` if the Pixel is unregistered on the day of the request.
|
268
|
+
#
|
269
|
+
# @return [Pixela::Response]
|
270
|
+
#
|
271
|
+
# @raise [Pixela::PixelaError] API is failed
|
272
|
+
#
|
273
|
+
# @see https://docs.pixe.la/entry/get-today-pixel
|
274
|
+
#
|
275
|
+
# @example
|
276
|
+
# client.graph("test-graph").today(return_empty: true)
|
277
|
+
def today(return_empty: false)
|
278
|
+
client.get_graph_today(graph_id: graph_id, return_empty: return_empty)
|
279
|
+
end
|
264
280
|
end
|
265
281
|
end
|
data/lib/pixela/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixela
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-02-25 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: faraday
|
@@ -267,7 +266,6 @@ metadata:
|
|
267
266
|
changelog_uri: https://github.com/sue445/pixela/blob/master/CHANGELOG.md
|
268
267
|
documentation_uri: https://sue445.github.io/pixela/
|
269
268
|
rubygems_mfa_required: 'true'
|
270
|
-
post_install_message:
|
271
269
|
rdoc_options: []
|
272
270
|
require_paths:
|
273
271
|
- lib
|
@@ -282,8 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
280
|
- !ruby/object:Gem::Version
|
283
281
|
version: '0'
|
284
282
|
requirements: []
|
285
|
-
rubygems_version: 3.
|
286
|
-
signing_key:
|
283
|
+
rubygems_version: 3.6.2
|
287
284
|
specification_version: 4
|
288
285
|
summary: Pixela API client for Ruby
|
289
286
|
test_files: []
|