twitter-ads 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -1
- data.tar.gz.sig +0 -0
- data/bin/twitter-ads +3 -0
- data/lib/twitter-ads.rb +2 -4
- data/lib/twitter-ads/account.rb +25 -5
- data/lib/twitter-ads/audiences/tailored_audience.rb +47 -5
- data/lib/twitter-ads/campaign/app_list.rb +4 -2
- data/lib/twitter-ads/campaign/campaign.rb +11 -6
- data/lib/twitter-ads/campaign/funding_instrument.rb +4 -2
- data/lib/twitter-ads/campaign/iab_category.rb +1 -1
- data/lib/twitter-ads/campaign/line_item.rb +13 -7
- data/lib/twitter-ads/campaign/organic_tweet.rb +4 -1
- data/lib/twitter-ads/campaign/promotable_user.rb +4 -2
- data/lib/twitter-ads/campaign/targeting_criteria.rb +6 -3
- data/lib/twitter-ads/campaign/tweet.rb +16 -12
- data/lib/twitter-ads/client.rb +2 -0
- data/lib/twitter-ads/creative/account_media.rb +8 -6
- data/lib/twitter-ads/creative/image_app_download_card.rb +15 -9
- data/lib/twitter-ads/creative/image_conversation_card.rb +17 -9
- data/lib/twitter-ads/creative/media_creative.rb +9 -7
- data/lib/twitter-ads/creative/promoted_account.rb +8 -4
- data/lib/twitter-ads/creative/promoted_tweet.rb +10 -8
- data/lib/twitter-ads/creative/scheduled_tweet.rb +57 -0
- data/lib/twitter-ads/creative/video.rb +14 -8
- data/lib/twitter-ads/creative/video_app_download_card.rb +18 -12
- data/lib/twitter-ads/creative/video_conversation_card.rb +18 -9
- data/lib/twitter-ads/creative/video_website_card.rb +53 -0
- data/lib/twitter-ads/creative/website_card.rb +14 -16
- data/lib/twitter-ads/enum.rb +32 -13
- data/lib/twitter-ads/http/request.rb +2 -2
- data/lib/twitter-ads/http/ton_upload.rb +33 -17
- data/lib/twitter-ads/measurement/app_event_tag.rb +2 -1
- data/lib/twitter-ads/measurement/web_event_tag.rb +2 -1
- data/lib/twitter-ads/resources/analytics.rb +13 -8
- data/lib/twitter-ads/targeting/reach_estimate.rb +2 -2
- data/lib/twitter-ads/targeting_criteria/app_store_category.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/behavior.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/behavior_taxonomy.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/device.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/event.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/interest.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/language.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/location.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/network_operator.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/platform.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/platform_version.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/tv_market.rb +2 -1
- data/lib/twitter-ads/targeting_criteria/tv_show.rb +2 -1
- data/lib/twitter-ads/utils.rb +3 -3
- data/lib/twitter-ads/version.rb +1 -1
- data/spec/fixtures/campaigns_all.json +10 -10
- data/spec/fixtures/line_items_all.json +10 -10
- data/spec/fixtures/line_items_load.json +1 -1
- data/spec/fixtures/no_content.json +0 -0
- data/spec/fixtures/promoted_tweets_all.json +20 -20
- data/spec/fixtures/promoted_tweets_load.json +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/helpers.rb +2 -2
- data/spec/twitter-ads/campaign/app_list_spec.rb +1 -1
- data/spec/twitter-ads/campaign/line_item_spec.rb +1 -1
- data/spec/twitter-ads/campaign/reach_estimate_spec.rb +1 -1
- data/spec/twitter-ads/campaign/tweet_spec.rb +7 -7
- data/spec/twitter-ads/client_spec.rb +2 -1
- data/spec/twitter-ads/creative/promoted_tweet_spec.rb +2 -2
- data/spec/twitter-ads/creative/website_card_spec.rb +15 -9
- data/spec/twitter-ads/http/ton_upload_spec.rb +96 -0
- metadata +60 -62
- metadata.gz.sig +0 -0
- data/lib/twitter-ads/creative/app_download_card.rb +0 -44
- data/lib/twitter-ads/creative/lead_gen_card.rb +0 -46
- data/lib/twitter-ads/targeting_criteria/tv_channel.rb +0 -20
- data/lib/twitter-ads/targeting_criteria/tv_genre.rb +0 -20
- data/spec/twitter-ads/creative/app_download_card_spec.rb +0 -44
- data/spec/twitter-ads/creative/lead_gen_card_spec.rb +0 -46
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Black
|
@@ -33,48 +33,48 @@ cert_chain:
|
|
33
33
|
ouZXSlxLCCseakgV8oMPuyzeHOo/xRmPR+aePyLRG8makXFDQIVfHE2YdLuARcEy
|
34
34
|
rpYQ/nux
|
35
35
|
-----END CERTIFICATE-----
|
36
|
-
date: 2017-
|
36
|
+
date: 2017-12-13 00:00:00.000000000 Z
|
37
37
|
dependencies:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: multi_json
|
40
40
|
requirement: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- - ~>
|
42
|
+
- - "~>"
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '1.11'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
47
|
version_requirements: !ruby/object:Gem::Requirement
|
48
48
|
requirements:
|
49
|
-
- - ~>
|
49
|
+
- - "~>"
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: '1.11'
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
53
|
name: oauth
|
54
54
|
requirement: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
|
-
- - ~>
|
56
|
+
- - "~>"
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0.4'
|
59
59
|
type: :runtime
|
60
60
|
prerelease: false
|
61
61
|
version_requirements: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
|
-
- - ~>
|
63
|
+
- - "~>"
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0.4'
|
66
66
|
- !ruby/object:Gem::Dependency
|
67
67
|
name: bundler
|
68
68
|
requirement: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- - ~>
|
70
|
+
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '1.6'
|
73
73
|
type: :development
|
74
74
|
prerelease: false
|
75
75
|
version_requirements: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- - ~>
|
77
|
+
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '1.6'
|
80
80
|
description: The officially supported Twitter Ads API SDK for Ruby.
|
@@ -85,7 +85,12 @@ executables:
|
|
85
85
|
extensions: []
|
86
86
|
extra_rdoc_files: []
|
87
87
|
files:
|
88
|
+
- CONTRIBUTING.md
|
89
|
+
- LICENSE
|
90
|
+
- README.md
|
91
|
+
- Rakefile
|
88
92
|
- bin/twitter-ads
|
93
|
+
- lib/twitter-ads.rb
|
89
94
|
- lib/twitter-ads/account.rb
|
90
95
|
- lib/twitter-ads/audiences/tailored_audience.rb
|
91
96
|
- lib/twitter-ads/campaign/app_list.rb
|
@@ -99,16 +104,16 @@ files:
|
|
99
104
|
- lib/twitter-ads/campaign/tweet.rb
|
100
105
|
- lib/twitter-ads/client.rb
|
101
106
|
- lib/twitter-ads/creative/account_media.rb
|
102
|
-
- lib/twitter-ads/creative/app_download_card.rb
|
103
107
|
- lib/twitter-ads/creative/image_app_download_card.rb
|
104
108
|
- lib/twitter-ads/creative/image_conversation_card.rb
|
105
|
-
- lib/twitter-ads/creative/lead_gen_card.rb
|
106
109
|
- lib/twitter-ads/creative/media_creative.rb
|
107
110
|
- lib/twitter-ads/creative/promoted_account.rb
|
108
111
|
- lib/twitter-ads/creative/promoted_tweet.rb
|
112
|
+
- lib/twitter-ads/creative/scheduled_tweet.rb
|
109
113
|
- lib/twitter-ads/creative/video.rb
|
110
114
|
- lib/twitter-ads/creative/video_app_download_card.rb
|
111
115
|
- lib/twitter-ads/creative/video_conversation_card.rb
|
116
|
+
- lib/twitter-ads/creative/video_website_card.rb
|
112
117
|
- lib/twitter-ads/creative/website_card.rb
|
113
118
|
- lib/twitter-ads/cursor.rb
|
114
119
|
- lib/twitter-ads/enum.rb
|
@@ -136,18 +141,10 @@ files:
|
|
136
141
|
- lib/twitter-ads/targeting_criteria/network_operator.rb
|
137
142
|
- lib/twitter-ads/targeting_criteria/platform.rb
|
138
143
|
- lib/twitter-ads/targeting_criteria/platform_version.rb
|
139
|
-
- lib/twitter-ads/targeting_criteria/tv_channel.rb
|
140
|
-
- lib/twitter-ads/targeting_criteria/tv_genre.rb
|
141
144
|
- lib/twitter-ads/targeting_criteria/tv_market.rb
|
142
145
|
- lib/twitter-ads/targeting_criteria/tv_show.rb
|
143
146
|
- lib/twitter-ads/utils.rb
|
144
147
|
- lib/twitter-ads/version.rb
|
145
|
-
- lib/twitter-ads.rb
|
146
|
-
- twitter-ads.gemspec
|
147
|
-
- LICENSE
|
148
|
-
- README.md
|
149
|
-
- CONTRIBUTING.md
|
150
|
-
- Rakefile
|
151
148
|
- spec/fixtures/accounts_all.json
|
152
149
|
- spec/fixtures/accounts_features.json
|
153
150
|
- spec/fixtures/accounts_load.json
|
@@ -159,6 +156,7 @@ files:
|
|
159
156
|
- spec/fixtures/funding_instruments_load.json
|
160
157
|
- spec/fixtures/line_items_all.json
|
161
158
|
- spec/fixtures/line_items_load.json
|
159
|
+
- spec/fixtures/no_content.json
|
162
160
|
- spec/fixtures/placements.json
|
163
161
|
- spec/fixtures/promotable_users_all.json
|
164
162
|
- spec/fixtures/promotable_users_load.json
|
@@ -183,10 +181,8 @@ files:
|
|
183
181
|
- spec/twitter-ads/campaign/tweet_spec.rb
|
184
182
|
- spec/twitter-ads/client_spec.rb
|
185
183
|
- spec/twitter-ads/creative/account_media_spec.rb
|
186
|
-
- spec/twitter-ads/creative/app_download_card_spec.rb
|
187
184
|
- spec/twitter-ads/creative/image_app_download_card_spec.rb
|
188
185
|
- spec/twitter-ads/creative/image_conversation_card_spec.rb
|
189
|
-
- spec/twitter-ads/creative/lead_gen_card_spec.rb
|
190
186
|
- spec/twitter-ads/creative/media_creative_spec.rb
|
191
187
|
- spec/twitter-ads/creative/promoted_account_spec.rb
|
192
188
|
- spec/twitter-ads/creative/promoted_tweet_spec.rb
|
@@ -196,8 +192,10 @@ files:
|
|
196
192
|
- spec/twitter-ads/creative/video_spec.rb
|
197
193
|
- spec/twitter-ads/creative/website_card_spec.rb
|
198
194
|
- spec/twitter-ads/cursor_spec.rb
|
195
|
+
- spec/twitter-ads/http/ton_upload_spec.rb
|
199
196
|
- spec/twitter-ads/placements_spec.rb
|
200
197
|
- spec/twitter-ads/utils_spec.rb
|
198
|
+
- twitter-ads.gemspec
|
201
199
|
homepage: https://github.com/twitterdev/twitter-ruby-ads-sdk
|
202
200
|
licenses:
|
203
201
|
- MIT
|
@@ -208,68 +206,68 @@ require_paths:
|
|
208
206
|
- lib
|
209
207
|
required_ruby_version: !ruby/object:Gem::Requirement
|
210
208
|
requirements:
|
211
|
-
- -
|
209
|
+
- - ">="
|
212
210
|
- !ruby/object:Gem::Version
|
213
211
|
version: 2.0.0
|
214
212
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
213
|
requirements:
|
216
|
-
- -
|
214
|
+
- - ">="
|
217
215
|
- !ruby/object:Gem::Version
|
218
216
|
version: 2.0.0
|
219
217
|
requirements: []
|
220
218
|
rubyforge_project:
|
221
|
-
rubygems_version: 2.
|
219
|
+
rubygems_version: 2.5.1
|
222
220
|
signing_key:
|
223
221
|
specification_version: 4
|
224
222
|
summary: The officially supported Twitter Ads API SDK for Ruby.
|
225
223
|
test_files:
|
226
|
-
- spec/fixtures/accounts_all.json
|
227
|
-
- spec/fixtures/accounts_features.json
|
228
|
-
- spec/fixtures/accounts_load.json
|
229
|
-
- spec/fixtures/app_lists_all.json
|
230
|
-
- spec/fixtures/app_lists_load.json
|
231
|
-
- spec/fixtures/campaigns_all.json
|
232
|
-
- spec/fixtures/campaigns_load.json
|
233
|
-
- spec/fixtures/funding_instruments_all.json
|
234
|
-
- spec/fixtures/funding_instruments_load.json
|
235
|
-
- spec/fixtures/line_items_all.json
|
236
|
-
- spec/fixtures/line_items_load.json
|
237
|
-
- spec/fixtures/placements.json
|
238
|
-
- spec/fixtures/promotable_users_all.json
|
239
|
-
- spec/fixtures/promotable_users_load.json
|
240
|
-
- spec/fixtures/promoted_tweets_all.json
|
241
|
-
- spec/fixtures/promoted_tweets_load.json
|
242
|
-
- spec/fixtures/reach_estimate.json
|
243
|
-
- spec/fixtures/tailored_audiences_all.json
|
244
|
-
- spec/fixtures/tailored_audiences_load.json
|
245
|
-
- spec/fixtures/tweet_preview.json
|
246
|
-
- spec/fixtures/videos_all.json
|
247
|
-
- spec/fixtures/videos_load.json
|
248
|
-
- spec/quality_spec.rb
|
249
|
-
- spec/shared/properties.rb
|
250
224
|
- spec/spec_helper.rb
|
251
|
-
- spec/support/helpers.rb
|
252
|
-
- spec/twitter-ads/account_spec.rb
|
253
225
|
- spec/twitter-ads/audiences/tailored_audience_spec.rb
|
226
|
+
- spec/twitter-ads/cursor_spec.rb
|
227
|
+
- spec/twitter-ads/account_spec.rb
|
228
|
+
- spec/twitter-ads/client_spec.rb
|
229
|
+
- spec/twitter-ads/http/ton_upload_spec.rb
|
230
|
+
- spec/twitter-ads/placements_spec.rb
|
231
|
+
- spec/twitter-ads/campaign/targeting_criteria_spec.rb
|
254
232
|
- spec/twitter-ads/campaign/app_list_spec.rb
|
255
|
-
- spec/twitter-ads/campaign/line_item_spec.rb
|
256
233
|
- spec/twitter-ads/campaign/reach_estimate_spec.rb
|
257
|
-
- spec/twitter-ads/campaign/
|
234
|
+
- spec/twitter-ads/campaign/line_item_spec.rb
|
258
235
|
- spec/twitter-ads/campaign/tweet_spec.rb
|
259
|
-
- spec/twitter-ads/client_spec.rb
|
260
236
|
- spec/twitter-ads/creative/account_media_spec.rb
|
261
|
-
- spec/twitter-ads/creative/
|
262
|
-
- spec/twitter-ads/creative/
|
263
|
-
- spec/twitter-ads/creative/
|
264
|
-
- spec/twitter-ads/creative/lead_gen_card_spec.rb
|
237
|
+
- spec/twitter-ads/creative/website_card_spec.rb
|
238
|
+
- spec/twitter-ads/creative/video_legacy_spec.rb
|
239
|
+
- spec/twitter-ads/creative/video_app_download_card_spec.rb
|
265
240
|
- spec/twitter-ads/creative/media_creative_spec.rb
|
266
|
-
- spec/twitter-ads/creative/promoted_account_spec.rb
|
267
241
|
- spec/twitter-ads/creative/promoted_tweet_spec.rb
|
268
|
-
- spec/twitter-ads/creative/
|
242
|
+
- spec/twitter-ads/creative/image_conversation_card_spec.rb
|
269
243
|
- spec/twitter-ads/creative/video_conversation_card_spec.rb
|
270
|
-
- spec/twitter-ads/creative/
|
244
|
+
- spec/twitter-ads/creative/promoted_account_spec.rb
|
245
|
+
- spec/twitter-ads/creative/image_app_download_card_spec.rb
|
271
246
|
- spec/twitter-ads/creative/video_spec.rb
|
272
|
-
- spec/twitter-ads/creative/website_card_spec.rb
|
273
|
-
- spec/twitter-ads/cursor_spec.rb
|
274
|
-
- spec/twitter-ads/placements_spec.rb
|
275
247
|
- spec/twitter-ads/utils_spec.rb
|
248
|
+
- spec/shared/properties.rb
|
249
|
+
- spec/support/helpers.rb
|
250
|
+
- spec/fixtures/line_items_load.json
|
251
|
+
- spec/fixtures/promotable_users_all.json
|
252
|
+
- spec/fixtures/reach_estimate.json
|
253
|
+
- spec/fixtures/tweet_preview.json
|
254
|
+
- spec/fixtures/accounts_features.json
|
255
|
+
- spec/fixtures/videos_all.json
|
256
|
+
- spec/fixtures/line_items_all.json
|
257
|
+
- spec/fixtures/placements.json
|
258
|
+
- spec/fixtures/promotable_users_load.json
|
259
|
+
- spec/fixtures/tailored_audiences_all.json
|
260
|
+
- spec/fixtures/promoted_tweets_all.json
|
261
|
+
- spec/fixtures/funding_instruments_load.json
|
262
|
+
- spec/fixtures/tailored_audiences_load.json
|
263
|
+
- spec/fixtures/app_lists_load.json
|
264
|
+
- spec/fixtures/promoted_tweets_load.json
|
265
|
+
- spec/fixtures/funding_instruments_all.json
|
266
|
+
- spec/fixtures/campaigns_load.json
|
267
|
+
- spec/fixtures/app_lists_all.json
|
268
|
+
- spec/fixtures/accounts_load.json
|
269
|
+
- spec/fixtures/no_content.json
|
270
|
+
- spec/fixtures/campaigns_all.json
|
271
|
+
- spec/fixtures/accounts_all.json
|
272
|
+
- spec/fixtures/videos_load.json
|
273
|
+
- spec/quality_spec.rb
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Copyright (C) 2015 Twitter, Inc.
|
3
|
-
|
4
|
-
module TwitterAds
|
5
|
-
module Creative
|
6
|
-
|
7
|
-
class AppDownloadCard
|
8
|
-
|
9
|
-
include TwitterAds::DSL
|
10
|
-
include TwitterAds::Resource
|
11
|
-
include TwitterAds::Persistence
|
12
|
-
|
13
|
-
attr_reader :account
|
14
|
-
|
15
|
-
property :id, read_only: true
|
16
|
-
property :preview_url, read_only: true
|
17
|
-
property :deleted, type: :bool, read_only: true
|
18
|
-
property :created_at, type: :time, read_only: true
|
19
|
-
property :updated_at, type: :time, read_only: true
|
20
|
-
|
21
|
-
property :name
|
22
|
-
property :app_country_code
|
23
|
-
property :iphone_app_id
|
24
|
-
property :iphone_deep_link
|
25
|
-
property :ipad_app_id
|
26
|
-
property :ipad_deep_link
|
27
|
-
property :googleplay_app_id
|
28
|
-
property :googleplay_deep_link
|
29
|
-
property :app_cta
|
30
|
-
property :custom_icon_media_id
|
31
|
-
property :custom_app_description
|
32
|
-
|
33
|
-
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/cards/app_download'.freeze # @api private
|
34
|
-
RESOURCE = '/1/accounts/%{account_id}/cards/app_download/%{id}'.freeze # @api private
|
35
|
-
|
36
|
-
def initialize(account)
|
37
|
-
@account = account
|
38
|
-
self
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
44
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Copyright (C) 2015 Twitter, Inc.
|
3
|
-
|
4
|
-
module TwitterAds
|
5
|
-
module Creative
|
6
|
-
|
7
|
-
class LeadGenCard
|
8
|
-
|
9
|
-
include TwitterAds::DSL
|
10
|
-
include TwitterAds::Resource
|
11
|
-
include TwitterAds::Persistence
|
12
|
-
|
13
|
-
attr_reader :account
|
14
|
-
|
15
|
-
property :id, read_only: true
|
16
|
-
property :preview_url, read_only: true
|
17
|
-
property :deleted, type: :bool, read_only: true
|
18
|
-
property :created_at, type: :time, read_only: true
|
19
|
-
property :updated_at, type: :time, read_only: true
|
20
|
-
|
21
|
-
property :name
|
22
|
-
property :image_media_id
|
23
|
-
property :cta
|
24
|
-
property :fallback_url
|
25
|
-
property :privacy_policy_url
|
26
|
-
property :title
|
27
|
-
property :submit_url
|
28
|
-
property :submit_method
|
29
|
-
property :custom_destination_url
|
30
|
-
property :custom_destination_text
|
31
|
-
property :custom_key_screen_name
|
32
|
-
property :custom_key_name
|
33
|
-
property :custom_key_email
|
34
|
-
|
35
|
-
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/cards/lead_gen'.freeze # @api private
|
36
|
-
RESOURCE = '/1/accounts/%{account_id}/cards/lead_gen/%{id}'.freeze # @api private
|
37
|
-
|
38
|
-
def initialize(account)
|
39
|
-
@account = account
|
40
|
-
self
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
46
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Copyright (C) 2015 Twitter, Inc.
|
3
|
-
|
4
|
-
module TwitterAds
|
5
|
-
class TVChannel
|
6
|
-
|
7
|
-
include TwitterAds::DSL
|
8
|
-
include TwitterAds::Resource
|
9
|
-
|
10
|
-
property :id, read_only: true
|
11
|
-
property :name, read_only: true
|
12
|
-
|
13
|
-
RESOURCE_COLLECTION = '/1/targeting_criteria/tv_channels'.freeze # @api private
|
14
|
-
|
15
|
-
def initialize(account)
|
16
|
-
@account = account
|
17
|
-
self
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Copyright (C) 2015 Twitter, Inc.
|
3
|
-
|
4
|
-
module TwitterAds
|
5
|
-
class TVGenre
|
6
|
-
|
7
|
-
include TwitterAds::DSL
|
8
|
-
include TwitterAds::Resource
|
9
|
-
|
10
|
-
property :id, read_only: true
|
11
|
-
property :name, read_only: true
|
12
|
-
|
13
|
-
RESOURCE_COLLECTION = '/1/targeting_criteria/tv_genres'.freeze # @api private
|
14
|
-
|
15
|
-
def initialize(account)
|
16
|
-
@account = account
|
17
|
-
self
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Copyright (C) 2015 Twitter, Inc.
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
describe TwitterAds::Creative::AppDownloadCard do
|
7
|
-
|
8
|
-
before(:each) do
|
9
|
-
stub_fixture(:get, :accounts_all, "#{ADS_API}/accounts")
|
10
|
-
stub_fixture(:get, :accounts_load, "#{ADS_API}/accounts/2iqph")
|
11
|
-
end
|
12
|
-
|
13
|
-
let(:client) do
|
14
|
-
Client.new(
|
15
|
-
Faker::Lorem.characters(15),
|
16
|
-
Faker::Lorem.characters(40),
|
17
|
-
"123456-#{Faker::Lorem.characters(40)}",
|
18
|
-
Faker::Lorem.characters(40)
|
19
|
-
)
|
20
|
-
end
|
21
|
-
|
22
|
-
let(:account) { client.accounts.first }
|
23
|
-
|
24
|
-
# check model properties
|
25
|
-
subject { described_class.new(account) }
|
26
|
-
read = %w(id preview_url created_at updated_at deleted)
|
27
|
-
|
28
|
-
write = %w(
|
29
|
-
name
|
30
|
-
app_country_code
|
31
|
-
iphone_app_id
|
32
|
-
iphone_deep_link
|
33
|
-
ipad_app_id
|
34
|
-
ipad_deep_link
|
35
|
-
googleplay_app_id
|
36
|
-
googleplay_deep_link
|
37
|
-
app_cta
|
38
|
-
custom_icon_media_id
|
39
|
-
custom_app_description
|
40
|
-
)
|
41
|
-
|
42
|
-
include_examples 'object property check', read, write
|
43
|
-
|
44
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Copyright (C) 2015 Twitter, Inc.
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
describe TwitterAds::Creative::LeadGenCard do
|
7
|
-
|
8
|
-
before(:each) do
|
9
|
-
stub_fixture(:get, :accounts_all, "#{ADS_API}/accounts")
|
10
|
-
stub_fixture(:get, :accounts_load, "#{ADS_API}/accounts/2iqph")
|
11
|
-
end
|
12
|
-
|
13
|
-
let(:client) do
|
14
|
-
Client.new(
|
15
|
-
Faker::Lorem.characters(15),
|
16
|
-
Faker::Lorem.characters(40),
|
17
|
-
"123456-#{Faker::Lorem.characters(40)}",
|
18
|
-
Faker::Lorem.characters(40)
|
19
|
-
)
|
20
|
-
end
|
21
|
-
|
22
|
-
let(:account) { client.accounts.first }
|
23
|
-
|
24
|
-
# check model properties
|
25
|
-
subject { described_class.new(account) }
|
26
|
-
read = %w(id preview_url created_at updated_at deleted)
|
27
|
-
|
28
|
-
write = %w(
|
29
|
-
name
|
30
|
-
image_media_id
|
31
|
-
cta
|
32
|
-
fallback_url
|
33
|
-
privacy_policy_url
|
34
|
-
title
|
35
|
-
submit_url
|
36
|
-
submit_method
|
37
|
-
custom_destination_url
|
38
|
-
custom_destination_text
|
39
|
-
custom_key_screen_name
|
40
|
-
custom_key_name
|
41
|
-
custom_key_email
|
42
|
-
)
|
43
|
-
|
44
|
-
include_examples 'object property check', read, write
|
45
|
-
|
46
|
-
end
|