Class: Particle::OAuthClient
- Defined in:
- lib/particle/oauth_client.rb
Overview
Domain model for one Particle OAuth client
Class Method Summary collapse
Instance Method Summary collapse
-
#get_attributes ⇒ Object
OAuth clients can’t be loaded.
-
#initialize(client, attributes) ⇒ OAuthClient
constructor
A new instance of OAuthClient.
- #path ⇒ Object
-
#remove ⇒ boolean
Remove this OAuth client.
Methods inherited from Model
attribute_reader, #attributes, #id, #inspect
Constructor Details
#initialize(client, attributes) ⇒ OAuthClient
Returns a new instance of OAuthClient.
5 6 7 |
# File 'lib/particle/oauth_client.rb', line 5 def initialize(client, attributes) super(client, attributes) end |
Class Method Details
.create_path ⇒ Object
31 32 33 |
# File 'lib/particle/oauth_client.rb', line 31 def self.create_path "/v1/clients" end |
.list_path ⇒ Object
27 28 29 |
# File 'lib/particle/oauth_client.rb', line 27 def self.list_path "/v1/clients" end |
Instance Method Details
#get_attributes ⇒ Object
OAuth clients can’t be loaded. What you see is what you get…
11 12 13 14 |
# File 'lib/particle/oauth_client.rb', line 11 def get_attributes @loaded = true @attributes end |
#path ⇒ Object
35 36 37 |
# File 'lib/particle/oauth_client.rb', line 35 def path "/v1/clients/#{id}" end |
#remove ⇒ boolean
Remove this OAuth client
23 24 25 |
# File 'lib/particle/oauth_client.rb', line 23 def remove @client.remove_oauth_client(self) end |