class PlatformAPI::OauthToken

OAuth tokens provide access for authorized clients to act on behalf of a Heroku user 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 2251
def initialize(client)
  @client = client
end

Public Instance Methods

create(body = {}) click to toggle source

Create a new OAuth token.

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

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

Revoke OAuth access token.

@param oauth_token_id: unique identifier of OAuth token

# File lib/platform-api/client.rb, line 2265
def delete(oauth_token_id)
  @client.oauth_token.delete(oauth_token_id)
end