pixela 1.4.2 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec0dd41b85fe93243b7771abc4e2f346318a137e99dd772ec4b95f9f042c1e92
4
- data.tar.gz: c7a2ec1a3e91e9d23c8726e1b8202c9fc5b3e833ca225907510e8188ad2e3dec
3
+ metadata.gz: 3c390c81b40e7d104a1e81987394e6111e0f80fe5d1556340f7a3116dc8b0e5d
4
+ data.tar.gz: 1869873ca527f4990a34bf148a44634109e6d4a2ae6b7cbc1cedd16281236539
5
5
  SHA512:
6
- metadata.gz: cc2410feb6a22510756c9a158773ebfa2c66192b45a68593d213e5f58bf2084d637a4e9e8352abd372b12af99d589485d610a61b95df3e4f1fd1b4539518654a
7
- data.tar.gz: 43370888fb1ebd2b2ca8140f94d9feb39daf476f930f3fef08993de8300c26c3bf1de2c94a37810983d1ed91b8983b14d7b51dec91a25dd3a72735851a688a3f
6
+ metadata.gz: b18dbd0f05991d21b51b92845d02bb6f14577d80b8a29202f44da5cac7920cff2f5d33e7c2581d9ed9658561138be95c071e551fff6680b27cbd60ed85370a01
7
+ data.tar.gz: fb7cfff2961cfb02a2c4a8c4ddab1c81e90402af6e388333c8b3ba6a861334a8f384feee2879e3e22c706a0b9469665d74987a82ec2f89e65ca52dfc0cb75efc
@@ -1,5 +1,12 @@
1
1
  ## Unreleased
2
- [full changelog](http://github.com/sue445/pixela/compare/v1.4.2...master)
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Pixela
2
- VERSION = "1.4.2"
2
+ VERSION = "1.5.0"
3
3
  end
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.2
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-04-05 00:00:00.000000000 Z
11
+ date: 2020-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday