Class: AddonsApi::Client::Team::Addon::Config
- Inherits:
-
Object
- Object
- AddonsApi::Client::Team::Addon::Config
- Defined in:
- lib/addons-api/client.rb
Overview
Configuration of an Addon
Instance Method Summary collapse
-
#initialize(client) ⇒ Config
constructor
A new instance of Config.
-
#list(team_id, addon_id) ⇒ Object
Get the configuration of an addon.
-
#list_with_callback_url(callback_url) ⇒ Object
Get the configuration of an addon with callback URL.
-
#update(team_id, addon_id, body = {}) ⇒ Object
Update the configuration of an addon.
-
#update_with_callback_url(callback_url, body = {}) ⇒ Object
Update the configuration of an addon with callback URL.
Constructor Details
#initialize(client) ⇒ Config
Returns a new instance of Config.
300 301 302 |
# File 'lib/addons-api/client.rb', line 300 def initialize(client) @client = client end |
Instance Method Details
#list(team_id, addon_id) ⇒ Object
Get the configuration of an addon.
305 306 307 |
# File 'lib/addons-api/client.rb', line 305 def list(team_id, addon_id) @client.request(:get, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}/config") end |
#list_with_callback_url(callback_url) ⇒ Object
Get the configuration of an addon with callback URL.
310 311 312 |
# File 'lib/addons-api/client.rb', line 310 def list_with_callback_url(callback_url) @client.request(:get, "config", base_url: callback_url) end |
#update(team_id, addon_id, body = {}) ⇒ Object
Update the configuration of an addon.
315 316 317 |
# File 'lib/addons-api/client.rb', line 315 def update(team_id, addon_id, body = {}) @client.request(:patch, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}/config", body: body) end |
#update_with_callback_url(callback_url, body = {}) ⇒ Object
Update the configuration of an addon with callback URL.
320 321 322 |
# File 'lib/addons-api/client.rb', line 320 def update_with_callback_url(callback_url, body = {}) @client.request(:patch, "config", base_url: callback_url, body: body) end |