pixela 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ed72075c34fa2860d04f2caa1abdba37dacb9a6fcc01b0e413d12ae5a75bf40
4
- data.tar.gz: ace8f125523d761d69d70dd3d91b1cf472efd299162f217aa512735c291d98bc
3
+ metadata.gz: b3394cb63b462a975d8581c96c732e9414398642dd51ef530ee5e556605cb211
4
+ data.tar.gz: 202708048e966f0c3a6ee6a44c463041cd357e350d8d6079f2c9d471ac23d921
5
5
  SHA512:
6
- metadata.gz: e3c99eb01857e37f6284030b1f02b594c7ae729132601d4ab2d20737e227c61968b13a6dc62c8aa288b3420719158bfb7a52fef1503d6b472ed9f25eebd35a02
7
- data.tar.gz: 5f06cb6df775d8849b1da6ed1daa4b7c2aa10634b245e23db7491de99abff23928690a6cb88564bd5e12441bcbdf01815763f04fa60c5b70159a26bd5b53ac3a
6
+ metadata.gz: 3428d61c83f3ae5bf0a27a8d8caac84698f6f4385fa305df3cad83e6e0c407662b8b046bbd833446d6e0159b2c64336ad2a2ec150318e96ec45891372ecb2e80
7
+ data.tar.gz: c649d7dcaa20af08d67378361e11ec910fe6a61f295a0944c02f3c5c0bcf2a1396f6c2f9620c4c294430b988b2ece7940d773b19d02d679477a7723fb1d923bf
@@ -1,5 +1,12 @@
1
1
  ## Unreleased
