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.
19 20 21 22 23 24 |
# File 'lib/plotly/client.rb', line 19 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.
15 16 17 |
# File 'lib/plotly/client.rb', line 15 def conn @conn end |