class PlatformAPI::OauthAuthorization

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](devcenter.heroku.com/articles/oauth)

Public Class Methods

new(client) click to toggle source
# File lib/platform-api/client.rb, line 2156
def initialize(client)
  @client = client
end

Public Instance Methods

create(body = {}) click to toggle source

Create a new OAuth authorization.

@param body: the object to pass as the request payload

# File lib/platform-api/client.rb, line 2163
def create(body = {})
  @client.oauth_authorization.create(body)
end
delete(oauth_authorization_id) click to toggle source

Delete OAuth authorization.

@param oauth_authorization_id: unique identifier of OAuth authorization

# File lib/platform-api/client.rb, line 2170
def delete(oauth_authorization_id)
  @client.oauth_authorization.delete(oauth_authorization_id)
end
info(oauth_authorization_id) click to toggle source

Info for an OAuth authorization.

@param oauth_authorization_id: unique identifier of OAuth authorization

# File lib/platform-api/client.rb, line 2177
def info(oauth_authorization_id)
  @client.oauth_authorization.info(oauth_authorization_id)
end
list() click to toggle source

List OAuth authorizations.

# File lib/platform-api/client.rb, line 2182
def list()
  @client.oauth_authorization.list()
end
regenerate(oauth_authorization_id) click to toggle source

Regenerate OAuth tokens. This endpoint is only available to direct authorizations or privileged OAuth clients.

@param oauth_authorization_id: unique identifier of OAuth authorization

# File lib/platform-api/client.rb, line 2189
def regenerate(oauth_authorization_id)
  @client.oauth_authorization.regenerate(oauth_authorization_id)
end