crowdmob 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/campaigns.rb +4 -3
  2. 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' => params[: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 }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdmob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: