Class: AddonsApi::Client::Team::Addon::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/addons-api/client.rb

Overview

Configuration of an Addon

Instance Method Summary collapse

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