Class: Grafana::Api::User::Helpflags
- Inherits:
-
Object
- Object
- Grafana::Api::User::Helpflags
- Defined in:
- lib/grafana-api/api/user/helpflags.rb
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize(connection) ⇒ Helpflags
constructor
A new instance of Helpflags.
- #update(flag_id:) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Helpflags
Returns a new instance of Helpflags.
5 6 7 |
# File 'lib/grafana-api/api/user/helpflags.rb', line 5 def initialize(connection) @connection = connection end |
Instance Method Details
#clear ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/grafana-api/api/user/helpflags.rb', line 9 def clear @connection.call( :GET, '/user/helpflags/clear', type: Grafana::Api::Models::ClearHelpFlags200Response, auth: ['api_key', 'basic'] ) end |
#update(flag_id:) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/grafana-api/api/user/helpflags.rb', line 18 def update(flag_id:) raise ArgumentError, 'flag_id is required' if flag_id.nil? @connection.call( :PUT, '/user/helpflags/{flag_id}' .gsub('{flag_id}', ERB::Util.url_encode(flag_id.to_s)), type: Grafana::Api::Models::ClearHelpFlags200Response, auth: ['api_key', 'basic'] ) end |