twitter-ads 5.0.0 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +1 -1
- data/README.md +3 -4
- data/Rakefile +1 -2
- data/lib/twitter-ads.rb +10 -11
- data/lib/twitter-ads/account.rb +12 -12
- data/lib/twitter-ads/audiences/audience_intelligence.rb +3 -3
- data/lib/twitter-ads/audiences/tailored_audience.rb +12 -156
- data/lib/twitter-ads/campaign/app_list.rb +5 -5
- data/lib/twitter-ads/campaign/campaign.rb +7 -11
- data/lib/twitter-ads/campaign/funding_instrument.rb +6 -5
- data/lib/twitter-ads/campaign/iab_category.rb +2 -2
- data/lib/twitter-ads/campaign/line_item.rb +18 -21
- data/lib/twitter-ads/campaign/organic_tweet.rb +1 -5
- data/lib/twitter-ads/campaign/promotable_user.rb +5 -5
- data/lib/twitter-ads/campaign/targeting_criteria.rb +7 -7
- data/lib/twitter-ads/campaign/tweet.rb +7 -11
- data/lib/twitter-ads/client.rb +3 -4
- data/lib/twitter-ads/creative/account_media.rb +5 -5
- data/lib/twitter-ads/creative/cards_fetch.rb +8 -6
- data/lib/twitter-ads/creative/image_app_download_card.rb +5 -5
- data/lib/twitter-ads/creative/image_conversation_card.rb +5 -5
- data/lib/twitter-ads/creative/media_creative.rb +6 -5
- data/lib/twitter-ads/creative/media_library.rb +5 -5
- data/lib/twitter-ads/creative/poll_cards.rb +5 -5
- data/lib/twitter-ads/creative/promoted_account.rb +5 -9
- data/lib/twitter-ads/creative/promoted_tweet.rb +5 -9
- data/lib/twitter-ads/creative/scheduled_tweet.rb +7 -7
- data/lib/twitter-ads/creative/tweet_previews.rb +36 -0
- data/lib/twitter-ads/creative/video_app_download_card.rb +5 -5
- data/lib/twitter-ads/creative/video_conversation_card.rb +5 -5
- data/lib/twitter-ads/creative/video_website_card.rb +4 -4
- data/lib/twitter-ads/creative/website_card.rb +3 -3
- data/lib/twitter-ads/cursor.rb +2 -2
- data/lib/twitter-ads/enum.rb +128 -122
- data/lib/twitter-ads/error.rb +2 -2
- data/lib/twitter-ads/http/request.rb +6 -5
- data/lib/twitter-ads/http/response.rb +1 -1
- data/lib/twitter-ads/legacy.rb +1 -1
- data/lib/twitter-ads/measurement/app_event_tag.rb +3 -3
- data/lib/twitter-ads/measurement/web_event_tag.rb +3 -3
- data/lib/twitter-ads/resources/analytics.rb +38 -8
- data/lib/twitter-ads/resources/batch.rb +4 -4
- data/lib/twitter-ads/resources/dsl.rb +1 -1
- data/lib/twitter-ads/resources/persistence.rb +1 -1
- data/lib/twitter-ads/resources/resource.rb +2 -2
- data/lib/twitter-ads/settings/tax.rb +3 -3
- data/lib/twitter-ads/settings/user.rb +3 -3
- data/lib/twitter-ads/targeting/reach_estimate.rb +1 -1
- data/lib/twitter-ads/targeting_criteria/app_store_category.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/behavior.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/behavior_taxonomy.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/device.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/event.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/interest.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/language.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/location.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/network_operator.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/platform.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/platform_version.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/tv_market.rb +3 -3
- data/lib/twitter-ads/targeting_criteria/tv_show.rb +3 -3
- data/lib/twitter-ads/utils.rb +2 -2
- data/lib/twitter-ads/version.rb +2 -2
- data/spec/quality_spec.rb +2 -2
- data/spec/shared/properties.rb +1 -1
- data/spec/spec_helper.rb +9 -8
- data/spec/support/helpers.rb +1 -1
- data/spec/twitter-ads/account_spec.rb +1 -1
- data/spec/twitter-ads/audiences/tailored_audience_spec.rb +1 -1
- 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/targeting_criteria_spec.rb +1 -1
- data/spec/twitter-ads/campaign/tweet_spec.rb +1 -1
- data/spec/twitter-ads/client_spec.rb +1 -1
- data/spec/twitter-ads/creative/account_media_spec.rb +1 -1
- data/spec/twitter-ads/creative/image_app_download_card_spec.rb +1 -1
- data/spec/twitter-ads/creative/image_conversation_card_spec.rb +1 -1
- data/spec/twitter-ads/creative/media_creative_spec.rb +1 -1
- data/spec/twitter-ads/creative/promoted_account_spec.rb +1 -1
- data/spec/twitter-ads/creative/promoted_tweet_spec.rb +1 -1
- data/spec/twitter-ads/creative/video_app_download_card_spec.rb +1 -1
- data/spec/twitter-ads/creative/video_conversation_card_spec.rb +1 -1
- data/spec/twitter-ads/creative/website_card_spec.rb +1 -1
- data/spec/twitter-ads/cursor_spec.rb +1 -1
- data/spec/twitter-ads/placements_spec.rb +1 -1
- data/spec/twitter-ads/utils_spec.rb +1 -1
- data/twitter-ads.gemspec +10 -6
- metadata +10 -25
- data/lib/twitter-ads/http/ton_upload.rb +0 -156
- data/spec/twitter-ads/http/ton_upload_spec.rb +0 -96
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Twitter, Inc.
|
3
3
|
|
4
4
|
module TwitterAds
|
5
5
|
class Platform
|
@@ -12,8 +12,8 @@ module TwitterAds
|
|
12
12
|
property :targeting_value, read_only: true
|
13
13
|
property :localized_name, read_only: true
|
14
14
|
|
15
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
16
|
-
'targeting_criteria/platforms'
|
15
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
16
|
+
'targeting_criteria/platforms' # @api private
|
17
17
|
|
18
18
|
def initialize(account)
|
19
19
|
@account = account
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Twitter, Inc.
|
3
3
|
|
4
4
|
module TwitterAds
|
5
5
|
class PlatformVersion
|
@@ -13,8 +13,8 @@ module TwitterAds
|
|
13
13
|
property :number, read_only: true
|
14
14
|
property :platform, read_only: true
|
15
15
|
|
16
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
17
|
-
'targeting_criteria/platform_versions'
|
16
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
17
|
+
'targeting_criteria/platform_versions' # @api private
|
18
18
|
|
19
19
|
def initialize(account)
|
20
20
|
@account = account
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Twitter, Inc.
|
3
3
|
|
4
4
|
module TwitterAds
|
5
5
|
class TVMarket
|
@@ -12,8 +12,8 @@ module TwitterAds
|
|
12
12
|
property :locale, read_only: true
|
13
13
|
property :country_code, read_only: true
|
14
14
|
|
15
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
16
|
-
'targeting_criteria/tv_markets'
|
15
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
16
|
+
'targeting_criteria/tv_markets' # @api private
|
17
17
|
|
18
18
|
def initialize(account)
|
19
19
|
@account = account
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Twitter, Inc.
|
3
3
|
|
4
4
|
module TwitterAds
|
5
5
|
class TVShow
|
@@ -12,8 +12,8 @@ module TwitterAds
|
|
12
12
|
property :estimated_users, read_only: true
|
13
13
|
property :genre, read_only: true
|
14
14
|
|
15
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
16
|
-
'targeting_criteria/tv_shows'
|
15
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
16
|
+
'targeting_criteria/tv_shows' # @api private
|
17
17
|
|
18
18
|
def initialize(account)
|
19
19
|
@account = account
|
data/lib/twitter-ads/utils.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Twitter, Inc.
|
3
3
|
|
4
4
|
module TwitterAds
|
5
5
|
module Utils
|
@@ -64,7 +64,7 @@ module TwitterAds
|
|
64
64
|
# @api private
|
65
65
|
# @since 0.3.2
|
66
66
|
def deprecated(name, opts = {})
|
67
|
-
message =
|
67
|
+
message = +"[DEPRECATED] #{name} has been deprecated"
|
68
68
|
message += opts[:replacement] ? " (please use #{opts[:replacement]})." : '.'
|
69
69
|
message += " Please see #{opts[:refer]} for more info." if opts[:refer]
|
70
70
|
warn message
|
data/lib/twitter-ads/version.rb
CHANGED
data/spec/quality_spec.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Twitter, Inc.
|
3
3
|
|
4
4
|
require 'spec_helper'
|
5
5
|
|
@@ -8,7 +8,7 @@ describe 'Code Style & Quality', :quality do
|
|
8
8
|
# If this test fails, you need to run 'rubocop' to see what needs to be fixed.
|
9
9
|
# Please see the CONTRIBUTING.md file for additional style guide information.
|
10
10
|
it 'has no style guide or quality violations', :style do
|
11
|
-
result =
|
11
|
+
result = RuboCop::CLI.new.run([])
|
12
12
|
expect(result).to eq(0)
|
13
13
|
end unless RUBY_ENGINE =~ /rbx/
|
14
14
|
|
data/spec/shared/properties.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Twitter, Inc.
|
3
3
|
|
4
4
|
unless RUBY_PLATFORM =~ /java/ || RUBY_ENGINE =~ /rbx/
|
5
5
|
require 'simplecov'
|
6
6
|
require 'codeclimate-test-reporter'
|
7
7
|
|
8
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
9
|
+
[
|
10
|
+
SimpleCov::Formatter::HTMLFormatter,
|
11
|
+
CodeClimate::TestReporter::Formatter
|
12
|
+
]
|
13
|
+
)
|
12
14
|
|
13
15
|
SimpleCov.start do
|
14
16
|
add_filter '/spec/'
|
@@ -28,9 +30,8 @@ include TwitterAds
|
|
28
30
|
# Require All Support Files
|
29
31
|
Dir['./spec/support/*.rb'].sort.each { |file| require file }
|
30
32
|
|
31
|
-
ADS_API = "https://ads-api.twitter.com/#{TwitterAds::API_VERSION}"
|
32
|
-
|
33
|
-
UPLOAD_API = 'https://upload.twitter.com/1.1'.freeze
|
33
|
+
ADS_API = "https://ads-api.twitter.com/#{TwitterAds::API_VERSION}"
|
34
|
+
UPLOAD_API = 'https://upload.twitter.com/1.1'
|
34
35
|
|
35
36
|
RSpec.configure do |config|
|
36
37
|
# Helpers & Custom Matchers
|
data/spec/support/helpers.rb
CHANGED
data/twitter-ads.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Twitter, Inc.
|
3
3
|
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
4
4
|
require File.expand_path('../lib/twitter-ads/version', __FILE__)
|
5
5
|
|
@@ -8,14 +8,20 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.version = TwitterAds::VERSION
|
9
9
|
s.platform = Gem::Platform::RUBY
|
10
10
|
s.licenses = ['MIT']
|
11
|
-
s.authors = [
|
11
|
+
s.authors = [
|
12
|
+
'John Babich',
|
13
|
+
'Tushar Bhushan',
|
14
|
+
'Juan Shishido',
|
15
|
+
'Thomas Osowski',
|
16
|
+
'Shohei Maeda'
|
17
|
+
]
|
12
18
|
s.email = ['twitterdev-ads@twitter.com']
|
13
19
|
s.homepage = 'https://github.com/twitterdev/twitter-ruby-ads-sdk'
|
14
20
|
s.description = 'The officially supported Twitter Ads API SDK for Ruby.'
|
15
21
|
s.summary = s.description
|
16
22
|
|
17
|
-
s.required_ruby_version = '>= 2.
|
18
|
-
s.required_rubygems_version = '>= 2.
|
23
|
+
s.required_ruby_version = '>= 2.4.0'
|
24
|
+
s.required_rubygems_version = '>= 2.6.0'
|
19
25
|
|
20
26
|
if File.exist?('private.pem')
|
21
27
|
s.signing_key = 'private.pem'
|
@@ -27,8 +33,6 @@ Gem::Specification.new do |s|
|
|
27
33
|
s.add_dependency 'multi_json', '~> 1.11'
|
28
34
|
s.add_dependency 'oauth', '~> 0.4'
|
29
35
|
|
30
|
-
s.add_development_dependency 'bundler', '~> 1.6'
|
31
|
-
|
32
36
|
s.files = Dir.glob('{bin,lib}/**/*')
|
33
37
|
s.files += %w(twitter-ads.gemspec LICENSE README.md CONTRIBUTING.md Rakefile)
|
34
38
|
s.test_files = Dir.glob('{spec,feature}/**/*')
|
metadata
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter-ads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Brandon Black
|
8
7
|
- John Babich
|
9
|
-
-
|
8
|
+
- Tushar Bhushan
|
9
|
+
- Juan Shishido
|
10
|
+
- Thomas Osowski
|
11
|
+
- Shohei Maeda
|
10
12
|
autorequire:
|
11
13
|
bindir: bin
|
12
14
|
cert_chain: []
|
13
|
-
date: 2019-
|
15
|
+
date: 2019-06-14 00:00:00.000000000 Z
|
14
16
|
dependencies:
|
15
17
|
- !ruby/object:Gem::Dependency
|
16
18
|
name: multi_json
|
@@ -40,20 +42,6 @@ dependencies:
|
|
40
42
|
- - "~>"
|
41
43
|
- !ruby/object:Gem::Version
|
42
44
|
version: '0.4'
|
43
|
-
- !ruby/object:Gem::Dependency
|
44
|
-
name: bundler
|
45
|
-
requirement: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '1.6'
|
50
|
-
type: :development
|
51
|
-
prerelease: false
|
52
|
-
version_requirements: !ruby/object:Gem::Requirement
|
53
|
-
requirements:
|
54
|
-
- - "~>"
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '1.6'
|
57
45
|
description: The officially supported Twitter Ads API SDK for Ruby.
|
58
46
|
email:
|
59
47
|
- twitterdev-ads@twitter.com
|
@@ -91,6 +79,7 @@ files:
|
|
91
79
|
- lib/twitter-ads/creative/promoted_account.rb
|
92
80
|
- lib/twitter-ads/creative/promoted_tweet.rb
|
93
81
|
- lib/twitter-ads/creative/scheduled_tweet.rb
|
82
|
+
- lib/twitter-ads/creative/tweet_previews.rb
|
94
83
|
- lib/twitter-ads/creative/video_app_download_card.rb
|
95
84
|
- lib/twitter-ads/creative/video_conversation_card.rb
|
96
85
|
- lib/twitter-ads/creative/video_website_card.rb
|
@@ -100,7 +89,6 @@ files:
|
|
100
89
|
- lib/twitter-ads/error.rb
|
101
90
|
- lib/twitter-ads/http/request.rb
|
102
91
|
- lib/twitter-ads/http/response.rb
|
103
|
-
- lib/twitter-ads/http/ton_upload.rb
|
104
92
|
- lib/twitter-ads/legacy.rb
|
105
93
|
- lib/twitter-ads/measurement/app_event_tag.rb
|
106
94
|
- lib/twitter-ads/measurement/web_event_tag.rb
|
@@ -172,7 +160,6 @@ files:
|
|
172
160
|
- spec/twitter-ads/creative/video_conversation_card_spec.rb
|
173
161
|
- spec/twitter-ads/creative/website_card_spec.rb
|
174
162
|
- spec/twitter-ads/cursor_spec.rb
|
175
|
-
- spec/twitter-ads/http/ton_upload_spec.rb
|
176
163
|
- spec/twitter-ads/placements_spec.rb
|
177
164
|
- spec/twitter-ads/utils_spec.rb
|
178
165
|
- twitter-ads.gemspec
|
@@ -188,15 +175,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
175
|
requirements:
|
189
176
|
- - ">="
|
190
177
|
- !ruby/object:Gem::Version
|
191
|
-
version: 2.
|
178
|
+
version: 2.4.0
|
192
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
180
|
requirements:
|
194
181
|
- - ">="
|
195
182
|
- !ruby/object:Gem::Version
|
196
|
-
version: 2.
|
183
|
+
version: 2.6.0
|
197
184
|
requirements: []
|
198
|
-
|
199
|
-
rubygems_version: 2.5.1
|
185
|
+
rubygems_version: 3.0.3
|
200
186
|
signing_key:
|
201
187
|
specification_version: 4
|
202
188
|
summary: The officially supported Twitter Ads API SDK for Ruby.
|
@@ -206,7 +192,6 @@ test_files:
|
|
206
192
|
- spec/twitter-ads/cursor_spec.rb
|
207
193
|
- spec/twitter-ads/account_spec.rb
|
208
194
|
- spec/twitter-ads/client_spec.rb
|
209
|
-
- spec/twitter-ads/http/ton_upload_spec.rb
|
210
195
|
- spec/twitter-ads/placements_spec.rb
|
211
196
|
- spec/twitter-ads/campaign/targeting_criteria_spec.rb
|
212
197
|
- spec/twitter-ads/campaign/app_list_spec.rb
|