Class: Chain::AccessToken::ClientModule
- Inherits:
-
ClientModule
- Object
- ClientModule
- Chain::AccessToken::ClientModule
- Defined in:
- lib/chain/access_token.rb
Defined Under Namespace
Classes: Query
Instance Attribute Summary
Attributes inherited from ClientModule
Instance Method Summary collapse
-
#create(opts = {}) ⇒ AccessToken
Create an access token.
-
#delete(id) ⇒ void
Delete the access token specified.
-
#query(opts = {}) ⇒ Query
Get all access tokens sorted by descending creation time, optionally filtered by type.
Methods inherited from ClientModule
Constructor Details
This class inherits a constructor from Chain::ClientModule
Instance Method Details
#create(opts = {}) ⇒ AccessToken
Create an access token.
37 38 39 |
# File 'lib/chain/access_token.rb', line 37 def create(opts = {}) AccessToken.new(client.conn.request('create-access-token', opts)) end |
#delete(id) ⇒ void
This method returns an undefined value.
Delete the access token specified.
54 55 56 57 |
# File 'lib/chain/access_token.rb', line 54 def delete(id) client.conn.request('delete-access-token', {id: id}) nil end |