class Particle::OAuthClient

Domain model for one Particle OAuth client

Public Class Methods

create_path() click to toggle source
# File lib/particle/oauth_client.rb, line 31
def self.create_path
  "/v1/clients"
end
list_path() click to toggle source
# File lib/particle/oauth_client.rb, line 27
def self.list_path
  "/v1/clients"
end
new(client, attributes) click to toggle source
Calls superclass method Particle::Model::new
# File lib/particle/oauth_client.rb, line 5
def initialize(client, attributes)
  super(client, attributes)
end

Public Instance Methods

get_attributes() click to toggle source

OAuth clients can't be loaded. What you see is what you get…

# File lib/particle/oauth_client.rb, line 11
def get_attributes
  @loaded = true
  @attributes
end
path() click to toggle source
# File lib/particle/oauth_client.rb, line 35
def path
  "/v1/clients/#{id}"
end
remove() click to toggle source

Remove this OAuth client

@example

client = Particle.oauth_clients.first
client.remove

@return [boolean] true for success

# File lib/particle/oauth_client.rb, line 23
def remove
  @client.remove_oauth_client(self)
end