Module: Spore::Client::Apps
- Included in:
- Spore::Client
- Defined in:
- lib/spore/client/apps.rb
Instance Method Summary collapse
- #change_app_name(app_id, name) ⇒ Object
- #change_app_owner(app_id, email) ⇒ Object
- #create_app(app_id = nil, name) ⇒ Object
- #get_app(app_id) ⇒ Object
- #list_apps ⇒ Object
Instance Method Details
#change_app_name(app_id, name) ⇒ Object
25 26 27 28 |
# File 'lib/spore/client/apps.rb', line 25 def change_app_name(app_id, name) response = patch "apps/#{app_id}", { name: name } response.body["app"] end |
#change_app_owner(app_id, email) ⇒ Object
20 21 22 23 |
# File 'lib/spore/client/apps.rb', line 20 def change_app_owner(app_id, email) response = patch "apps/#{app_id}", { email: email }, { async: true } response.body["app"] end |
#create_app(app_id = nil, name) ⇒ Object
14 15 16 17 18 |
# File 'lib/spore/client/apps.rb', line 14 def create_app(app_id = nil, name) app_id = SecureRandom.uuid if app_id.nil? response = post "/apps", { id: app_id, name: name }, { async: true } response.body["app"] end |
#get_app(app_id) ⇒ Object
9 10 11 12 |
# File 'lib/spore/client/apps.rb', line 9 def get_app(app_id) response = get "/apps/#{app_id}" response.body["app"] end |
#list_apps ⇒ Object
4 5 6 7 |
# File 'lib/spore/client/apps.rb', line 4 def list_apps response = get "/apps" response.body["apps"] end |