dogapi 1.34.0 → 1.35.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: cfe067279d23444bbc1c35c0978cab82aa5f2e24ec4fd989c392855f15063a9e
4
- data.tar.gz: b8b74019176e0a732eb6800bb57693c54268f2b82a99acc0185b836d3e7cc379
3
+ metadata.gz: d244a23455c972c66ba9ea1a15da6f23a233f1ccf88792b0660266cf0f41989e
4
+ data.tar.gz: 5d5a59735ad5c52cb47fb349dcba9da76525a39a04c6fd76941fd5005f1d8e67
5
5
  SHA512:
6
- metadata.gz: b4f44f988385adaac78e4dff13d4f9dda996848097cc6ca62f445c87f4c4ce7858dd5164ec01f04bbb08ea4f60b12769187d4f818b6733a74dbae7a407a279eb
7
- data.tar.gz: 54d88863dd12a3a1b4e7dd3ddeeb017dd9ba245b1d811c65e041608c7b30917fef333ec08204c8cb6f1f1ee870458c28a5a991594fddb21e721d9ad67b1697ab
6
+ metadata.gz: '059749f5e615aeb4dc4ff5a782cb3e561c0adb8dd0d98ef949b974bd4ee9f7ab0fb2ddf36ddfcd4f2cc69395696290a333c46944e939dfeb6e6e3b62c2361e89'
7
+ data.tar.gz: c8a256db3095c70a676f7cfcf97ec966afefb5c00853d386da27cecbdbeb2d0ded3967fa99d7518af927112d9e7e42084300a6ce68f7227070405943717b98db
@@ -236,6 +236,7 @@ Style/AccessorMethodName:
236
236
  - 'lib/dogapi/v1/dash.rb'
237
237
  - 'lib/dogapi/v1/embed.rb'
238
238
  - 'lib/dogapi/v1/screenboard.rb'
239
+ - 'lib/dogapi/v1/dashboard.rb'
239
240
  - 'lib/dogapi/v1/user.rb'
240
241
 
241
242
  # Offense count: 1
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 1.35.0 / 2019-03-21
4
+
5
+ * [FEATURE] Add get_all_boards and support for 'free' layout. See [#171][].
6
+
3
7
  ## 1.34.0 / 2019-03-08
4
8
 
5
9
  * [FEATURE] Add /integration endpoints. See [#170][], thanks [@davidcpell][].
@@ -230,6 +234,7 @@ This is the last release compatible with Ruby 1.8. ([EOL 2013-06-30](https://www
230
234
  [#165]: https://github.com/DataDog/dogapi-rb/issues/165
231
235
  [#167]: https://github.com/DataDog/dogapi-rb/issues/167
232
236
  [#170]: https://github.com/DataDog/dogapi-rb/issues/170
237
+ [#171]: https://github.com/DataDog/dogapi-rb/issues/171
233
238
  [@ArjenSchwarz]: https://github.com/ArjenSchwarz
234
239
  [@Kaixiang]: https://github.com/Kaixiang
235
240
  [@TaylURRE]: https://github.com/TaylURRE
@@ -297,6 +297,11 @@ module Dogapi
297
297
  @dashboard_service.get_board(dashboard_id)
298
298
  end
299
299
 
300
+ # Fetch all dashboards.
301
+ def get_all_boards()
302
+ @dashboard_service.get_all_boards()
303
+ end
304
+
300
305
  # Delete the given dashboard.
301
306
  def delete_board(dashboard_id)
302
307
  @dashboard_service.delete_board(dashboard_id)
@@ -14,8 +14,8 @@ module Dogapi
14
14
  # Required arguments:
15
15
  # :title => String: Title of the dashboard
16
16
  # :widgets => JSON: List of widgets to display on the dashboard
17
- # :layout_type => String: Layout type of the dashboard
18
- # (for now, only "ordered" layout - current timeboard layout - is supported)
17
+ # :layout_type => String: Layout type of the dashboard.
18
+ # Allowed values: 'ordered' or 'free'
19
19
  # Optional arguments:
20
20
  # :description => String: Description of the dashboard
21
21
  # :is_read_only => Boolean: Whether this dashboard is read-only.
@@ -46,8 +46,8 @@ module Dogapi
46
46
  # :dashboard_id => String: ID of the dashboard
47
47
  # :title => String: Title of the dashboard
48
48
  # :widgets => JSON: List of widgets to display on the dashboard
49
- # :layout_type => String: Layout type of the dashboard
50
- # (for now, only "ordered" layout - current timeboard layout - is supported)
49
+ # :layout_type => String: Layout type of the dashboard.
50
+ # Allowed values: 'ordered' or 'free'
51
51
  # Optional arguments:
52
52
  # :description => String: Description of the dashboard
53
53
  # :is_read_only => Boolean: Whether this dashboard is read-only.
@@ -74,13 +74,20 @@ module Dogapi
74
74
 
75
75
  # Fetch the given dashboard
76
76
  #
77
+ # Required argument:
77
78
  # :dashboard_id => String: ID of the dashboard
78
79
  def get_board(dashboard_id)
79
80
  request(Net::HTTP::Get, "/api/#{API_VERSION}/#{RESOURCE_NAME}/#{dashboard_id}", nil, nil, false)
80
81
  end
81
82
 
83
+ # Fetch all custom dashboards
84
+ def get_all_boards
85
+ request(Net::HTTP::Get, "/api/#{API_VERSION}/#{RESOURCE_NAME}", nil, nil, false)
86
+ end
87
+
82
88
  # Delete the given dashboard
83
89
  #
90
+ # Required argument:
84
91
  # :dashboard_id => String: ID of the dashboard
85
92
  def delete_board(dashboard_id)
86
93
  request(Net::HTTP::Delete, "/api/#{API_VERSION}/#{RESOURCE_NAME}/#{dashboard_id}", nil, nil, false)
@@ -1,3 +1,3 @@
1
1
  module Dogapi
2
- VERSION = '1.34.0'
2
+ VERSION = '1.35.0'
3
3
  end
@@ -56,6 +56,12 @@ describe Dogapi::Client do
56
56
  :get, "/dashboard/#{DASHBOARD_ID}"
57
57
  end
58
58
 
59
+ describe '#get_all_boards' do
60
+ it_behaves_like 'an api method',
61
+ :get_all_boards, [],
62
+ :get, '/dashboard'
63
+ end
64
+
59
65
  describe '#delete_board' do
60
66
  it_behaves_like 'an api method',
61
67
  :delete_board, [DASHBOARD_ID],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dogapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.34.0
4
+ version: 1.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-08 00:00:00.000000000 Z
11
+ date: 2019-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json