pixela 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -2
- data/lib/pixela/client/graph_methods.rb +18 -0
- data/lib/pixela/graph.rb +15 -1
- data/lib/pixela/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 729e3f74af8018ea0e332f4a349a0eb69591ddb08a7c89a0adea62f4727aca0c
|
4
|
+
data.tar.gz: 24e40fbcf152dfc2ec69a027bb9a3a8b0de17b090a567396a0c7c0ce165adee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0452b7cf21f9829b5777863749fe5e51be6b0f64b9fcc5c215dfe94ddf01f44c22b4637d68ecd99a9c1ea19d4b48f08eca809a09b30f725aea6e1a6c27465ecc
|
7
|
+
data.tar.gz: c808d02bfa6aaca74d599f09c41717b6f743ba3b180b7afc14d4c5c4d63034ce8b4442e524d8c1694b6a19038bc82aabb8dc8f6332490ad50306c0ce719eee2f
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
## Unreleased
|
2
|
-
[full changelog](http://github.com/sue445/pixela/compare/v1.
|
2
|
+
[full changelog](http://github.com/sue445/pixela/compare/v1.2.0...master)
|
3
|
+
|
4
|
+
## v1.2.0
|
5
|
+
[full changelog](http://github.com/sue445/pixela/compare/v1.1.0...v1.2.0)
|
6
|
+
|
7
|
+
* Add `Pixela::Client#get_graph_stats` and `Pixela::Graph#stats`
|
8
|
+
* https://github.com/sue445/pixela/pull/53
|
9
|
+
* https://github.com/a-know/Pixela/releases/tag/v1.10.0
|
3
10
|
|
4
11
|
## v1.1.0
|
5
|
-
[full changelog](http://github.com/sue445/pixela/compare/v1.0.1...v1.1.
|
12
|
+
[full changelog](http://github.com/sue445/pixela/compare/v1.0.1...v1.1.0)
|
6
13
|
|
7
14
|
* Add `Pixela::Client#get_pixel_dates` and `Pixela::Graph#pixel_dates`
|
8
15
|
* https://github.com/sue445/pixela/pull/49
|
@@ -155,4 +155,22 @@ module Pixela::Client::GraphMethods
|
|
155
155
|
|
156
156
|
res.pixels.map { |ymd| Date.parse(ymd) }
|
157
157
|
end
|
158
|
+
|
159
|
+
# Based on the registered information, get various statistics.
|
160
|
+
#
|
161
|
+
# @param graph_id [String]
|
162
|
+
#
|
163
|
+
# @return [Pixela::Response]
|
164
|
+
#
|
165
|
+
# @raise [Pixela::PixelaError] API is failed
|
166
|
+
#
|
167
|
+
# @see https://docs.pixe.la/#/get-graph-stats
|
168
|
+
#
|
169
|
+
# @example
|
170
|
+
# client.get_graph_stats(graph_id: "test-graph")
|
171
|
+
def get_graph_stats(graph_id:)
|
172
|
+
with_error_handling do
|
173
|
+
connection.get("users/#{username}/graphs/#{graph_id}/stats").body
|
174
|
+
end
|
175
|
+
end
|
158
176
|
end
|
data/lib/pixela/graph.rb
CHANGED
@@ -134,9 +134,23 @@ module Pixela
|
|
134
134
|
# @see https://docs.pixe.la/#/get-graph-pixels
|
135
135
|
#
|
136
136
|
# @example
|
137
|
-
# client.
|
137
|
+
# client.graph("test-graph").pixel_dates(from: Date.new(2018, 1, 1), to: Date.new(2018, 12, 31))
|
138
138
|
def pixel_dates(from: nil, to: nil)
|
139
139
|
client.get_pixel_dates(graph_id: graph_id, from: from, to: to)
|
140
140
|
end
|
141
|
+
|
142
|
+
# Based on the registered information, get various statistics.
|
143
|
+
#
|
144
|
+
# @return [Pixela::Response]
|
145
|
+
#
|
146
|
+
# @raise [Pixela::PixelaError] API is failed
|
147
|
+
#
|
148
|
+
# @see https://docs.pixe.la/#/get-graph-stats
|
149
|
+
#
|
150
|
+
# @example
|
151
|
+
# client.graph("test-graph").stats
|
152
|
+
def stats
|
153
|
+
client.get_graph_stats(graph_id: graph_id)
|
154
|
+
end
|
141
155
|
end
|
142
156
|
end
|
data/lib/pixela/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixela
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|