Class: PlatformAPI::OauthClient

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

Overview

OAuth clients are applications that Heroku users can authorize 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) ⇒ OauthClient

Returns a new instance of OauthClient.



2196
2197
2198
# File 'lib/platform-api/client.rb', line 2196

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object

Create a new OAuth client.

Parameters:

  • body:

    the object to pass as the request payload



2203
2204
2205
# File 'lib/platform-api/client.rb', line 2203

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

#delete(oauth_client_id) ⇒ Object

Delete OAuth client.

Parameters:

  • oauth_client_id:

    unique identifier of this OAuth client



2210
2211
2212
# File 'lib/platform-api/client.rb', line 2210

def delete(oauth_client_id)
  @client.oauth_client.delete(oauth_client_id)
end

#info(oauth_client_id) ⇒ Object

Info for an OAuth client

Parameters:

  • oauth_client_id:

    unique identifier of this OAuth client



2217
2218
2219
# File 'lib/platform-api/client.rb', line 2217

def info(oauth_client_id)
  @client.oauth_client.info(oauth_client_id)
end

#listObject

List OAuth clients



2222
2223
2224
# File 'lib/platform-api/client.rb', line 2222

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

#rotate_credentials(oauth_client_id) ⇒ Object

Rotate credentials for an OAuth client

Parameters:

  • oauth_client_id:

    unique identifier of this OAuth client



2237
2238
2239
# File 'lib/platform-api/client.rb', line 2237

def rotate_credentials(oauth_client_id)
  @client.oauth_client.rotate_credentials(oauth_client_id)
end

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

Update OAuth client

Parameters:

  • oauth_client_id:

    unique identifier of this OAuth client

  • body:

    the object to pass as the request payload



2230
2231
2232
# File 'lib/platform-api/client.rb', line 2230

def update(oauth_client_id, body = {})
  @client.oauth_client.update(oauth_client_id, body)
end