crowdmob 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/campaigns.rb +4 -3
- metadata +1 -1
data/lib/campaigns.rb
CHANGED
@@ -20,14 +20,15 @@ module CrowdMob::Campaigns
|
|
20
20
|
@organization_secret_key = '9cbfbe10e13f2a30cb6509ef0e09445b'
|
21
21
|
@organization_permalink = 'crowdmob'
|
22
22
|
|
23
|
-
def self.create(active, params)
|
23
|
+
def self.create(app_store_url, active, params)
|
24
24
|
url = CrowdMob.base_url + '/organizations/' + @organization_permalink + '/sponsored_action_campaigns.json'
|
25
25
|
uri = URI.parse(url)
|
26
26
|
now, secret_hash = self.compute_secret_hash
|
27
27
|
params = {
|
28
|
+
'app_store_url' => app_store_url,
|
28
29
|
'datetime' => now,
|
29
30
|
'secret_hash' => secret_hash,
|
30
|
-
'active' =>
|
31
|
+
'active' => active,
|
31
32
|
'sponsored_action_campaign[bid_in_cents]' => params[:bid_in_cents],
|
32
33
|
'sponsored_action_campaign[max_total_spend_in_cents]' => params[:max_total_spend_in_cents],
|
33
34
|
'sponsored_action_campaign[max_spend_per_day_in_cents]' => params[:max_spend_per_day_in_cents],
|
@@ -95,7 +96,7 @@ if __FILE__ == $0
|
|
95
96
|
starts_at: now,
|
96
97
|
ends_at: one_week_from_now,
|
97
98
|
}
|
98
|
-
campaign = CrowdMob::Campaigns.create(true, params)
|
99
|
+
campaign = CrowdMob::Campaigns.create('https://itunes.apple.com/us/app/angry-birds-free/id409807569?mt=8', true, params)
|
99
100
|
|
100
101
|
# Edit the campaign:
|
101
102
|
params = { bid_in_cents: 2 }
|