Class: TentClient::AppAuthorization

Inherits:
Object
  • Object
show all
Defined in:
lib/tent-client/app_authorization.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AppAuthorization

Returns a new instance of AppAuthorization.



5
6
7
# File 'lib/tent-client/app_authorization.rb', line 5

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



3
4
5
# File 'lib/tent-client/app_authorization.rb', line 3

def client
  @client
end

Instance Method Details

#create(app_id, data) ⇒ Object



9
10
11
# File 'lib/tent-client/app_authorization.rb', line 9

def create(app_id, data)
  @client.http.post("apps/#{app_id}/authorizations", data)
end

#delete(app_id, id) ⇒ Object



17
18
19
# File 'lib/tent-client/app_authorization.rb', line 17

def delete(app_id, id)
  @client.http.delete("apps/#{app_id}/authorizations/#{id}")
end

#update(app_id, id, data) ⇒ Object



13
14
15
# File 'lib/tent-client/app_authorization.rb', line 13

def update(app_id, id, data)
  @client.http.put("apps/#{app_id}/authorizations/#{id}", data)
end