Class: StatRaptor::Client

Inherits:
Object
  • Object
show all
Includes:
Graphs, Projects, Users
Defined in:
lib/statraptor/client.rb,
lib/statraptor/client/users.rb,
lib/statraptor/client/graphs.rb,
lib/statraptor/client/projects.rb,
lib/statraptor/client/adapters/rest_client.rb

Defined Under Namespace

Modules: Adapters, Graphs, Projects, Users

Instance Method Summary collapse

Methods included from Graphs

#get_average_lifetime_value_graph_data, #get_churn_graph_data, #get_revenue_graph_data, #get_subscribers_graph_data

Methods included from Projects

#create_project, #delete_project

Methods included from Users

#create_user, #delete_user, #find_or_create_user, #get_user, #get_users

Constructor Details

#initialize(attrs = {}) ⇒ StatRaptor::Client

Initializes a new API object

Parameters:

  • attrs (Hash) (defaults to: {})


26
27
28
29
30
31
# File 'lib/statraptor/client.rb', line 26

def initialize(attrs={})
  attrs = StatRaptor.options.merge(attrs)
  Config::VALID_OPTIONS_KEYS.each do |key|
    instance_variable_set("@#{key}".to_sym, attrs[key])
  end
end