Class: Grafana::Api::Org
- Inherits:
-
Object
show all
- Defined in:
- lib/grafana-api/api/org.rb
Defined Under Namespace
Classes: Invites, Quotas, Users
Instance Method Summary
collapse
Constructor Details
#initialize(connection) ⇒ Org
Returns a new instance of Org.
5
6
7
|
# File 'lib/grafana-api/api/org.rb', line 5
def initialize(connection)
@connection = connection
end
|
Instance Method Details
#address(update_org_address_form:) ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/grafana-api/api/org.rb', line 9
def address(update_org_address_form:)
raise ArgumentError, 'update_org_address_form is required' if update_org_address_form.nil?
@connection.call(
:PUT,
'/org/address',
type: Grafana::Api::Models::SuccessResponseBody,
auth: ['api_key', 'basic'],
body: update_org_address_form
)
end
|
#bulk_update(update_org_form:) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/grafana-api/api/org.rb', line 21
def bulk_update(update_org_form:)
raise ArgumentError, 'update_org_form is required' if update_org_form.nil?
@connection.call(
:PUT,
'/org',
type: Grafana::Api::Models::SuccessResponseBody,
auth: ['api_key', 'basic'],
body: update_org_form
)
end
|
#list ⇒ Object
33
34
35
36
37
38
39
40
|
# File 'lib/grafana-api/api/org.rb', line 33
def list
@connection.call(
:GET,
'/org',
type: Grafana::Api::Models::OrgDetailsDTO,
auth: ['api_key', 'basic']
)
end
|
#preferences ⇒ Object
42
43
44
45
46
47
48
49
|
# File 'lib/grafana-api/api/org.rb', line 42
def preferences
@connection.call(
:GET,
'/org/preferences',
type: Grafana::Api::Models::PreferencesSpec,
auth: ['api_key', 'basic']
)
end
|
#preferences_patch(patch_prefs_cmd:) ⇒ Object
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/grafana-api/api/org.rb', line 51
def preferences_patch(patch_prefs_cmd:)
raise ArgumentError, 'patch_prefs_cmd is required' if patch_prefs_cmd.nil?
@connection.call(
:PATCH,
'/org/preferences',
type: Grafana::Api::Models::SuccessResponseBody,
auth: ['api_key', 'basic'],
body: patch_prefs_cmd
)
end
|
#preferences_put(update_prefs_cmd:) ⇒ Object
63
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/grafana-api/api/org.rb', line 63
def preferences_put(update_prefs_cmd:)
raise ArgumentError, 'update_prefs_cmd is required' if update_prefs_cmd.nil?
@connection.call(
:PUT,
'/org/preferences',
type: Grafana::Api::Models::SuccessResponseBody,
auth: ['api_key', 'basic'],
body: update_prefs_cmd
)
end
|