pixela 1.3.0 → 1.3.1

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: ce5100ce7d7532b146fff4e9843855822af2be533cb0f0adcc3d43e0285c5717
4
- data.tar.gz: 797f7bca3c98f9989480a1620dc246bcc1c817fef0c7659cbf9d5d8eeabbffdf
3
+ metadata.gz: f9efdafcfea7a90985336604bc68755a79ca200ad48f0682ce5a274f6bb23238
4
+ data.tar.gz: 6eb16f9eef42f1fc9f3983759b4819776ce18acba486680f4e620892097c5b7c
5
5
  SHA512:
6
- metadata.gz: 02104d78ebfc060ebf86a0161f744edc263b2adf3ba15b546bd117f3429cc84b08b2211da7c7d7f9947e53c3550f50548ce9280b838ed2de8eceba66ffb916ef
7
- data.tar.gz: ba70d1084fb40646ab68e7e969a5d10c417ac3782508269ac600a8de8625b3017829cee7102cc74bf4edbfab960dbd999f09f9139bbcd0cda2a208f5af5c8ea0
6
+ metadata.gz: 8727d06117b6ca73c52ce02afc0231f44582a7a7a7c9c70f943036d59041b71497023076191cc08a320fe9cfa0037336c99ade3aa2e9bb1353d49afef46baf4c
7
+ data.tar.gz: d7348691f57c02d3d4fdfb55157d1f637a802df67fd39719f984e96db9005e0c6281b795848e0a7417e4e9c15c24754bfc8a2f7a98065b7f538b7fac31a804a3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## Unreleased
2
- [full changelog](http://github.com/sue445/pixela/compare/v1.3.0...master)
2
+ [full changelog](http://github.com/sue445/pixela/compare/v1.3.1...master)
3
+
4
+ ## v1.3.1
5
+ [full changelog](http://github.com/sue445/pixela/compare/v1.3.0...v1.3.1)
6
+
7
+ * Add `is_secret` and `publish_optional_data` to `create_graph` and `update_graph`
8
+ * https://github.com/sue445/pixela/pull/57
9
+ * https://github.com/a-know/Pixela/releases/tag/v1.12.0
10
+ * https://github.com/a-know/Pixela/releases/tag/v1.11.0
3
11
 
4
12
  ## v1.3.0
5
13
  [full changelog](http://github.com/sue445/pixela/compare/v1.2.0...v1.3.0)
@@ -1,13 +1,15 @@
1
1
  module Pixela::Client::GraphMethods
2
2
  # Create a new pixelation graph definition.
3
3
  #
4
- # @param graph_id [String]
5
- # @param name [String]
6
- # @param unit [String]
7
- # @param type [String]
8
- # @param color [String]
9
- # @param timezone [String]
10
- # @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
4
+ # @param graph_id [String]
5
+ # @param name [String]
6
+ # @param unit [String]
7
+ # @param type [String]
8
+ # @param color [String]
9
+ # @param timezone [String]
10
+ # @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
11
+ # @param is_secret [Boolean]
12
+ # @param publish_optional_data [Boolean]
11
13
  #
12
14
  # @return [Pixela::Response]
13
15
  #
@@ -16,16 +18,18 @@ module Pixela::Client::GraphMethods
16
18
  # @see https://docs.pixe.la/entry/post-graph
17
19
  #
18
20
  # @example
19
- # client.create_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment")
20
- def create_graph(graph_id:, name:, unit:, type:, color:, timezone: nil, self_sufficient: nil)
21
+ # client.create_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment", is_secret: true, publish_optional_data: true)
22
+ def create_graph(graph_id:, name:, unit:, type:, color:, timezone: nil, self_sufficient: nil, is_secret: nil, publish_optional_data: nil)
21
23
  params = {
22
- id: graph_id,
23
- name: name,
24
- unit: unit,
25
- type: type,
26
- color: color,
27
- timezone: timezone,
28
- selfSufficient: self_sufficient,
24
+ id: graph_id,
25
+ name: name,
26
+ unit: unit,
27
+ type: type,
28
+ color: color,
29
+ timezone: timezone,
30
+ selfSufficient: self_sufficient,
31
+ isSecret: is_secret,
32
+ publishOptionalData: publish_optional_data
29
33
  }
30
34
 
31
35
  with_error_handling do
@@ -88,13 +92,15 @@ module Pixela::Client::GraphMethods
88
92
 
89
93
  # Update predefined pixelation graph definitions.
90
94
  #
91
- # @param graph_id [String]
92
- # @param name [String]
93
- # @param unit [String]
94
- # @param color [String]
95
- # @param timezone [String]
96
- # @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
97
- # @param purge_cache_urls [String,Array<String>]
95
+ # @param graph_id [String]
96
+ # @param name [String]
97
+ # @param unit [String]
98
+ # @param color [String]
99
+ # @param timezone [String]
100
+ # @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
101
+ # @param purge_cache_urls [String,Array<String>]
102
+ # @param is_secret [Boolean]
103
+ # @param publish_optional_data [Boolean]
98
104
  #
99
105
  # @return [Pixela::Response]
100
106
  #
@@ -104,13 +110,15 @@ module Pixela::Client::GraphMethods
104
110
  #
105
111
  # @example
106
112
  # client.update_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
107
- def update_graph(graph_id:, name: nil, unit: nil, color: nil, timezone: nil, self_sufficient: nil, purge_cache_urls: nil)
113
+ def update_graph(graph_id:, name: nil, unit: nil, color: nil, timezone: nil, self_sufficient: nil, purge_cache_urls: nil, is_secret: nil, publish_optional_data: nil)
108
114
  params = {
109
- name: name,
110
- unit: unit,
111
- color: color,
112
- timezone: timezone,
113
- selfSufficient: self_sufficient,
115
+ name: name,
116
+ unit: unit,
117
+ color: color,
118
+ timezone: timezone,
119
+ selfSufficient: self_sufficient,
120
+ isSecret: is_secret,
121
+ publishOptionalData: publish_optional_data
114
122
  }
115
123
 
116
124
  if purge_cache_urls
data/lib/pixela/graph.rb CHANGED
@@ -24,12 +24,14 @@ 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]
31
- # @param timezone [String]
32
- # @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
27
+ # @param name [String]
28
+ # @param unit [String]
29
+ # @param type [String]
30
+ # @param color [String]
31
+ # @param timezone [String]
32
+ # @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
33
+ # @param is_secret [Boolean]
34
+ # @param publish_optional_data [Boolean]
33
35
  #
34
36
  # @return [Pixela::Response]
35
37
  #
@@ -38,9 +40,12 @@ module Pixela
38
40
  # @see https://docs.pixe.la/entry/post-graph
39
41
  #
40
42
  # @example
41
- # client.graph("test-graph").create(name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment")
42
- def create(name:, unit:, type:, color:, timezone: nil, self_sufficient: nil)
43
- client.create_graph(graph_id: graph_id, name: name, unit: unit, type: type, color: color, timezone: timezone, self_sufficient: self_sufficient)
43
+ # client.graph("test-graph").create(name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment", is_secret: true, publish_optional_data: true)
44
+ def create(name:, unit:, type:, color:, timezone: nil, self_sufficient: nil, is_secret: nil, publish_optional_data: nil)
45
+ client.create_graph(
46
+ graph_id: graph_id, name: name, unit: unit, type: type, color: color, timezone: timezone, self_sufficient: self_sufficient,
47
+ is_secret: is_secret, publish_optional_data: publish_optional_data,
48
+ )
44
49
  end
45
50
 
46
51
  # Get graph url
@@ -61,12 +66,14 @@ module Pixela
61
66
 
62
67
  # Update predefined pixelation graph definitions.
63
68
  #
64
- # @param name [String]
65
- # @param unit [String]
66
- # @param color [String]
67
- # @param timezone [String]
68
- # @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
69
- # @param purge_cache_urls [String,Array<String>]
69
+ # @param name [String]
70
+ # @param unit [String]
71
+ # @param color [String]
72
+ # @param timezone [String]
73
+ # @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
74
+ # @param purge_cache_urls [String,Array<String>]
75
+ # @param is_secret [Boolean]
76
+ # @param publish_optional_data [Boolean]
70
77
  #
71
78
  # @return [Pixela::Response]
72
79
  #
@@ -76,8 +83,11 @@ module Pixela
76
83
  #
77
84
  # @example
78
85
  # client.graph("test-graph").update(name: "graph-name", unit: "commit", color: "shibafu", timezone: "Asia/Tokyo", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
79
- def update(name: nil, unit: nil, color: nil, timezone: nil, purge_cache_urls: nil, self_sufficient: nil)
80
- client.update_graph(graph_id: graph_id, name: name, unit: unit, color: color, timezone: timezone, self_sufficient: self_sufficient, purge_cache_urls: purge_cache_urls)
86
+ def update(name: nil, unit: nil, color: nil, timezone: nil, purge_cache_urls: nil, self_sufficient: nil, is_secret: nil, publish_optional_data: nil)
87
+ client.update_graph(
88
+ graph_id: graph_id, name: name, unit: unit, color: color, timezone: timezone, self_sufficient: self_sufficient,
89
+ purge_cache_urls: purge_cache_urls, is_secret: is_secret, publish_optional_data: publish_optional_data,
90
+ )
81
91
  end
82
92
 
83
93
  # Delete the predefined pixelation graph definition.
@@ -1,3 +1,3 @@
1
1
  module Pixela
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
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.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-07 00:00:00.000000000 Z
11
+ date: 2019-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday