Class: PlatformAPI::OauthClient
- Inherits:
-
Object
- Object
- PlatformAPI::OauthClient
- 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
-
#create(body = {}) ⇒ Object
Create a new OAuth client.
-
#delete(oauth_client_id) ⇒ Object
Delete OAuth client.
-
#info(oauth_client_id) ⇒ Object
Info for an OAuth client.
-
#initialize(client) ⇒ OauthClient
constructor
A new instance of OauthClient.
-
#list ⇒ Object
List OAuth clients.
-
#rotate_credentials(oauth_client_id) ⇒ Object
Rotate credentials for an OAuth client.
-
#update(oauth_client_id, body = {}) ⇒ Object
Update OAuth client.
Constructor Details
#initialize(client) ⇒ OauthClient
Returns a new instance of OauthClient.
2269 2270 2271 |
# File 'lib/platform-api/client.rb', line 2269 def initialize(client) @client = client end |
Instance Method Details
#create(body = {}) ⇒ Object
Create a new OAuth client.
2276 2277 2278 |
# File 'lib/platform-api/client.rb', line 2276 def create(body = {}) @client.oauth_client.create(body) end |
#delete(oauth_client_id) ⇒ Object
Delete OAuth client.
2283 2284 2285 |
# File 'lib/platform-api/client.rb', line 2283 def delete(oauth_client_id) @client.oauth_client.delete(oauth_client_id) end |
#info(oauth_client_id) ⇒ Object
Info for an OAuth client. The output for unauthenticated requests excludes the secret parameter.
2290 2291 2292 |
# File 'lib/platform-api/client.rb', line 2290 def info(oauth_client_id) @client.oauth_client.info(oauth_client_id) end |
#list ⇒ Object
List OAuth clients
2295 2296 2297 |
# File 'lib/platform-api/client.rb', line 2295 def list() @client.oauth_client.list() end |
#rotate_credentials(oauth_client_id) ⇒ Object
Rotate credentials for an OAuth client
2310 2311 2312 |
# File 'lib/platform-api/client.rb', line 2310 def rotate_credentials(oauth_client_id) @client.oauth_client.rotate_credentials(oauth_client_id) end |
#update(oauth_client_id, body = {}) ⇒ Object
Update OAuth client
2303 2304 2305 |
# File 'lib/platform-api/client.rb', line 2303 def update(oauth_client_id, body = {}) @client.oauth_client.update(oauth_client_id, body) end |