facebook_ads 0.6.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1bb5a527242c2b0054b6e9d47d907dba0d07789e
4
- data.tar.gz: 969784bc06dbd4dab9bbfc8d6c66bae85efb3a46
3
+ metadata.gz: 83605bff62107d23099b480773471578a17a6298
4
+ data.tar.gz: d636ff87db8d04c3ee162b4dddf5ece46443566a
5
5
  SHA512:
6
- metadata.gz: 36f41c341c1755e5a70712cba6100e542ca2b82a65f84080679f43f13a3159b1f60edbef028aa7bc1e6b4983582191191b89f492c26dbf5ce9a1a2cc71326b6f
7
- data.tar.gz: e7806d4ab9d564bc8fdf217b09eaa9c1dc710697f64b1bd94ae4fa0f803fde4e4f321a3c108be1bf7e31e9d5a1abaad8328a52cd9750f9861e3792895cf545d6
6
+ metadata.gz: 9a8e9e2319db0d07538b90058d933a29a241484f997c281dd09fcae2ded85f8dee0f5d97f20da75f2cb319d943540b4bc4f7243fa800baa13849c4bdef354d2b
7
+ data.tar.gz: 95f5dd675c660da468f49950866c4e8cce31ab252da6a36517594e427027b894579e3651f76bafd34bf95e393795d31b659b5eab5931407560962b2740700801
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.6.2 (2018-05-08)
2
+ - Set Product Catalog path to `/owned_product_catalogs` for API v2.11 compatibility
3
+
1
4
  ## 0.4 (2017-07-25)
2
5
  - Added ability to pass `bid_amount` parameter when creating ad sets
3
6
  - Ad Set `is_autobid` parameter now defaults to `nil` rather than `true`
data/facebook_ads.gemspec CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  # To publish the next version:
4
4
  # gem build facebook_ads.gemspec
5
- # gem push facebook_ads-0.6.0.gem
5
+ # gem push facebook_ads-0.6.2.gem
6
6
  Gem::Specification.new do |s|
7
7
  s.name = 'facebook_ads'
8
- s.version = '0.6.0'
8
+ s.version = '0.6.2'
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.licenses = ['MIT']
11
11
  s.authors = ['Chris Estreich']
@@ -210,7 +210,7 @@ module FacebookAds
210
210
  end
211
211
 
212
212
  def create_link_ad_creative(creative)
213
- required = %i[name title body object_url link_url image_hash]
213
+ required = %i[name title body object_url link_url image_hash page_id]
214
214
 
215
215
  unless (keys = required - creative.keys).length.zero?
216
216
  raise Exception, "Creative is missing the following: #{keys.join(', ')}"
@@ -91,14 +91,20 @@ module FacebookAds
91
91
  }
92
92
  end
93
93
 
94
- def link(name:, title:, body:, object_url:, link_url:, image_hash:)
94
+ def link(name:, title:, body:, link_url:, image_hash:, page_id:)
95
+ object_story_spec = {
96
+ 'page_id' => page_id,
97
+ 'link_data' => {
98
+ 'name' => title,
99
+ 'message' => body,
100
+ 'link' => link_url,
101
+ 'image_hash' => image_hash
102
+ }
103
+ }
104
+
95
105
  {
96
106
  name: name,
97
- title: title,
98
- body: body,
99
- object_url: object_url,
100
- link_url: link_url,
101
- image_hash: image_hash
107
+ object_story_spec: object_story_spec.to_json
102
108
  }
103
109
  end
104
110
  end
@@ -5,7 +5,7 @@ module FacebookAds
5
5
 
6
6
  class << self
7
7
  def all(query = {})
8
- get("/#{FacebookAds.business_id}/product_catalogs", query: query, objectify: true)
8
+ get("/#{FacebookAds.business_id}/owned_product_catalogs", query: query, objectify: true)
9
9
  end
10
10
 
11
11
  def find_by(conditions)
@@ -18,7 +18,7 @@ module FacebookAds
18
18
 
19
19
  def create(name:)
20
20
  query = { name: name }
21
- result = post("/#{FacebookAds.business_id}/product_catalogs", query: query)
21
+ result = post("/#{FacebookAds.business_id}/owned_product_catalogs", query: query)
22
22
  find(result['id'])
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facebook_ads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Estreich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-23 00:00:00.000000000 Z
11
+ date: 2018-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client