Class: Plotly::Client
Instance Attribute Summary collapse
-
#conn ⇒ Object
readonly
Returns the value of attribute conn.
Instance Method Summary collapse
-
#initialize(username, api_key) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(username, api_key) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 |
# File 'lib/plotly/client.rb', line 11 def initialize(username, api_key) @conn = Faraday.new( url: 'https://api.plot.ly/v2', headers: build_headers(username, api_key) ) end |
Instance Attribute Details
#conn ⇒ Object (readonly)
Returns the value of attribute conn.
7 8 9 |
# File 'lib/plotly/client.rb', line 7 def conn @conn end |