Class: Appfigures::Rank

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/appfigures/rank.rb

Instance Method Summary collapse

Constructor Details

#initialize(username, password) ⇒ Rank

Returns a new instance of Rank.



9
10
11
# File 'lib/appfigures/rank.rb', line 9

def initialize(username, password)
  @auth = {:username => username, :password => password}
end

Instance Method Details

#ranks(app_id, granularity, start_date, end_date, options = {}) ⇒ Object

Generating a Ranks Report



14
15
16
17
# File 'lib/appfigures/rank.rb', line 14

def ranks(app_id, granularity, start_date, end_date, options = {})
  options.merge!({:basic_auth => @auth})
  self.class.get("/ranks/#{app_id}/#{granularity}/#{start_date}/#{end_date}/", options)
end