Class: Stagehand::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/stagehand.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Client

Returns a new instance of Client.



5
6
7
8
9
10
11
# File 'lib/stagehand.rb', line 5

def initialize(attributes)
  @attributes = attributes
  @client_id = @attributes[:client_id]
  @client_secret = @attributes[:client_secret]
  @resource_host = @attributes[:resource_host]
  @client_host = @attributes[:client_host]
end

Instance Method Details

#authorize_urlObject



13
14
15
# File 'lib/stagehand.rb', line 13

def authorize_url
  @resource_host + "/oauth/authorize?client_id=#{@client_id}&client_secret=#{@client_secret}&redirect_uri=#{@client_host}/callback"
end