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.



1381
1382
1383
# File 'lib/platform-api/client.rb', line 1381

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



1388
1389
1390
# File 'lib/platform-api/client.rb', line 1388

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



1395
1396
1397
# File 'lib/platform-api/client.rb', line 1395

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



1402
1403
1404
# File 'lib/platform-api/client.rb', line 1402

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

#listObject

List OAuth clients



1407
1408
1409
# File 'lib/platform-api/client.rb', line 1407

def list()
  @client.oauth_client.list()
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



1415
1416
1417
# File 'lib/platform-api/client.rb', line 1415

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