Module: Plotly

Defined in:
lib/plotly/axis.rb,
lib/plotly/data.rb,
lib/plotly/line.rb,
lib/plotly/plot.rb,
lib/plotly/client.rb,
lib/plotly/layout.rb,
lib/plotly/marker.rb,
lib/plotly/version.rb,
lib/plotly/castable.rb,
lib/plotly/exportable.rb,
lib/plotly/offline/html.rb,
lib/plotly/offline/exportable.rb

Defined Under Namespace

Modules: Castable, Exportable, Offline Classes: Axis, Client, Data, Layout, Line, Marker, Plot

Constant Summary collapse

VERSION =
'0.1.2'.freeze

Class Method Summary collapse

Class Method Details

.auth(username, api_key) ⇒ Object

Set the default client which is automatically used when any clients aren’t assigned.



35
36
37
# File 'lib/plotly/client.rb', line 35

def auth(username, api_key)
  @client = Client.new(username, api_key)
end

.clientPlotly::Client

Returns:

Raises:

  • (RuntimeError)


41
42
43
# File 'lib/plotly/client.rb', line 41

def client
  @client ? @client : raise('Authentication required')
end