twitter-ads 0.3.4 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/twitter-ads.rb +18 -0
- data/lib/twitter-ads/account.rb +20 -5
- data/lib/twitter-ads/audiences/tailored_audience.rb +4 -4
- data/lib/twitter-ads/campaign/app_list.rb +2 -2
- data/lib/twitter-ads/campaign/campaign.rb +4 -3
- data/lib/twitter-ads/campaign/funding_instrument.rb +2 -2
- data/lib/twitter-ads/campaign/line_item.rb +12 -14
- data/lib/twitter-ads/campaign/promotable_user.rb +2 -2
- data/lib/twitter-ads/campaign/targeting_criteria.rb +2 -2
- data/lib/twitter-ads/campaign/tweet.rb +5 -4
- data/lib/twitter-ads/creative/account_media.rb +36 -0
- data/lib/twitter-ads/creative/app_download_card.rb +2 -2
- data/lib/twitter-ads/creative/image_app_download_card.rb +2 -2
- data/lib/twitter-ads/creative/image_conversation_card.rb +2 -2
- data/lib/twitter-ads/creative/lead_gen_card.rb +2 -2
- data/lib/twitter-ads/creative/media_creative.rb +37 -0
- data/lib/twitter-ads/creative/promoted_account.rb +4 -3
- data/lib/twitter-ads/creative/promoted_tweet.rb +4 -3
- data/lib/twitter-ads/creative/video.rb +2 -2
- data/lib/twitter-ads/creative/video_app_download_card.rb +2 -2
- data/lib/twitter-ads/creative/video_conversation_card.rb +2 -2
- data/lib/twitter-ads/creative/website_card.rb +2 -2
- data/lib/twitter-ads/enum.rb +49 -2
- data/lib/twitter-ads/http/request.rb +2 -2
- data/lib/twitter-ads/resources/analytics.rb +129 -24
- data/lib/twitter-ads/resources/dsl.rb +1 -1
- data/lib/twitter-ads/targeting/reach_estimate.rb +17 -10
- data/lib/twitter-ads/targeting_criteria/app_store_category.rb +22 -0
- data/lib/twitter-ads/targeting_criteria/behavior.rb +26 -0
- data/lib/twitter-ads/targeting_criteria/behavior_taxonomy.rb +23 -0
- data/lib/twitter-ads/targeting_criteria/device.rb +24 -0
- data/lib/twitter-ads/targeting_criteria/event.rb +32 -0
- data/lib/twitter-ads/targeting_criteria/interest.rb +22 -0
- data/lib/twitter-ads/targeting_criteria/language.rb +21 -0
- data/lib/twitter-ads/targeting_criteria/location.rb +22 -0
- data/lib/twitter-ads/targeting_criteria/network_operator.rb +22 -0
- data/lib/twitter-ads/targeting_criteria/platform.rb +22 -0
- data/lib/twitter-ads/targeting_criteria/platform_version.rb +23 -0
- data/lib/twitter-ads/targeting_criteria/tv_channel.rb +20 -0
- data/lib/twitter-ads/targeting_criteria/tv_genre.rb +20 -0
- data/lib/twitter-ads/targeting_criteria/tv_market.rb +22 -0
- data/lib/twitter-ads/targeting_criteria/tv_show.rb +22 -0
- data/lib/twitter-ads/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/twitter-ads/campaign/app_list_spec.rb +1 -1
- data/spec/twitter-ads/campaign/line_item_spec.rb +0 -22
- data/spec/twitter-ads/campaign/reach_estimate_spec.rb +16 -11
- data/spec/twitter-ads/campaign/tweet_spec.rb +2 -2
- data/spec/twitter-ads/client_spec.rb +1 -1
- data/spec/twitter-ads/creative/account_media_spec.rb +32 -0
- data/spec/twitter-ads/creative/media_creative_spec.rb +32 -0
- metadata +44 -22
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a50bc00ab21ca3c398e31b761134e6ec380f364
|
4
|
+
data.tar.gz: bb364bf536c4d0263ceb9cbb344b6f92b7dd970f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72b852ad83d11e5ec80fbffff9bc89d5a19da8825075eeccd78e9ae9353cad4e281a85822925d52f3521ef61e0fdedb65e886d96d015b33a97ab914392567c9d
|
7
|
+
data.tar.gz: b13816066362a49a23d8ddb31b57faf58b4eceb7be3e5afcf51c088cbbaae9a4e5c2159c313f8a1a12815cd0771f6a6bedb36bb93bc95ba5a251b3eee483b416
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/twitter-ads.rb
CHANGED
@@ -38,10 +38,28 @@ require 'twitter-ads/campaign/tweet'
|
|
38
38
|
|
39
39
|
require 'twitter-ads/enum'
|
40
40
|
|
41
|
+
require 'twitter-ads/targeting_criteria/tv_market'
|
42
|
+
require 'twitter-ads/targeting_criteria/tv_channel'
|
43
|
+
require 'twitter-ads/targeting_criteria/tv_genre'
|
44
|
+
require 'twitter-ads/targeting_criteria/tv_show'
|
45
|
+
require 'twitter-ads/targeting_criteria/event'
|
46
|
+
require 'twitter-ads/targeting_criteria/device'
|
47
|
+
require 'twitter-ads/targeting_criteria/platform'
|
48
|
+
require 'twitter-ads/targeting_criteria/platform_version'
|
49
|
+
require 'twitter-ads/targeting_criteria/network_operator'
|
50
|
+
require 'twitter-ads/targeting_criteria/location'
|
51
|
+
require 'twitter-ads/targeting_criteria/interest'
|
52
|
+
require 'twitter-ads/targeting_criteria/language'
|
53
|
+
require 'twitter-ads/targeting_criteria/behavior'
|
54
|
+
require 'twitter-ads/targeting_criteria/behavior_taxonomy'
|
55
|
+
require 'twitter-ads/targeting_criteria/app_store_category'
|
56
|
+
|
41
57
|
require 'twitter-ads/creative/app_download_card'
|
58
|
+
require 'twitter-ads/creative/account_media'
|
42
59
|
require 'twitter-ads/creative/image_app_download_card'
|
43
60
|
require 'twitter-ads/creative/image_conversation_card'
|
44
61
|
require 'twitter-ads/creative/lead_gen_card'
|
62
|
+
require 'twitter-ads/creative/media_creative'
|
45
63
|
require 'twitter-ads/creative/promoted_account'
|
46
64
|
require 'twitter-ads/creative/promoted_tweet'
|
47
65
|
require 'twitter-ads/creative/video_app_download_card'
|
data/lib/twitter-ads/account.rb
CHANGED
@@ -17,11 +17,11 @@ module TwitterAds
|
|
17
17
|
property :updated_at, type: :time, read_only: true
|
18
18
|
property :deleted, type: :bool, read_only: true
|
19
19
|
|
20
|
-
RESOURCE_COLLECTION = '/
|
21
|
-
RESOURCE = '/
|
22
|
-
FEATURES = '/
|
23
|
-
SCOPED_TIMELINE = '/
|
24
|
-
AUTHENTICATED_USER_ACCESS = '/
|
20
|
+
RESOURCE_COLLECTION = '/1/accounts'.freeze # @api private
|
21
|
+
RESOURCE = '/1/accounts/%{id}'.freeze # @api private
|
22
|
+
FEATURES = '/1/accounts/%{id}/features'.freeze # @api private
|
23
|
+
SCOPED_TIMELINE = '/1/accounts/%{id}/scoped_timeline'.freeze # @api private
|
24
|
+
AUTHENTICATED_USER_ACCESS = '/1/accounts/%{id}/authenticated_user_access'.freeze # @api private
|
25
25
|
|
26
26
|
def initialize(client)
|
27
27
|
@client = client
|
@@ -103,6 +103,21 @@ module TwitterAds
|
|
103
103
|
load_resource(PromotableUser, id, opts)
|
104
104
|
end
|
105
105
|
|
106
|
+
# Returns a collection of promoted tweets available to the current account.
|
107
|
+
#
|
108
|
+
# @param id [String] The PromotedTweet ID value.
|
109
|
+
# @param opts [Hash] A Hash of extended options.
|
110
|
+
# @option opts [String] :line_item_ids Scope the result to collection of line item IDs.
|
111
|
+
# @option opts [Boolean] :with_deleted Indicates if deleted items should be included.
|
112
|
+
# @option opts [String] :sort_by The object param to sort the API response by.
|
113
|
+
#
|
114
|
+
# @return A Cursor or object instance.
|
115
|
+
#
|
116
|
+
# @since 1.0.0
|
117
|
+
def promotable_tweets(id = nil, opts = {})
|
118
|
+
load_resource(Creative::PromotedTweet, id, opts)
|
119
|
+
end
|
120
|
+
|
106
121
|
# Returns a collection of funding instruments available to the current account.
|
107
122
|
#
|
108
123
|
# @param id [String] The FundingInstrument ID value.
|
@@ -25,11 +25,11 @@ module TwitterAds
|
|
25
25
|
property :targetable, type: :bool, read_only: true
|
26
26
|
property :targetable_types, read_only: true
|
27
27
|
|
28
|
-
RESOURCE_COLLECTION = '/
|
29
|
-
RESOURCE = '/
|
30
|
-
RESOURCE_UPDATE = '/
|
28
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/tailored_audiences'.freeze # @api private
|
29
|
+
RESOURCE = '/1/accounts/%{account_id}/tailored_audiences/%{id}'.freeze # @api private
|
30
|
+
RESOURCE_UPDATE = '/1/accounts/%{account_id}/tailored_audience_changes'.freeze # @api private
|
31
31
|
GLOBAL_OPT_OUT =
|
32
|
-
'/
|
32
|
+
'/1/accounts/%{account_id}/tailored_audiences/global_opt_out'.freeze # @api private
|
33
33
|
|
34
34
|
LIST_TYPES = %w(
|
35
35
|
EMAIL
|
@@ -13,8 +13,8 @@ module TwitterAds
|
|
13
13
|
property :apps, read_only: true
|
14
14
|
property :name, read_only: true
|
15
15
|
|
16
|
-
RESOURCE_COLLECTION = '/
|
17
|
-
RESOURCE = '/
|
16
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/app_lists'.freeze # @api private
|
17
|
+
RESOURCE = '/1/accounts/%{account_id}/app_lists/%{id}'.freeze # @api private
|
18
18
|
|
19
19
|
def initialize(account)
|
20
20
|
@account = account
|
@@ -27,9 +27,10 @@ module TwitterAds
|
|
27
27
|
property :daily_budget_amount_local_micro
|
28
28
|
property :total_budget_amount_local_micro
|
29
29
|
|
30
|
-
RESOURCE_COLLECTION = '/
|
31
|
-
RESOURCE_STATS = '/
|
32
|
-
|
30
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/campaigns'.freeze # @api private
|
31
|
+
RESOURCE_STATS = '/1/stats/accounts/%{account_id}'.freeze # @api private
|
32
|
+
RESOURCE_ASYNC_STATS = '/1/stats/jobs/accounts/%{account_id}'.freeze # @api private
|
33
|
+
RESOURCE = '/1/accounts/%{account_id}/campaigns/%{id}'.freeze # @api private
|
33
34
|
|
34
35
|
def initialize(account)
|
35
36
|
@account = account
|
@@ -21,8 +21,8 @@ module TwitterAds
|
|
21
21
|
property :updated_at, type: :time, read_only: true
|
22
22
|
property :deleted, type: :bool, read_only: true
|
23
23
|
|
24
|
-
RESOURCE_COLLECTION = '/
|
25
|
-
RESOURCE = '/
|
24
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/funding_instruments'.freeze # @api private
|
25
|
+
RESOURCE = '/1/accounts/%{account_id}/funding_instruments/%{id}'.freeze # @api private
|
26
26
|
|
27
27
|
def initialize(account)
|
28
28
|
@account = account
|
@@ -33,24 +33,22 @@ module TwitterAds
|
|
33
33
|
property :bid_amount_local_micro
|
34
34
|
property :total_budget_amount_local_micro
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
# beta (not yet generally available)
|
37
|
+
property :advertiser_user_id
|
38
|
+
property :bid_type
|
39
|
+
property :tracking_tags
|
40
|
+
|
41
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/line_items'.freeze # @api private
|
42
|
+
RESOURCE_STATS = '/1/stats/accounts/%{account_id}'.freeze # @api private
|
43
|
+
RESOURCE_ASYNC_STATS = '/1/stats/jobs/accounts/%{account_id}'.freeze # @api private
|
44
|
+
RESOURCE = '/1/accounts/%{account_id}/line_items/%{id}'.freeze # @api private
|
45
|
+
RESOURCE_PLACEMENTS = '/1/line_items/placements'.freeze # @api private
|
39
46
|
|
40
47
|
def initialize(account)
|
41
48
|
@account = account
|
42
49
|
self
|
43
50
|
end
|
44
51
|
|
45
|
-
# Overload for CUSTOM objective deprecation warning.
|
46
|
-
# @private
|
47
|
-
def objective=(value)
|
48
|
-
if value == TwitterAds::Objective::CUSTOM
|
49
|
-
TwitterAds::Utils.deprecated('TwitterAds::Objective::CUSTOM')
|
50
|
-
end
|
51
|
-
@objective = value
|
52
|
-
end
|
53
|
-
|
54
52
|
class << self
|
55
53
|
|
56
54
|
# Helper method to return a list a valid placement combinations by Product.
|
@@ -65,9 +63,9 @@ module TwitterAds
|
|
65
63
|
# @since 0.3.2
|
66
64
|
# @see https://dev.twitter.com/ads/reference/get/line_items/placements
|
67
65
|
def placements(client, product_type = nil)
|
68
|
-
resource = '/0/line_items/placements'
|
69
66
|
params = { product_type: product_type } if product_type
|
70
|
-
response = TwitterAds::Request.new(client, :get,
|
67
|
+
response = TwitterAds::Request.new(client, :get,
|
68
|
+
RESOURCE_PLACEMENTS, params: params).perform
|
71
69
|
response.body[:data][0][:placements]
|
72
70
|
end
|
73
71
|
|
@@ -16,8 +16,8 @@ module TwitterAds
|
|
16
16
|
property :updated_at, type: :time, read_only: true
|
17
17
|
property :deleted, type: :bool, read_only: true
|
18
18
|
|
19
|
-
RESOURCE_COLLECTION = '/
|
20
|
-
RESOURCE = '/
|
19
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/promotable_users'.freeze # @api private
|
20
|
+
RESOURCE = '/1/accounts/%{account_id}/promotable_users/%{id}'.freeze # @api private
|
21
21
|
|
22
22
|
def initialize(account)
|
23
23
|
@account = account
|
@@ -23,8 +23,8 @@ module TwitterAds
|
|
23
23
|
property :tailored_audience_expansion, type: :bool
|
24
24
|
property :tailored_audience_type
|
25
25
|
|
26
|
-
RESOURCE_COLLECTION = '/
|
27
|
-
RESOURCE = '/
|
26
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/targeting_criteria'.freeze # @api private
|
27
|
+
RESOURCE = '/1/accounts/%{account_id}/targeting_criteria/%{id}'.freeze # @api private
|
28
28
|
|
29
29
|
def initialize(account)
|
30
30
|
@account = account
|
@@ -7,10 +7,11 @@ module TwitterAds
|
|
7
7
|
# cannot instaniate Tweet, only including class methods for stats
|
8
8
|
extend TwitterAds::Analytics::ClassMethods
|
9
9
|
|
10
|
-
RESOURCE_COLLECTION = '/
|
11
|
-
RESOURCE_STATS = '/
|
12
|
-
|
13
|
-
|
10
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/tweet/preview'.freeze # @api private
|
11
|
+
RESOURCE_STATS = '/1/stats/accounts/%{account_id}'.freeze # @api private
|
12
|
+
RESOURCE_ASYNC_STATS = '/1/stats/jobs/accounts/%{account_id}'.freeze # @api private
|
13
|
+
RESOURCE = '/1/accounts/%{account_id}/tweet/preview/%{id}'.freeze # @api private
|
14
|
+
RESOURCE_CREATE = '/1/accounts/%{account_id}/tweet'.freeze # @api private
|
14
15
|
|
15
16
|
class << self
|
16
17
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Copyright (C) 2015 Twitter, Inc.
|
3
|
+
|
4
|
+
module TwitterAds
|
5
|
+
module Creative
|
6
|
+
|
7
|
+
class AccountMedia
|
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 :deleted, type: :bool, read_only: true
|
17
|
+
property :created_at, type: :time, read_only: true
|
18
|
+
property :updated_at, type: :time, read_only: true
|
19
|
+
property :media_url, read_only: true
|
20
|
+
|
21
|
+
property :media_id
|
22
|
+
property :creative_type
|
23
|
+
property :video_id
|
24
|
+
|
25
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/account_media'.freeze # @api private
|
26
|
+
RESOURCE = '/1/accounts/%{account_id}/account_media/%{id}'.freeze # @api private
|
27
|
+
|
28
|
+
def initialize(account)
|
29
|
+
@account = account
|
30
|
+
self
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
@@ -30,8 +30,8 @@ module TwitterAds
|
|
30
30
|
property :custom_icon_media_id
|
31
31
|
property :custom_app_description
|
32
32
|
|
33
|
-
RESOURCE_COLLECTION = '/
|
34
|
-
RESOURCE = '/
|
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
35
|
|
36
36
|
def initialize(account)
|
37
37
|
@account = account
|
@@ -30,8 +30,8 @@ module TwitterAds
|
|
30
30
|
property :wide_app_image_media_id
|
31
31
|
|
32
32
|
RESOURCE_COLLECTION =
|
33
|
-
'/
|
34
|
-
RESOURCE = '/
|
33
|
+
'/1/accounts/%{account_id}/cards/image_app_download'.freeze # @api private
|
34
|
+
RESOURCE = '/1/accounts/%{account_id}/cards/image_app_download/%{id}'.freeze # @api private
|
35
35
|
|
36
36
|
def initialize(account)
|
37
37
|
@account = account
|
@@ -30,8 +30,8 @@ module TwitterAds
|
|
30
30
|
property :image_media_id
|
31
31
|
|
32
32
|
RESOURCE_COLLECTION =
|
33
|
-
'/
|
34
|
-
RESOURCE = '/
|
33
|
+
'/1/accounts/%{account_id}/cards/image_conversation'.freeze # @api private
|
34
|
+
RESOURCE = '/1/accounts/%{account_id}/cards/image_conversation/%{id}'.freeze # @api private
|
35
35
|
|
36
36
|
def initialize(account)
|
37
37
|
@account = account
|
@@ -32,8 +32,8 @@ module TwitterAds
|
|
32
32
|
property :custom_key_name
|
33
33
|
property :custom_key_email
|
34
34
|
|
35
|
-
RESOURCE_COLLECTION = '/
|
36
|
-
RESOURCE = '/
|
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
37
|
|
38
38
|
def initialize(account)
|
39
39
|
@account = account
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Copyright (C) 2015 Twitter, Inc.
|
3
|
+
|
4
|
+
module TwitterAds
|
5
|
+
module Creative
|
6
|
+
|
7
|
+
class MediaCreative
|
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 :deleted, type: :bool, read_only: true
|
17
|
+
property :created_at, type: :time, read_only: true
|
18
|
+
property :updated_at, type: :time, read_only: true
|
19
|
+
property :approval_status, read_only: true
|
20
|
+
property :serving_status, read_only: true
|
21
|
+
|
22
|
+
property :line_item_id
|
23
|
+
property :account_media_id
|
24
|
+
property :landing_url
|
25
|
+
|
26
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/media_creatives'.freeze # @api private
|
27
|
+
RESOURCE = '/1/accounts/%{account_id}/media_creatives/%{id}'.freeze # @api private
|
28
|
+
|
29
|
+
def initialize(account)
|
30
|
+
@account = account
|
31
|
+
self
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
@@ -23,9 +23,10 @@ module TwitterAds
|
|
23
23
|
property :user_id
|
24
24
|
property :paused, type: :bool
|
25
25
|
|
26
|
-
RESOURCE_COLLECTION = '/
|
27
|
-
RESOURCE_STATS = '/
|
28
|
-
|
26
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/promoted_accounts'.freeze # @api private
|
27
|
+
RESOURCE_STATS = '/1/stats/accounts/%{account_id}'.freeze # @api private
|
28
|
+
RESOURCE_ASYNC_STATS = '/1/stats/jobs/accounts/%{account_id}'.freeze # @api private
|
29
|
+
RESOURCE = '/1/accounts/%{account_id}/promoted_accounts/%{id}'.freeze # @api private
|
29
30
|
|
30
31
|
def initialize(account)
|
31
32
|
@account = account
|
@@ -23,9 +23,10 @@ module TwitterAds
|
|
23
23
|
property :tweet_id
|
24
24
|
property :paused, type: :bool
|
25
25
|
|
26
|
-
RESOURCE_COLLECTION = '/
|
27
|
-
RESOURCE_STATS = '/
|
28
|
-
|
26
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/promoted_tweets'.freeze # @api private
|
27
|
+
RESOURCE_STATS = '/1/stats/accounts/%{account_id}'.freeze # @api private
|
28
|
+
RESOURCE_ASYNC_STATS = '/1/stats/jobs/accounts/%{account_id}'.freeze # @api private
|
29
|
+
RESOURCE = '/1/accounts/%{account_id}/promoted_tweets/%{id}'.freeze # @api private
|
29
30
|
|
30
31
|
def initialize(account)
|
31
32
|
@account = account
|
@@ -26,8 +26,8 @@ module TwitterAds
|
|
26
26
|
property :description
|
27
27
|
property :video_media_id
|
28
28
|
|
29
|
-
RESOURCE_COLLECTION = '/
|
30
|
-
RESOURCE = '/
|
29
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/videos'.freeze # @api private
|
30
|
+
RESOURCE = '/1/accounts/%{account_id}/videos/%{id}'.freeze # @api private
|
31
31
|
|
32
32
|
def initialize(account)
|
33
33
|
@account = account
|
@@ -33,8 +33,8 @@ module TwitterAds
|
|
33
33
|
property :video_id
|
34
34
|
|
35
35
|
RESOURCE_COLLECTION =
|
36
|
-
'/
|
37
|
-
RESOURCE = '/
|
36
|
+
'/1/accounts/%{account_id}/cards/video_app_download'.freeze # @api private
|
37
|
+
RESOURCE = '/1/accounts/%{account_id}/cards/video_app_download/%{id}'.freeze # @api private
|
38
38
|
|
39
39
|
def initialize(account)
|
40
40
|
@account = account
|
@@ -32,8 +32,8 @@ module TwitterAds
|
|
32
32
|
property :video_id
|
33
33
|
|
34
34
|
RESOURCE_COLLECTION =
|
35
|
-
'/
|
36
|
-
RESOURCE = '/
|
35
|
+
'/1/accounts/%{account_id}/cards/video_conversation'.freeze # @api private
|
36
|
+
RESOURCE = '/1/accounts/%{account_id}/cards/video_conversation/%{id}'.freeze # @api private
|
37
37
|
|
38
38
|
def initialize(account)
|
39
39
|
@account = account
|
@@ -26,8 +26,8 @@ module TwitterAds
|
|
26
26
|
property :website_cta
|
27
27
|
property :image_media_id
|
28
28
|
|
29
|
-
RESOURCE_COLLECTION = '/
|
30
|
-
RESOURCE = '/
|
29
|
+
RESOURCE_COLLECTION = '/1/accounts/%{account_id}/cards/website'.freeze # @api private
|
30
|
+
RESOURCE = '/1/accounts/%{account_id}/cards/website/%{id}'.freeze # @api private
|
31
31
|
|
32
32
|
def initialize(account)
|
33
33
|
@account = account
|
data/lib/twitter-ads/enum.rb
CHANGED
@@ -15,8 +15,6 @@ module TwitterAds
|
|
15
15
|
VIDEO_VIEWS = 'VIDEO_VIEWS'.freeze
|
16
16
|
WEBSITE_CLICKS = 'WEBSITE_CLICKS'.freeze
|
17
17
|
|
18
|
-
# @deprecated
|
19
|
-
CUSTOM = 'CUSTOM'.freeze
|
20
18
|
end
|
21
19
|
|
22
20
|
module Product
|
@@ -64,6 +62,13 @@ module TwitterAds
|
|
64
62
|
LEAD = 'LEAD'.freeze
|
65
63
|
LINK_CLICK = 'LINK_CLICK'.freeze
|
66
64
|
VIEW = 'VIEW'.freeze
|
65
|
+
VIEW_3S_100PCT = 'VIEW_3S_100PCT'.freeze
|
66
|
+
end
|
67
|
+
|
68
|
+
module BidType
|
69
|
+
MAX = 'MAX'.freeze
|
70
|
+
AUTO = 'AUTO'.freeze
|
71
|
+
TARGET = 'TARGET'.freeze
|
67
72
|
end
|
68
73
|
|
69
74
|
module ChargeBy
|
@@ -74,6 +79,39 @@ module TwitterAds
|
|
74
79
|
LEAD = 'LEAD'.freeze
|
75
80
|
LINK_CLICK = 'LINK_CLICK'.freeze
|
76
81
|
VIEW = 'VIEW'.freeze
|
82
|
+
VIEW_3S_100PCT = 'VIEW_3S_100PCT'.freeze
|
83
|
+
end
|
84
|
+
|
85
|
+
module MetricGroup
|
86
|
+
ENGAGEMENT = 'ENGAGEMENT'.freeze
|
87
|
+
WEB_CONVERSION = 'WEB_CONVERSION'.freeze
|
88
|
+
MOBILE_CONVERSION = 'MOBILE_CONVERSION'.freeze
|
89
|
+
MEDIA = 'MEDIA'.freeze
|
90
|
+
VIDEO = 'VIDEO'.freeze
|
91
|
+
BILLING = 'BILLING'.freeze
|
92
|
+
LIFE_TIME_VALUE_MOBILE_CONVERSION = 'LIFE_TIME_VALUE_MOBILE_CONVERSION'.freeze
|
93
|
+
end
|
94
|
+
|
95
|
+
module JobStatus
|
96
|
+
QUEUED = 'QUEUED'.freeze
|
97
|
+
PROCESSING = 'PROCESSING'.freeze
|
98
|
+
UPLOADING = 'UPLOADING'.freeze
|
99
|
+
SUCCESS = 'SUCCESS'.freeze
|
100
|
+
FAILED = 'FAILED'.freeze
|
101
|
+
end
|
102
|
+
|
103
|
+
module Entity
|
104
|
+
ACCOUNT = 'ACCOUNT'.freeze
|
105
|
+
FUNDING_INSTRUMENT = 'FUNDING_INSTRUMENT'.freeze
|
106
|
+
CAMPAIGN = 'CAMPAIGN'.freeze
|
107
|
+
LINE_ITEM = 'LINE_ITEM'.freeze
|
108
|
+
PROMOTED_TWEET = 'PROMOTED_TWEET'.freeze
|
109
|
+
ORGANIC_TWEET = 'ORGANIC_TWEET'.freeze
|
110
|
+
end
|
111
|
+
|
112
|
+
module CreativeType
|
113
|
+
BANNER = 'BANNER'.freeze
|
114
|
+
INTERSTITIAL = 'INTERSTITIAL'.freeze
|
77
115
|
end
|
78
116
|
|
79
117
|
module Optimizations
|
@@ -131,5 +169,14 @@ module TwitterAds
|
|
131
169
|
REPLACE = 'REPLACE'.freeze
|
132
170
|
end
|
133
171
|
|
172
|
+
module PermissionLevel
|
173
|
+
READ_ONLY = 'READ_ONLY'.freeze
|
174
|
+
READ_WRITE = 'READ_WRITE'.freeze
|
175
|
+
end
|
176
|
+
|
177
|
+
module TrackingPartner
|
178
|
+
DOUBLE_CLICK = 'DOUBLE_CLICK'.freeze
|
179
|
+
end
|
180
|
+
|
134
181
|
end
|
135
182
|
end
|