pixela 1.4.2 → 1.5.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 +8 -1
- data/lib/pixela/client/graph_methods.rb +21 -0
- data/lib/pixela/graph.rb +17 -0
- 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: 3c390c81b40e7d104a1e81987394e6111e0f80fe5d1556340f7a3116dc8b0e5d
|
4
|
+
data.tar.gz: 1869873ca527f4990a34bf148a44634109e6d4a2ae6b7cbc1cedd16281236539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b18dbd0f05991d21b51b92845d02bb6f14577d80b8a29202f44da5cac7920cff2f5d33e7c2581d9ed9658561138be95c071e551fff6680b27cbd60ed85370a01
|
7
|
+
data.tar.gz: fb7cfff2961cfb02a2c4a8c4ddab1c81e90402af6e388333c8b3ba6a861334a8f384feee2879e3e22c706a0b9469665d74987a82ec2f89e65ca52dfc0cb75efc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## Unreleased
|
2
|
-
[full changelog](http://github.com/sue445/pixela/compare/v1.
|
2
|
+
[full changelog](http://github.com/sue445/pixela/compare/v1.5.0...master)
|
3
|
+
|
4
|
+
## v1.5.0
|
5
|
+
[full changelog](http://github.com/sue445/pixela/compare/v1.4.2...v1.5.0)
|
6
|
+
|
7
|
+
* Add `Pixela::Client#run_stopwatch` and `Pixela::Graph#run_stopwatch`
|
8
|
+
* https://github.com/sue445/pixela/pull/74
|
9
|
+
* https://github.com/a-know/Pixela/releases/tag/v1.18.0
|
3
10
|
|
4
11
|
## v1.4.2
|
5
12
|
[full changelog](http://github.com/sue445/pixela/compare/v1.4.1...v1.4.2)
|
@@ -193,4 +193,25 @@ module Pixela::Client::GraphMethods
|
|
193
193
|
connection.get("users/#{username}/graphs/#{graph_id}/stats").body
|
194
194
|
end
|
195
195
|
end
|
196
|
+
|
197
|
+
# This will start and end the measurement of the time.
|
198
|
+
#
|
199
|
+
# @param graph_id [String]
|
200
|
+
#
|
201
|
+
# @return [Pixela::Response]
|
202
|
+
#
|
203
|
+
# @raise [Pixela::PixelaError] API is failed
|
204
|
+
#
|
205
|
+
# @see https://docs.pixe.la/entry/post-stopwatch
|
206
|
+
#
|
207
|
+
# @example
|
208
|
+
# client.run_stopwatch(graph_id: "test-graph")
|
209
|
+
def run_stopwatch(graph_id:)
|
210
|
+
with_error_handling do
|
211
|
+
connection.post("users/#{username}/graphs/#{graph_id}/stopwatch").body
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
alias_method :start_stopwatch, :run_stopwatch
|
216
|
+
alias_method :end_stopwatch, :run_stopwatch
|
196
217
|
end
|
data/lib/pixela/graph.rb
CHANGED
@@ -169,5 +169,22 @@ module Pixela
|
|
169
169
|
def stats
|
170
170
|
client.get_graph_stats(graph_id: graph_id)
|
171
171
|
end
|
172
|
+
|
173
|
+
# This will start and end the measurement of the time.
|
174
|
+
#
|
175
|
+
# @return [Pixela::Response]
|
176
|
+
#
|
177
|
+
# @raise [Pixela::PixelaError] API is failed
|
178
|
+
#
|
179
|
+
# @see https://docs.pixe.la/entry/post-stopwatch
|
180
|
+
#
|
181
|
+
# @example
|
182
|
+
# client.graph("test-graph").run_stopwatch
|
183
|
+
def run_stopwatch
|
184
|
+
client.run_stopwatch(graph_id: graph_id)
|
185
|
+
end
|
186
|
+
|
187
|
+
alias_method :start_stopwatch, :run_stopwatch
|
188
|
+
alias_method :end_stopwatch, :run_stopwatch
|
172
189
|
end
|
173
190
|
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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|