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
data/lib/twitter-ads/error.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
|
|
@@ -21,7 +21,7 @@ module TwitterAds
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def inspect
|
24
|
-
str =
|
24
|
+
str = +"#<#{self.class.name}:0x#{object_id}"
|
25
25
|
str << " code=#{@code}" if @code
|
26
26
|
str << " details=\"#{@details}\"" if @details
|
27
27
|
str << '>'
|
@@ -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
|
|
@@ -15,8 +15,8 @@ module TwitterAds
|
|
15
15
|
delete: Net::HTTP::Delete
|
16
16
|
}.freeze
|
17
17
|
|
18
|
-
DEFAULT_DOMAIN = 'https://ads-api.twitter.com'
|
19
|
-
SANDBOX_DOMAIN = 'https://ads-api-sandbox.twitter.com'
|
18
|
+
DEFAULT_DOMAIN = 'https://ads-api.twitter.com'
|
19
|
+
SANDBOX_DOMAIN = 'https://ads-api-sandbox.twitter.com'
|
20
20
|
|
21
21
|
private_constant :DEFAULT_DOMAIN, :SANDBOX_DOMAIN, :HTTP_METHOD
|
22
22
|
|
@@ -80,6 +80,7 @@ module TwitterAds
|
|
80
80
|
|
81
81
|
def http_request
|
82
82
|
request_url = @resource
|
83
|
+
|
83
84
|
if @options[:params] && !@options[:params].empty?
|
84
85
|
request_url += "?#{URI.encode_www_form(@options[:params])}"
|
85
86
|
end
|
@@ -87,7 +88,7 @@ module TwitterAds
|
|
87
88
|
request = HTTP_METHOD[@method].new(request_url)
|
88
89
|
request.body = @options[:body] if @options[:body]
|
89
90
|
|
90
|
-
@options[:headers]
|
91
|
+
@options[:headers]&.each { |header, value| request[header] = value }
|
91
92
|
request['user-agent'] = user_agent
|
92
93
|
|
93
94
|
request
|
@@ -108,7 +109,7 @@ module TwitterAds
|
|
108
109
|
object.each { |header| @client.logger.info("Header: #{header}: #{object[header]}") }
|
109
110
|
|
110
111
|
# suppresses body content for non-Ads API domains (eg. upload.twitter.com)
|
111
|
-
|
112
|
+
unless object.body&.empty?
|
112
113
|
if @domain == SANDBOX_DOMAIN || @domain == DEFAULT_DOMAIN
|
113
114
|
@client.logger.info("Body: #{object.body}")
|
114
115
|
else
|
data/lib/twitter-ads/legacy.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
|
class AppEventTag
|
@@ -19,8 +19,8 @@ module TwitterAds
|
|
19
19
|
property :post_view_attribution_window
|
20
20
|
property :post_engagement_attribution_window
|
21
21
|
|
22
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
23
|
-
'accounts/%{account_id}/app_event_tags'
|
22
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
23
|
+
'accounts/%{account_id}/app_event_tags' # @api private
|
24
24
|
|
25
25
|
def initialize(account)
|
26
26
|
@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 WebEventTag
|
@@ -18,8 +18,8 @@ module TwitterAds
|
|
18
18
|
property :embed_code, read_only: true
|
19
19
|
property :click_window
|
20
20
|
|
21
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
22
|
-
'accounts/%{account_id}/web_event_tags'
|
21
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
22
|
+
'accounts/%{account_id}/web_event_tags' # @api private
|
23
23
|
|
24
24
|
def initialize(account)
|
25
25
|
@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
|
require 'zlib'
|
5
5
|
require 'open-uri'
|
@@ -7,14 +7,24 @@ require 'open-uri'
|
|
7
7
|
module TwitterAds
|
8
8
|
module Analytics
|
9
9
|
|
10
|
+
include TwitterAds::Enum
|
11
|
+
|
10
12
|
ANALYTICS_MAP = {
|
11
|
-
'TwitterAds::Campaign' =>
|
12
|
-
'TwitterAds::LineItem' =>
|
13
|
-
'TwitterAds::OrganicTweet' =>
|
14
|
-
'TwitterAds::Creative::PromotedAccount' =>
|
15
|
-
'TwitterAds::Creative::PromotedTweet' =>
|
13
|
+
'TwitterAds::Campaign' => Entity::CAMPAIGN,
|
14
|
+
'TwitterAds::LineItem' => Entity::LINE_ITEM,
|
15
|
+
'TwitterAds::OrganicTweet' => Entity::ORGANIC_TWEET,
|
16
|
+
'TwitterAds::Creative::PromotedAccount' => Entity::ACCOUNT,
|
17
|
+
'TwitterAds::Creative::PromotedTweet' => Entity::PROMOTED_TWEET,
|
18
|
+
'TwitterAds::Creative::MediaCreative' => Entity::MEDIA_CREATIVE
|
16
19
|
}.freeze
|
17
20
|
|
21
|
+
RESOURCE_STATS = "/#{TwitterAds::API_VERSION}/" +
|
22
|
+
'stats/accounts/%{account_id}' # @api private
|
23
|
+
RESOURCE_ASYNC_STATS = "/#{TwitterAds::API_VERSION}/" +
|
24
|
+
'stats/jobs/accounts/%{account_id}' # @api private
|
25
|
+
RESOURCE_ACTIVE_ENTITIES = "/#{TwitterAds::API_VERSION}/" +
|
26
|
+
'stats/accounts/%{account_id}/active_entities' # @api private
|
27
|
+
|
18
28
|
def self.included(klass)
|
19
29
|
klass.send :include, InstanceMethods
|
20
30
|
klass.extend ClassMethods
|
@@ -70,7 +80,7 @@ module TwitterAds
|
|
70
80
|
def stats(account, ids, metric_groups, opts = {})
|
71
81
|
# set default metric values
|
72
82
|
end_time = opts.fetch(:end_time, (Time.now - Time.now.sec - (60 * Time.now.min)))
|
73
|
-
start_time = opts.fetch(:start_time, end_time -
|
83
|
+
start_time = opts.fetch(:start_time, end_time - (60 * 60 * 24 * 7)) # 7 days ago
|
74
84
|
granularity = opts.fetch(:granularity, :hour)
|
75
85
|
start_utc_offset = opts[:start_utc_offset] || opts[:utc_offset]
|
76
86
|
end_utc_offset = opts[:end_utc_offset] || opts[:utc_offset]
|
@@ -199,7 +209,27 @@ module TwitterAds
|
|
199
209
|
end
|
200
210
|
end
|
201
211
|
|
202
|
-
|
212
|
+
def active_entities(account, start_time:, end_time:, **opts)
|
213
|
+
entity_type = name
|
214
|
+
granularity = opts.fetch(:granularity, nil)
|
215
|
+
start_utc_offset = opts[:start_utc_offset] || opts[:utc_offset]
|
216
|
+
end_utc_offset = opts[:end_utc_offset] || opts[:utc_offset]
|
217
|
+
|
218
|
+
if entity_type == 'OrganicTweet'
|
219
|
+
raise "'OrganicTweet' not support with 'active_entities'"
|
220
|
+
end
|
203
221
|
|
222
|
+
params = {
|
223
|
+
entity: ANALYTICS_MAP[entity_type],
|
224
|
+
start_time: TwitterAds::Utils.to_time(start_time, granularity, start_utc_offset),
|
225
|
+
end_time: TwitterAds::Utils.to_time(end_time, granularity, end_utc_offset)
|
226
|
+
}.merge!(opts)
|
227
|
+
|
228
|
+
resource = self::RESOURCE_ACTIVE_ENTITIES % { account_id: account.id }
|
229
|
+
response = Request.new(account.client, :get, resource, params: params).perform
|
230
|
+
response.body[:data]
|
231
|
+
end
|
232
|
+
|
233
|
+
end
|
204
234
|
end
|
205
235
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Twitter, Inc.
|
3
3
|
|
4
4
|
module TwitterAds
|
5
5
|
module Batch
|
6
6
|
|
7
7
|
CLASS_ID_MAP = {
|
8
|
-
'TwitterAds::LineItem' => 'LINE_ITEM'
|
9
|
-
'TwitterAds::Campaign' => 'CAMPAIGN'
|
10
|
-
'TwitterAds::TargetingCriteria' => 'TARGETING_CRITERION'
|
8
|
+
'TwitterAds::LineItem' => 'LINE_ITEM',
|
9
|
+
'TwitterAds::Campaign' => 'CAMPAIGN',
|
10
|
+
'TwitterAds::TargetingCriteria' => 'TARGETING_CRITERION'
|
11
11
|
}.freeze # @api private
|
12
12
|
|
13
13
|
def self.included(klass)
|
@@ -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 Resource
|
@@ -40,7 +40,7 @@ module TwitterAds
|
|
40
40
|
#
|
41
41
|
# @since 0.1.0
|
42
42
|
def inspect
|
43
|
-
str =
|
43
|
+
str = +"#<#{self.class.name}:0x#{object_id}"
|
44
44
|
str << " id=\"#{@id}\"" if @id
|
45
45
|
str << ' deleted="true"' if @deleted
|
46
46
|
str << '>'
|
@@ -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 TaxSettings
|
@@ -40,8 +40,8 @@ module TwitterAds
|
|
40
40
|
# sdk only
|
41
41
|
property :to_delete, type: :bool
|
42
42
|
|
43
|
-
RESOURCE = "/#{TwitterAds::API_VERSION}/"
|
44
|
-
'accounts/%{account_id}/user_settings/%{id}'
|
43
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" \
|
44
|
+
'accounts/%{account_id}/user_settings/%{id}' # @api private
|
45
45
|
|
46
46
|
def initialize(account)
|
47
47
|
@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 UserSettings
|
@@ -19,8 +19,8 @@ module TwitterAds
|
|
19
19
|
# sdk only
|
20
20
|
property :to_delete, type: :bool
|
21
21
|
|
22
|
-
RESOURCE = "/#{TwitterAds::API_VERSION}/"
|
23
|
-
'accounts/%{account_id}/user_settings/%{id}'
|
22
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" \
|
23
|
+
'accounts/%{account_id}/user_settings/%{id}' # @api private
|
24
24
|
|
25
25
|
def initialize(account)
|
26
26
|
@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 AppStoreCategory
|
@@ -12,8 +12,8 @@ module TwitterAds
|
|
12
12
|
property :targeting_type, read_only: true
|
13
13
|
property :targeting_value, read_only: true
|
14
14
|
|
15
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
16
|
-
'targeting_criteria/app_store_categories'
|
15
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
16
|
+
'targeting_criteria/app_store_categories' # @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 Behavior
|
@@ -16,8 +16,8 @@ module TwitterAds
|
|
16
16
|
property :partner_source, read_only: true
|
17
17
|
property :targetable_type, read_only: true
|
18
18
|
|
19
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
20
|
-
'targeting_criteria/behaviors'
|
19
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
20
|
+
'targeting_criteria/behaviors' # @api private
|
21
21
|
|
22
22
|
def initialize(account)
|
23
23
|
@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 BehaviorTaxonomy
|
@@ -13,8 +13,8 @@ module TwitterAds
|
|
13
13
|
property :created_at, read_only: true
|
14
14
|
property :updated_at, read_only: true
|
15
15
|
|
16
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
17
|
-
'targeting_criteria/behavior_taxonomies'
|
16
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
17
|
+
'targeting_criteria/behavior_taxonomies' # @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 Device
|
@@ -14,8 +14,8 @@ module TwitterAds
|
|
14
14
|
property :platform, read_only: true
|
15
15
|
property :manufacturer, read_only: true
|
16
16
|
|
17
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
18
|
-
'targeting_criteria/devices'
|
17
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
18
|
+
'targeting_criteria/devices' # @api private
|
19
19
|
|
20
20
|
def initialize(account)
|
21
21
|
@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 Event
|
@@ -22,8 +22,8 @@ module TwitterAds
|
|
22
22
|
property :device_breakdown_percentage, read_only: true
|
23
23
|
property :country_breakdown_percentage, read_only: true
|
24
24
|
|
25
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
26
|
-
'targeting_criteria/events'
|
25
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
26
|
+
'targeting_criteria/events' # @api private
|
27
27
|
|
28
28
|
def initialize(account)
|
29
29
|
@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 Interest
|
@@ -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/interests'
|
15
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
16
|
+
'targeting_criteria/interests' # @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 Language
|
@@ -11,8 +11,8 @@ module TwitterAds
|
|
11
11
|
property :targeting_type, read_only: true
|
12
12
|
property :targeting_value, read_only: true
|
13
13
|
|
14
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
15
|
-
'targeting_criteria/languages'
|
14
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
15
|
+
'targeting_criteria/languages' # @api private
|
16
16
|
|
17
17
|
def initialize(account)
|
18
18
|
@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 Location
|
@@ -12,8 +12,8 @@ module TwitterAds
|
|
12
12
|
property :targeting_value, read_only: true
|
13
13
|
property :location_type, read_only: true
|
14
14
|
|
15
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
16
|
-
'targeting_criteria/locations'
|
15
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
16
|
+
'targeting_criteria/locations' # @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 NetworkOperator
|
@@ -12,8 +12,8 @@ module TwitterAds
|
|
12
12
|
property :targeting_value, read_only: true
|
13
13
|
property :country_code, read_only: true
|
14
14
|
|
15
|
-
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/"
|
16
|
-
'targeting_criteria/network_operators'
|
15
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
|
16
|
+
'targeting_criteria/network_operators' # @api private
|
17
17
|
|
18
18
|
def initialize(account)
|
19
19
|
@account = account
|