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 +4 -4
- data/CHANGELOG.md +3 -0
- data/facebook_ads.gemspec +2 -2
- data/lib/facebook_ads/ad_account.rb +1 -1
- data/lib/facebook_ads/ad_creative.rb +12 -6
- data/lib/facebook_ads/ad_product_catalog.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83605bff62107d23099b480773471578a17a6298
|
4
|
+
data.tar.gz: d636ff87db8d04c3ee162b4dddf5ece46443566a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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:,
|
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
|
-
|
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}/
|
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}/
|
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.
|
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:
|
11
|
+
date: 2018-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|