Class: SnapDeploy::Provider::Heroku::API::OauthToken

Inherits:
Object
  • Object
show all
Defined in:
lib/snap_deploy/provider/heroku/api.rb

Overview

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)

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OauthToken

Returns a new instance of OauthToken.



1118
1119
1120
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1118

def initialize(client)
  @client = client
end

Instance Method Details

#create(body) ⇒ Object

Create a new OAuth token.

Parameters:

  • body:

    the object to pass as the request payload



1125
1126
1127
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1125

def create(body)
  @client.oauth_token.create(body)
end