Module: Plugrush
- Includes:
- HTTParty
- Defined in:
- lib/plugrush.rb,
lib/plugrush/version.rb
Constant Summary collapse
- VERSION =
"0.0.5"
Class Method Summary collapse
- .campaign_list ⇒ Object
- .start(campaign_id) ⇒ Object
- .stats_on_date(start_date, end_date) ⇒ Object
- .stop(campaign_id) ⇒ Object
Instance Method Summary collapse
Class Method Details
.campaign_list ⇒ Object
17 18 19 |
# File 'lib/plugrush.rb', line 17 def self.campaign_list get("#{@credentials}&action=campaign/list") end |
.start(campaign_id) ⇒ Object
25 26 27 |
# File 'lib/plugrush.rb', line 25 def self.start(campaign_id) get("#{@credentials}&action=campaign/pause&id=#{campaign_id}&pause=0") end |
.stats_on_date(start_date, end_date) ⇒ Object
13 14 15 |
# File 'lib/plugrush.rb', line 13 def self.stats_on_date(start_date, end_date) get("#{@credentials}&action=advertiser/stats&start=#{start_date}&end=#{end_date}&breakdown=dates") end |
.stop(campaign_id) ⇒ Object
21 22 23 |
# File 'lib/plugrush.rb', line 21 def self.stop(campaign_id) get("#{@credentials}&action=campaign/pause&id=#{campaign_id}&pause=1") end |
Instance Method Details
#initialize(email, api_key) ⇒ Object
8 9 10 |
# File 'lib/plugrush.rb', line 8 def initialize(email, api_key) @credentials = "?user=#{email}&api_key=#{api_key}" end |