Class: PlatformAPI::OauthAuthorization

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

Overview

OAuth authorizations represent clients that a Heroku user has authorized to automate, customize or extend their usage of the platform. For more information please refer to the Heroku OAuth documentation

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OauthAuthorization

Returns a new instance of OauthAuthorization.



3192
3193
3194
# File 'lib/platform-api/client.rb', line 3192

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object



3204
3205
3206
# File 'lib/platform-api/client.rb', line 3204

def create(body = {})
  @client.oauth_authorization.create(body)
end

#delete(oauth_authorization_id) ⇒ Object



3216
3217
3218
# File 'lib/platform-api/client.rb', line 3216

def delete(oauth_authorization_id)
  @client.oauth_authorization.delete(oauth_authorization_id)
end

#info(oauth_authorization_id) ⇒ Object



3228
3229
3230
# File 'lib/platform-api/client.rb', line 3228

def info(oauth_authorization_id)
  @client.oauth_authorization.info(oauth_authorization_id)
end

#listObject

List OAuth authorizations.



3249
3250
3251
# File 'lib/platform-api/client.rb', line 3249

def list()
  @client.oauth_authorization.list()
end

#regenerate(oauth_authorization_id) ⇒ Object



3261
3262
3263
# File 'lib/platform-api/client.rb', line 3261

def regenerate(oauth_authorization_id)
  @client.oauth_authorization.regenerate(oauth_authorization_id)
end

#update(oauth_authorization_id, body = {}) ⇒ Object



3242
3243
3244
# File 'lib/platform-api/client.rb', line 3242

def update(oauth_authorization_id, body = {})
  @client.oauth_authorization.update(oauth_authorization_id, body)
end