twitter-ads 6.0.0 → 6.0.1

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
- SHA256:
3
- metadata.gz: '05206182b0393791a3d5541b133b276f37fbd7bd440db7977b5fb7f17b3c3abc'
4
- data.tar.gz: 72617e530b12e11efed8b8c33a259a5aaa26b50088da58f66e9e9c234047bcb1
2
+ SHA1:
3
+ metadata.gz: 711cd962e65906bf2d4812dc41d48f1f21dfc405
4
+ data.tar.gz: 0c266f4c5b2c97fde746e9ba0c55dcba0e63f0a4
5
5
  SHA512:
6
- metadata.gz: ce83a7aec3141813b2b93050bd192bb235b4bf8ff4318c2c8807b5bc1de214ccfe5cae7d31c8bacbf8b918850e637d2e72618682679f5ef7f37dc40550268246
7
- data.tar.gz: 27389f140dc023a6eafc4bc0a758bc6105fe502fab32e3f5b5c6c8ecbb6c6811b0b4542bd0b0ed227760c506d16c3d3f7f1a24909ceb543681c5a8426c0efa5e
6
+ metadata.gz: efeea0e20e53512c8a5cfeae1f3a8f922d1dd97e955e13f2d270128a3c4be57832213691fd79f110868412eb597923b85d11a180ebb7aa0e856509737545dd83
7
+ data.tar.gz: 197895b12bb107706f7d84dadadbb72c82b5bc91bbf0c72409ad6d45479bef5f5345b128e09ba74d7879f1550539bf253689ab70f80fff58f99b4102344a0476
data/lib/twitter-ads.rb CHANGED
@@ -45,6 +45,7 @@ require 'twitter-ads/targeting_criteria/tv_market'
45
45
  require 'twitter-ads/targeting_criteria/tv_show'
46
46
  require 'twitter-ads/targeting_criteria/event'
47
47
  require 'twitter-ads/targeting_criteria/device'
48
+ require 'twitter-ads/targeting_criteria/conversation'
48
49
  require 'twitter-ads/targeting_criteria/platform'
49
50
  require 'twitter-ads/targeting_criteria/platform_version'
50
51
  require 'twitter-ads/targeting_criteria/network_operator'
@@ -29,7 +29,6 @@ module TwitterAds
29
29
  property :description
30
30
  property :file_name
31
31
  property :name
32
- property :poster_image_media_id
33
32
  property :poster_media_key
34
33
  property :title
35
34
 
@@ -46,15 +45,17 @@ module TwitterAds
46
45
  end
47
46
  end
48
47
 
49
- def save
48
+ def add
50
49
  params = to_params
51
- if @media_key
52
- resource = self.class::RESOURCE % { account_id: account.id, id: media_key }
53
- response = Request.new(account.client, :put, resource, params: params).perform
54
- else
55
- resource = self.class::RESOURCE_COLLECTION % { account_id: account.id }
56
- response = Request.new(account.client, :post, resource, params: params).perform
57
- end
50
+ resource = self.class::RESOURCE_COLLECTION % { account_id: account.id }
51
+ response = Request.new(account.client, :post, resource, params: params).perform
52
+ from_response(response.body[:data])
53
+ end
54
+
55
+ def update
56
+ params = to_params
57
+ resource = self.class::RESOURCE % { account_id: account.id, id: media_key }
58
+ response = Request.new(account.client, :put, resource, params: params).perform
58
59
  from_response(response.body[:data])
59
60
  end
60
61
 
@@ -2,5 +2,5 @@
2
2
  # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
- VERSION = '6.0.0'
5
+ VERSION = '6.0.1'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-ads
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Babich
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2019-09-20 00:00:00.000000000 Z
15
+ date: 2019-11-26 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: multi_json
@@ -182,7 +182,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  - !ruby/object:Gem::Version
183
183
  version: 2.6.0
184
184
  requirements: []
185
- rubygems_version: 3.0.3
185
+ rubyforge_project:
186
+ rubygems_version: 2.5.2.3
186
187
  signing_key:
187
188
  specification_version: 4
188
189
  summary: The officially supported Twitter Ads API SDK for Ruby.