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 +4 -4
- data/.rubocop_todo.yml +1 -0
- data/CHANGELOG.md +5 -0
- data/lib/dogapi/facade.rb +5 -0
- data/lib/dogapi/v1/dashboard.rb +11 -4
- data/lib/dogapi/version.rb +1 -1
- data/spec/integration/dashboard_spec.rb +6 -0
- 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: d244a23455c972c66ba9ea1a15da6f23a233f1ccf88792b0660266cf0f41989e
|
4
|
+
data.tar.gz: 5d5a59735ad5c52cb47fb349dcba9da76525a39a04c6fd76941fd5005f1d8e67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '059749f5e615aeb4dc4ff5a782cb3e561c0adb8dd0d98ef949b974bd4ee9f7ab0fb2ddf36ddfcd4f2cc69395696290a333c46944e939dfeb6e6e3b62c2361e89'
|
7
|
+
data.tar.gz: c8a256db3095c70a676f7cfcf97ec966afefb5c00853d386da27cecbdbeb2d0ded3967fa99d7518af927112d9e7e42084300a6ce68f7227070405943717b98db
|
data/.rubocop_todo.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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
|
data/lib/dogapi/facade.rb
CHANGED
@@ -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)
|
data/lib/dogapi/v1/dashboard.rb
CHANGED
@@ -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
|
-
#
|
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
|
-
#
|
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)
|
data/lib/dogapi/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2019-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|