2
- [full changelog](http://github.com/sue445/pixela/compare/v0.5.1...master)
2
+ [full changelog](http://github.com/sue445/pixela/compare/v0.5.2...master)
3
+
4
+ ## v0.5.2
5
+ [full changelog](http://github.com/sue445/pixela/compare/v0.5.1...v0.5.2)
6
+
7
+ * Add `timezone` to `create_graph` and `update_graph`
8
+ * https://github.com/sue445/pixela/pull/34
9
+ * https://github.com/a-know/Pixela/releases/tag/v1.4.0
3
10
 
4
11
  ## v0.5.1
5
12
  [full changelog](http://github.com/sue445/pixela/compare/v0.5.0...v0.5.1)
@@ -6,26 +6,28 @@ module Pixela::Client::GraphMethods
6
6
  # @param unit [String]
7
7
  # @param type [String]
8
8
  # @param color [String]
9
+ # @param timezone [String]
9
10
  #
10
11
  # @return [Hashie::Mash]
11
12
  #
12
13
  # @raise [Pixela::PixelaError] API is failed
13
14
  #
14
- # @see https://pixe.la/#api-detail-post-graphs
15
+ # @see https://docs.pixe.la/#/post-graph
15
16
  #
16
17
  # @example
17
- # client.create_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", type: "int", color: "shibafu")
18
- def create_graph(graph_id:, name:, unit:, type:, color:)
18
+ # client.create_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo")
19
+ def create_graph(graph_id:, name:, unit:, type:, color:, timezone: nil)
19
20
  params = {
20
- id: graph_id,
21
- name: name,
22
- unit: unit,
23
- type: type,
24
- color: color,
21
+ id: graph_id,
22
+ name: name,
23
+ unit: unit,
24
+ type: type,
25
+ color: color,
26
+ timezone: timezone,
25
27
  }
26
28
 
27
29
  with_error_handling do
28
- connection.post("users/#{username}/graphs", params, user_token_headers).body
30
+ connection.post("users/#{username}/graphs", compact_hash(params), user_token_headers).body
29
31
  end
30
32
  end
31
33
 
@@ -35,7 +37,7 @@ module Pixela::Client::GraphMethods
35
37
  #
36
38
  # @raise [Pixela::PixelaError] API is failed
37
39
  #
38
- # @see https://pixe.la/#api-detail-get-graphs
40
+ # @see https://docs.pixe.la/#/get-graph
39
41
  #
40
42
  # @example
41
43
  # client.get_graphs
@@ -53,7 +55,7 @@ module Pixela::Client::GraphMethods
53
55
  #
54
56
  # @return [String]
55
57
  #
56
- # @see https://pixe.la/#api-detail-get-graph
58
+ # @see https://docs.pixe.la/#/get-graph
57
59
  #
58
60
  # @example
59
61
  # client.graph_url(graph_id: "test-graph")
@@ -76,21 +78,23 @@ module Pixela::Client::GraphMethods
76
78
  # @param name [String]
77
79
  # @param unit [String]
78
80
  # @param color [String]
81
+ # @param timezone [String]
79
82
  # @param purge_cache_urls [String,Array<String>]
80
83
  #
81
84
  # @return [Hashie::Mash]
82
85
  #
83
86
  # @raise [Pixela::PixelaError] API is failed
84
87
  #
85
- # @see https://pixe.la/#api-detail-put-graph
88
+ # @see https://docs.pixe.la/#/put-graph
86
89
  #
87
90
  # @example
88
- # client.update_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", color: "shibafu", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
89
- def update_graph(graph_id:, name: nil, unit: nil, color: nil, purge_cache_urls: nil)
91
+ # client.update_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", color: "shibafu", timezone: "Asia/Tokyo", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
92
+ def update_graph(graph_id:, name: nil, unit: nil, color: nil, timezone: nil, purge_cache_urls: nil)
90
93
  params = {
91
- name: name,
92
- unit: unit,
93
- color: color,
94
+ name: name,
95
+ unit: unit,
96
+ color: color,
97
+ timezone: timezone,
94
98
  }
95
99
 
96
100
  if purge_cache_urls
@@ -110,7 +114,7 @@ module Pixela::Client::GraphMethods
110
114
  #
111
115
  # @raise [Pixela::PixelaError] API is failed
112
116
  #
113
- # @see https://pixe.la/#api-detail-delete-graph
117
+ # @see https://docs.pixe.la/#/delete-graph
114
118
  #
115
119
  # @example
116
120
  # client.delete_graph("test-graph")
@@ -9,7 +9,7 @@ module Pixela::Client::PixelMethods
9
9
  #
10
10
  # @raise [Pixela::PixelaError] API is failed
11
11
  #
12
- # @see https://pixe.la/#api-detail-post-pixels
12
+ # @see https://docs.pixe.la/#/post-pixel
13
13
  #
14
14
  # @example
15
15
  # client.create_pixel(graph_id: "test-graph", date: Date.new(2018, 9, 15), quantity: 5)
@@ -33,7 +33,7 @@ module Pixela::Client::PixelMethods
33
33
  #
34
34
  # @raise [Pixela::PixelaError] API is failed
35
35
  #
36
- # @see https://pixe.la/#api-detail-get-pixel
36
+ # @see https://docs.pixe.la/#/get-pixel
37
37
  #
38
38
  # @example
39
39
  # client.get_pixel(graph_id: "test-graph", date: Date.new(2018, 9, 15))
@@ -53,7 +53,7 @@ module Pixela::Client::PixelMethods
53
53
  #
54
54
  # @raise [Pixela::PixelaError] API is failed
55
55
  #
56
- # @see https://pixe.la/#api-detail-put-pixel
56
+ # @see https://docs.pixe.la/#/put-pixel
57
57
  #
58
58
  # @example
59
59
  # client.update_pixel(graph_id: "test-graph", date: Date.new(2018, 9, 15), quantity: 7)
@@ -76,7 +76,7 @@ module Pixela::Client::PixelMethods
76
76
  #
77
77
  # @raise [Pixela::PixelaError] API is failed
78
78
  #
79
- # @see https://pixe.la/#api-detail-delete-pixel
79
+ # @see https://docs.pixe.la/#/delete-pixel
80
80
  #
81
81
  # @example
82
82
  # client.delete_pixel(graph_id: "test-graph", date: Date.new(2018, 9, 15))
@@ -94,7 +94,7 @@ module Pixela::Client::PixelMethods
94
94
  #
95
95
  # @raise [Pixela::PixelaError] API is failed
96
96
  #
97
- # @see https://pixe.la/#api-detail-pixel-increment
97
+ # @see https://docs.pixe.la/#/increment-pixel
98
98
  #
99
99
  # @example
100
100
  # client.increment_pixel(graph_id: "test-graph")
@@ -112,7 +112,7 @@ module Pixela::Client::PixelMethods
112
112
  #
113
113
  # @raise [Pixela::PixelaError] API is failed
114
114
  #
115
- # @see https://pixe.la/#api-detail-pixel-decrement
115
+ # @see https://docs.pixe.la/#/decrement-pixel
116
116
  #
117
117
  # @example
118
118
  # client.decrement_pixel(graph_id: "test-graph")
@@ -8,7 +8,7 @@ module Pixela::Client::UserMethods
8
8
  #
9
9
  # @raise [Pixela::PixelaError] API is failed
10
10
  #
11
- # @see https://pixe.la/#api-detail-post-users
11
+ # @see https://docs.pixe.la/#/post-user
12
12
  #
13
13
  # @example
14
14
  # client.create_user(agree_terms_of_service: true, not_minor: true)
@@ -33,7 +33,7 @@ module Pixela::Client::UserMethods
33
33
  #
34
34
  # @raise [Pixela::PixelaError] API is failed
35
35
  #
36
- # @see https://pixe.la/#api-detail-put-user
36
+ # @see https://docs.pixe.la/#/put-user
37
37
  #
38
38
  # @example
39
39
  # client.update_user(new_token: "thisissecret")
@@ -58,7 +58,7 @@ module Pixela::Client::UserMethods
58
58
  #
59
59
  # @raise [Pixela::PixelaError] API is failed
60
60
  #
61
- # @see https://pixe.la/#api-detail-delete-user
61
+ # @see https://docs.pixe.la/#/delete-user
62
62
  #
63
63
  # @example
64
64
  # client.delete_user
@@ -8,7 +8,7 @@ module Pixela::Client::WebhookMethods
8
8
  #
9
9
  # @raise [Pixela::PixelaError] API is failed
10
10
  #
11
- # @see https://pixe.la/#api-detail-post-webhooks
11
+ # @see https://docs.pixe.la/#/post-webhook
12
12
  #
13
13
  # @example
14
14
  # client.create_webhook(graph_id: "test-graph", type: "increment")
@@ -29,7 +29,7 @@ module Pixela::Client::WebhookMethods
29
29
  #
30
30
  # @raise [Pixela::PixelaError] API is failed
31
31
  #
32
- # @see https://pixe.la/#api-detail-get-webhooks
32
+ # @see https://docs.pixe.la/#/get-webhook
33
33
  #
34
34
  # @example
35
35
  # client.get_webhooks
@@ -47,7 +47,7 @@ module Pixela::Client::WebhookMethods
47
47
  #
48
48
  # @raise [Pixela::PixelaError] API is failed
49
49
  #
50
- # @see https://pixe.la/#api-detail-post-webhook
50
+ # @see https://docs.pixe.la/#/invoke-webhook
51
51
  #
52
52
  # @example
53
53
  # client.invoke_webhook(webhook_hash: "<webhookHash>")
@@ -65,7 +65,7 @@ module Pixela::Client::WebhookMethods
65
65
  #
66
66
  # @raise [Pixela::PixelaError] API is failed
67
67
  #
68
- # @see https://pixe.la/#api-detail-delete-webhook
68
+ # @see https://docs.pixe.la/#/delete-webhook
69
69
  #
70
70
  # @example
71
71
  # client.delete_webhook(webhook_hash: "<webhookHash>")
@@ -24,21 +24,22 @@ module Pixela
24
24
 
25
25
  # Create a new pixelation graph definition.
26
26
  #
27
- # @param name [String]
28
- # @param unit [String]
29
- # @param type [String]
30
- # @param color [String]
27
+ # @param name [String]
28
+ # @param unit [String]
29
+ # @param type [String]
30
+ # @param color [String]
31
+ # @param timezone [String]
31
32
  #
32
33
  # @return [Hashie::Mash]
33
34
  #
34
35
  # @raise [Pixela::PixelaError] API is failed
35
36
  #
36
- # @see https://pixe.la/#api-detail-post-graphs
37
+ # @see https://docs.pixe.la/#/post-graph
37
38
  #
38
39
  # @example
39
- # client.graph("test-graph").create(name: "graph-name", unit: "commit", type: "int", color: "shibafu")
40
- def create(name:, unit:, type:, color:)
41
- client.create_graph(graph_id: graph_id, name: name, unit: unit, type: type, color: color)
40
+ # client.graph("test-graph").create(name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo")
41
+ def create(name:, unit:, type:, color:, timezone: nil)
42
+ client.create_graph(graph_id: graph_id, name: name, unit: unit, type: type, color: color, timezone: timezone)
42
43
  end
43
44
 
44
45
  # Get graph url
@@ -48,7 +49,7 @@ module Pixela
48
49
  #
49
50
  # @return [String]
50
51
  #
51
- # @see https://pixe.la/#api-detail-get-graph
52
+ # @see https://docs.pixe.la/#/get-graph
52
53
  #
53
54
  # @example
54
55
  # client.graph("test-graph").url
@@ -62,18 +63,19 @@ module Pixela
62
63
  # @param name [String]
63
64
  # @param unit [String]
64
65
  # @param color [String]
66
+ # @param timezone [String]
65
67
  # @param purge_cache_urls [String,Array<String>]
66
68
  #
67
69
  # @return [Hashie::Mash]
68
70
  #
69
71
  # @raise [Pixela::PixelaError] API is failed
70
72
  #
71
- # @see https://pixe.la/#api-detail-put-graph
73
+ # @see https://docs.pixe.la/#/put-graph
72
74
  #
73
75
  # @example
74
- # client.graph("test-graph").update(name: "graph-name", unit: "commit", color: "shibafu", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
75
- def update(name: nil, unit: nil, color: nil, purge_cache_urls: nil)
76
- client.update_graph(graph_id: graph_id, name: name, unit: unit, color: color, purge_cache_urls: purge_cache_urls)
76
+ # client.graph("test-graph").update(name: "graph-name", unit: "commit", color: "shibafu", timezone: "Asia/Tokyo", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
77
+ def update(name: nil, unit: nil, color: nil, timezone: nil, purge_cache_urls: nil)
78
+ client.update_graph(graph_id: graph_id, name: name, unit: unit, color: color, timezone: timezone, purge_cache_urls: purge_cache_urls)
77
79
  end
78
80
 
79
81
  # Delete the predefined pixelation graph definition.
@@ -82,7 +84,7 @@ module Pixela
82
84
  #
83
85
  # @raise [Pixela::PixelaError] API is failed
84
86
  #
85
- # @see https://pixe.la/#api-detail-put-graph
87
+ # @see https://docs.pixe.la/#/put-graph
86
88
  #
87
89
  # @example
88
90
  # client.graph("test-graph").delete
@@ -96,7 +98,7 @@ module Pixela
96
98
  #
97
99
  # @raise [Pixela::PixelaError] API is failed
98
100
  #
99
- # @see https://pixe.la/#api-detail-pixel-increment
101
+ # @see https://docs.pixe.la/#/increment-pixel
100
102
  #
101
103
  # @example
102
104
  # client.graph("test-graph").increment
@@ -110,7 +112,7 @@ module Pixela
110
112
  #
111
113
  # @raise [Pixela::PixelaError] API is failed
112
114
  #
113
- # @see https://pixe.la/#api-detail-pixel-decrement
115
+ # @see https://docs.pixe.la/#/decrement-pixel
114
116
  #
115
117
  # @example
116
118
  # client.graph("test-graph").decrement
@@ -29,7 +29,7 @@ module Pixela
29
29
  #
30
30
  # @raise [Pixela::PixelaError] API is failed
31
31
  #
32
- # @see https://pixe.la/#api-detail-post-pixels
32
+ # @see https://docs.pixe.la/#/post-pixel
33
33
  #
34
34
  # @example
35
35
  # client.graph("test-graph").pixel(Date.new(2018, 9, 15)).create(quantity: 5)
@@ -43,7 +43,7 @@ module Pixela
43
43
  #
44
44
  # @raise [Pixela::PixelaError] API is failed
45
45
  #
46
- # @see https://pixe.la/#api-detail-get-pixel
46
+ # @see https://docs.pixe.la/#/get-pixel
47
47
  #
48
48
  # @example
49
49
  # client.graph("test-graph").pixel(Date.new(2018, 9, 15)).get
@@ -59,7 +59,7 @@ module Pixela
59
59
  #
60
60
  # @raise [Pixela::PixelaError] API is failed
61
61
  #
62
- # @see https://pixe.la/#api-detail-put-pixel
62
+ # @see https://docs.pixe.la/#/put-pixel
63
63
  #
64
64
  # @example
65
65
  # client.graph("test-graph").pixel(Date.new(2018, 9, 15)).update(quantity: 7)
@@ -73,7 +73,7 @@ module Pixela
73
73
  #
74
74
  # @raise [Pixela::PixelaError] API is failed
75
75
  #
76
- # @see https://pixe.la/#api-detail-delete-pixel
76
+ # @see https://docs.pixe.la/#/delete-pixel
77
77
  #
78
78
  # @example
79
79
  # client.graph("test-graph").pixel(Date.new(2018, 9, 15)).delete
@@ -1,3 +1,3 @@
1
1
  module Pixela
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -21,7 +21,7 @@ module Pixela
21
21
  #
22
22
  # @raise [Pixela::PixelaError] API is failed
23
23
  #
24
- # @see https://pixe.la/#api-detail-post-webhook
24
+ # @see https://docs.pixe.la/#/invoke-webhook
25
25
  #
26
26
  # @example
27
27
  # client.webhook("<webhookHash>").invoke
@@ -35,7 +35,7 @@ module Pixela
35
35
  #
36
36
  # @raise [Pixela::PixelaError] API is failed
37
37
  #
38
- # @see https://pixe.la/#api-detail-delete-webhook
38
+ # @see https://docs.pixe.la/#/delete-webhook
39
39
  #
40
40
  # @example
41
41
  # client.webhook("<webhookHash>").delete
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: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-25 00:00:00.000000000 Z
11
+ date: 2018-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday