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
@@ -12,26 +12,34 @@ module TwitterAds
|
|
12
12
|
|
13
13
|
attr_reader :account
|
14
14
|
|
15
|
+
property :card_type, read_only: true
|
16
|
+
property :card_uri, read_only: true
|
17
|
+
property :created_at, type: :time, read_only: true
|
18
|
+
property :deleted, type: :bool, read_only: true
|
15
19
|
property :id, read_only: true
|
16
|
-
property :preview_url, read_only: true
|
17
20
|
property :image, read_only: true
|
18
|
-
property :
|
19
|
-
property :created_at, type: :time, read_only: true
|
21
|
+
property :preview_url, read_only: true
|
20
22
|
property :updated_at, type: :time, read_only: true
|
21
23
|
|
22
|
-
property :
|
23
|
-
property :title
|
24
|
+
property :cover_image_id
|
24
25
|
property :first_cta
|
25
26
|
property :first_cta_tweet
|
27
|
+
property :fourth_cta
|
28
|
+
property :fourth_cta_tweet
|
29
|
+
property :image_media_id
|
30
|
+
property :name
|
26
31
|
property :second_cta
|
27
32
|
property :second_cta_tweet
|
28
33
|
property :thank_you_text
|
29
34
|
property :thank_you_url
|
30
|
-
property :
|
35
|
+
property :third_cta
|
36
|
+
property :third_cta_tweet
|
37
|
+
property :title
|
31
38
|
|
32
|
-
RESOURCE_COLLECTION =
|
33
|
-
|
34
|
-
RESOURCE =
|
39
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
|
40
|
+
'accounts/%{account_id}/cards/image_conversation'.freeze # @api private
|
41
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" +
|
42
|
+
'accounts/%{account_id}/cards/image_conversation/%{id}'.freeze # @api private
|
35
43
|
|
36
44
|
def initialize(account)
|
37
45
|
@account = account
|
@@ -12,19 +12,21 @@ module TwitterAds
|
|
12
12
|
|
13
13
|
attr_reader :account
|
14
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
15
|
property :approval_status, read_only: true
|
16
|
+
property :created_at, type: :time, read_only: true
|
17
|
+
property :deleted, type: :bool, read_only: true
|
18
|
+
property :id, read_only: true
|
20
19
|
property :serving_status, read_only: true
|
20
|
+
property :updated_at, type: :time, read_only: true
|
21
21
|
|
22
|
-
property :line_item_id
|
23
22
|
property :account_media_id
|
23
|
+
property :line_item_id
|
24
24
|
property :landing_url
|
25
25
|
|
26
|
-
RESOURCE_COLLECTION =
|
27
|
-
|
26
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
|
27
|
+
'accounts/%{account_id}/media_creatives'.freeze # @api private
|
28
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" +
|
29
|
+
'accounts/%{account_id}/media_creatives/%{id}'.freeze # @api private
|
28
30
|
|
29
31
|
def initialize(account)
|
30
32
|
@account = account
|
@@ -23,10 +23,14 @@ module TwitterAds
|
|
23
23
|
property :user_id
|
24
24
|
property :paused, type: :bool
|
25
25
|
|
26
|
-
RESOURCE_COLLECTION
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
|
27
|
+
'accounts/%{account_id}/promoted_accounts'.freeze # @api private
|
28
|
+
RESOURCE_STATS = "/#{TwitterAds::API_VERSION}/" +
|
29
|
+
'stats/accounts/%{account_id}'.freeze # @api private
|
30
|
+
RESOURCE_ASYNC_STATS = "/#{TwitterAds::API_VERSION}/" +
|
31
|
+
'stats/jobs/accounts/%{account_id}'.freeze # @api private
|
32
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" +
|
33
|
+
'accounts/%{account_id}/promoted_accounts/%{id}'.freeze # @api private
|
30
34
|
|
31
35
|
def initialize(account)
|
32
36
|
@account = account
|
@@ -18,15 +18,19 @@ module TwitterAds
|
|
18
18
|
property :created_at, type: :time, read_only: true
|
19
19
|
property :updated_at, type: :time, read_only: true
|
20
20
|
property :deleted, type: :bool, read_only: true
|
21
|
+
property :entity_status, read_only: true
|
21
22
|
|
22
23
|
property :line_item_id
|
23
24
|
property :tweet_id
|
24
|
-
property :paused, type: :bool
|
25
25
|
|
26
|
-
RESOURCE_COLLECTION
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
|
27
|
+
'accounts/%{account_id}/promoted_tweets'.freeze # @api private
|
28
|
+
RESOURCE_STATS = "/#{TwitterAds::API_VERSION}/" +
|
29
|
+
'stats/accounts/%{account_id}'.freeze # @api private
|
30
|
+
RESOURCE_ASYNC_STATS = "/#{TwitterAds::API_VERSION}/" +
|
31
|
+
'stats/jobs/accounts/%{account_id}'.freeze # @api private
|
32
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" +
|
33
|
+
'accounts/%{account_id}/promoted_tweets/%{id}'.freeze # @api private
|
30
34
|
|
31
35
|
def initialize(account)
|
32
36
|
@account = account
|
@@ -52,9 +56,7 @@ module TwitterAds
|
|
52
56
|
params[:tweet_ids] = *params.delete(:tweet_id) if params.key?(:tweet_id)
|
53
57
|
|
54
58
|
if @id
|
55
|
-
|
56
|
-
response = Request.new(account.client, :put, resource, params: params).perform
|
57
|
-
from_response(response.body[:data])
|
59
|
+
raise TwitterAds::NotFound.new(nil, 'Method PUT not allowed.', 404)
|
58
60
|
else
|
59
61
|
resource = self.class::RESOURCE_COLLECTION % { account_id: account.id }
|
60
62
|
response = Request.new(account.client, :post, resource, params: params).perform
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Copyright (C) 2015 Twitter, Inc.
|
3
|
+
|
4
|
+
module TwitterAds
|
5
|
+
module Creative
|
6
|
+
|
7
|
+
class ScheduledTweet
|
8
|
+
|
9
|
+
include TwitterAds::DSL
|
10
|
+
include TwitterAds::Resource
|
11
|
+
include TwitterAds::Persistence
|
12
|
+
|
13
|
+
attr_reader :account
|
14
|
+
|
15
|
+
# read-only
|
16
|
+
property :completed_at, type: :time, read_only: true
|
17
|
+
property :created_at, type: :time, read_only: true
|
18
|
+
property :id, read_only: true
|
19
|
+
property :id_str, read_only: true
|
20
|
+
property :media_keys, read_only: true
|
21
|
+
property :scheduled_status, read_only: true
|
22
|
+
property :tweet_id, read_only: true
|
23
|
+
property :updated_at, type: :time, read_only: true
|
24
|
+
property :user_id, read_only: true
|
25
|
+
|
26
|
+
# writable
|
27
|
+
property :as_user_id
|
28
|
+
property :card_uri
|
29
|
+
property :media_ids
|
30
|
+
property :nullcast, type: :bool
|
31
|
+
property :scheduled_at, type: :time
|
32
|
+
property :text
|
33
|
+
|
34
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
|
35
|
+
'accounts/%{account_id}/scheduled_tweets'.freeze # @api private
|
36
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" +
|
37
|
+
'accounts/%{account_id}/scheduled_tweets/%{id}'.freeze # @api private
|
38
|
+
PREVIEW = "/#{TwitterAds::API_VERSION}/" +
|
39
|
+
'accounts/%{account_id}/scheduled_tweets/preview/%{id}'.freeze # @api private
|
40
|
+
|
41
|
+
def preview(account, opts = {})
|
42
|
+
if @id
|
43
|
+
resource = self.class::PREVIEW % { account_id: account.id, id: id }
|
44
|
+
response = TwitterAds::Request.new(account.client, :get, resource, params: opts).perform
|
45
|
+
response.body[:data]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def initialize(account)
|
50
|
+
@account = account
|
51
|
+
self
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
@@ -12,22 +12,28 @@ module TwitterAds
|
|
12
12
|
|
13
13
|
attr_reader :account
|
14
14
|
|
15
|
+
property :aspect_ratio, read_only: true
|
16
|
+
property :created_at, type: :time, read_only: true
|
17
|
+
property :deleted, type: :bool, read_only: true
|
18
|
+
property :duration, read_only: true
|
15
19
|
property :id, read_only: true
|
16
|
-
property :
|
20
|
+
property :media_key, read_only: true
|
21
|
+
property :poster_url, read_only: true
|
22
|
+
property :preview_url, read_only: true
|
17
23
|
property :ready_to_tweet, type: :bool, read_only: true
|
18
|
-
property :duration, read_only: true
|
19
24
|
property :reasons_not_servable, read_only: true
|
20
|
-
property :
|
21
|
-
property :created_at, type: :time, read_only: true
|
25
|
+
property :tweeted, type: :bool, read_only: true
|
22
26
|
property :updated_at, type: :time, read_only: true
|
23
|
-
property :deleted, type: :bool, read_only: true
|
24
27
|
|
25
|
-
property :title
|
26
28
|
property :description
|
29
|
+
property :poster_image_media_id
|
30
|
+
property :title
|
27
31
|
property :video_media_id
|
28
32
|
|
29
|
-
RESOURCE_COLLECTION =
|
30
|
-
|
33
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
|
34
|
+
'accounts/%{account_id}/videos'.freeze # @api private
|
35
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" +
|
36
|
+
'accounts/%{account_id}/videos/%{id}'.freeze # @api private
|
31
37
|
|
32
38
|
def initialize(account)
|
33
39
|
@account = account
|
@@ -12,29 +12,35 @@ module TwitterAds
|
|
12
12
|
|
13
13
|
attr_reader :account
|
14
14
|
|
15
|
+
property :card_type, read_only: true
|
16
|
+
property :card_uri, read_only: true
|
17
|
+
property :created_at, type: :time, read_only: true
|
18
|
+
property :deleted, type: :bool, read_only: true
|
15
19
|
property :id, read_only: true
|
16
20
|
property :preview_url, read_only: true
|
17
|
-
property :video_url, read_only: true
|
18
|
-
property :video_poster_url, read_only: true
|
19
|
-
property :deleted, type: :bool, read_only: true
|
20
|
-
property :created_at, type: :time, read_only: true
|
21
21
|
property :updated_at, type: :time, read_only: true
|
22
|
+
property :video_content_id, read_only: true
|
23
|
+
property :video_hls_url, read_only: true
|
24
|
+
property :video_owner_id, read_only: true
|
25
|
+
property :video_poster_url, read_only: true
|
26
|
+
property :video_url, read_only: true
|
22
27
|
|
23
|
-
property :name
|
24
28
|
property :app_country_code
|
25
|
-
property :
|
26
|
-
property :
|
29
|
+
property :app_cta
|
30
|
+
property :image_media_id
|
27
31
|
property :ipad_app_id
|
28
32
|
property :ipad_deep_link
|
33
|
+
property :iphone_app_id
|
34
|
+
property :iphone_deep_link
|
29
35
|
property :googleplay_app_id
|
30
36
|
property :googleplay_deep_link
|
31
|
-
property :
|
32
|
-
property :image_media_id
|
37
|
+
property :name
|
33
38
|
property :video_id
|
34
39
|
|
35
|
-
RESOURCE_COLLECTION =
|
36
|
-
|
37
|
-
RESOURCE =
|
40
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
|
41
|
+
'accounts/%{account_id}/cards/video_app_download'.freeze # @api private
|
42
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" +
|
43
|
+
'accounts/%{account_id}/cards/video_app_download/%{id}'.freeze # @api private
|
38
44
|
|
39
45
|
def initialize(account)
|
40
46
|
@account = account
|
@@ -12,28 +12,37 @@ module TwitterAds
|
|
12
12
|
|
13
13
|
attr_reader :account
|
14
14
|
|
15
|
+
property :card_type, read_only: true
|
16
|
+
property :card_uri, read_only: true
|
17
|
+
property :created_at, type: :time, read_only: true
|
18
|
+
property :deleted, type: :bool, read_only: true
|
15
19
|
property :id, read_only: true
|
16
20
|
property :preview_url, read_only: true
|
21
|
+
property :updated_at, type: :time, read_only: true
|
17
22
|
property :video_url, read_only: true
|
18
23
|
property :video_poster_url, read_only: true
|
19
|
-
property :deleted, type: :bool, read_only: true
|
20
|
-
property :created_at, type: :time, read_only: true
|
21
|
-
property :updated_at, type: :time, read_only: true
|
22
24
|
|
23
|
-
property :
|
24
|
-
property :
|
25
|
+
property :cover_image_id
|
26
|
+
property :cover_video_id
|
27
|
+
property :fourth_cta
|
28
|
+
property :fourth_cta_tweet
|
29
|
+
property :image_media_id
|
25
30
|
property :first_cta
|
26
31
|
property :first_cta_tweet
|
32
|
+
property :name
|
27
33
|
property :second_cta
|
28
34
|
property :second_cta_tweet
|
29
35
|
property :thank_you_text
|
30
36
|
property :thank_you_url
|
31
|
-
property :
|
37
|
+
property :third_cta
|
38
|
+
property :third_cta_tweet
|
39
|
+
property :title
|
32
40
|
property :video_id
|
33
41
|
|
34
|
-
RESOURCE_COLLECTION =
|
35
|
-
|
36
|
-
RESOURCE =
|
42
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
|
43
|
+
'accounts/%{account_id}/cards/video_conversation'.freeze # @api private
|
44
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" +
|
45
|
+
'accounts/%{account_id}/cards/video_conversation/%{id}'.freeze # @api private
|
37
46
|
|
38
47
|
def initialize(account)
|
39
48
|
@account = account
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Copyright (C) 2015 Twitter, Inc.
|
3
|
+
|
4
|
+
module TwitterAds
|
5
|
+
module Creative
|
6
|
+
|
7
|
+
class VideoWebsiteCard
|
8
|
+
|
9
|
+
include TwitterAds::DSL
|
10
|
+
include TwitterAds::Resource
|
11
|
+
include TwitterAds::Persistence
|
12
|
+
|
13
|
+
attr_reader :account
|
14
|
+
|
15
|
+
property :account_id, read_only: true
|
16
|
+
property :card_type, read_only: true
|
17
|
+
property :card_uri, read_only: true
|
18
|
+
property :created_at, type: :time, read_only: true
|
19
|
+
property :deleted, type: :bool, read_only: true
|
20
|
+
property :id, read_only: true
|
21
|
+
property :preview_url, read_only: true
|
22
|
+
property :updated_at, type: :time, read_only: true
|
23
|
+
property :video_content_id, read_only: true
|
24
|
+
property :video_height, read_only: true
|
25
|
+
property :video_hls_url, read_only: true
|
26
|
+
property :video_owner_id, read_only: true
|
27
|
+
property :video_poster_height, read_only: true
|
28
|
+
property :video_poster_url, read_only: true
|
29
|
+
property :video_poster_width, read_only: true
|
30
|
+
property :video_url, read_only: true
|
31
|
+
property :video_width, read_only: true
|
32
|
+
property :website_display_url, read_only: true
|
33
|
+
property :website_dest_url, read_only: true
|
34
|
+
|
35
|
+
property :name
|
36
|
+
property :title
|
37
|
+
property :video_id
|
38
|
+
property :website_url
|
39
|
+
|
40
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/accounts/%{account_id}/cards/video_website"
|
41
|
+
.freeze # @api private
|
42
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/" +
|
43
|
+
'accounts/%{account_id}/cards/video_website/%{id}'.freeze # @api private
|
44
|
+
|
45
|
+
def initialize(account)
|
46
|
+
@account = account
|
47
|
+
self
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
@@ -12,36 +12,34 @@ module TwitterAds
|
|
12
12
|
|
13
13
|
attr_reader :account
|
14
14
|
|
15
|
+
property :card_type, read_only: true
|
16
|
+
property :card_uri, read_only: true
|
17
|
+
property :created_at, type: :time, read_only: true
|
18
|
+
property :deleted, type: :bool, read_only: true
|
15
19
|
property :id, read_only: true
|
20
|
+
property :image, read_only: true
|
21
|
+
property :image_display_height, read_only: true
|
22
|
+
property :image_display_width, read_only: true
|
16
23
|
property :preview_url, read_only: true
|
17
|
-
property :deleted, type: :bool, read_only: true
|
18
|
-
property :created_at, type: :time, read_only: true
|
19
24
|
property :updated_at, type: :time, read_only: true
|
25
|
+
property :website_dest_url, read_only: true
|
26
|
+
property :website_display_url, read_only: true
|
20
27
|
|
28
|
+
property :image_media_id
|
21
29
|
property :name
|
22
30
|
property :website_title
|
23
31
|
property :website_url
|
24
|
-
# @return [String] An enum value for the call-to-action prompt.
|
25
|
-
# @deprecated Please see https://t.co/deprecated-website-card-cta for more info.
|
26
|
-
property :website_cta
|
27
|
-
property :image_media_id
|
28
32
|
|
29
|
-
RESOURCE_COLLECTION =
|
30
|
-
|
33
|
+
RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/accounts/%{account_id}/cards/website"
|
34
|
+
.freeze # @api private
|
35
|
+
RESOURCE = "/#{TwitterAds::API_VERSION}/accounts/%{account_id}/cards/website/%{id}"
|
36
|
+
.freeze # @api private
|
31
37
|
|
32
38
|
def initialize(account)
|
33
39
|
@account = account
|
34
40
|
self
|
35
41
|
end
|
36
42
|
|
37
|
-
# Overload for CTA deprecation warning.
|
38
|
-
# @private
|
39
|
-
def website_cta=(value)
|
40
|
-
TwitterAds::Utils.deprecated(
|
41
|
-
"#{self.class}#website_cta", refer: 'https://t.co/deprecated-website-card-cta')
|
42
|
-
@website_cta = value
|
43
|
-
end
|
44
|
-
|
45
43
|
end
|
46
44
|
|
47
45
|
end
|
data/lib/twitter-ads/enum.rb
CHANGED
@@ -110,9 +110,22 @@ module TwitterAds
|
|
110
110
|
ORGANIC_TWEET = 'ORGANIC_TWEET'.freeze
|
111
111
|
end
|
112
112
|
|
113
|
+
module EntityStatus
|
114
|
+
ACTIVE = 'ACTIVE'.freeze
|
115
|
+
DRAFT = 'DRAFT'.freeze
|
116
|
+
PAUSED = 'PAUSED'.freeze
|
117
|
+
end
|
118
|
+
|
113
119
|
module CreativeType
|
114
|
-
BANNER
|
115
|
-
INTERSTITIAL
|
120
|
+
BANNER = 'BANNER'.freeze
|
121
|
+
INTERSTITIAL = 'INTERSTITIAL'.freeze
|
122
|
+
PREROLL = 'PREROLL'.freeze
|
123
|
+
VAST_PREROLL = 'VAST_PREROLL'.freeze
|
124
|
+
MEDIUM_RECTANGLE = 'MEDIUM_RECTANGLE'.freeze
|
125
|
+
BANNER_TABLET = 'BANNER_TABLET'.freeze
|
126
|
+
INTERSTITIAL_LANDSCAPE = 'INTERSTITIAL_LANDSCAPE'.freeze
|
127
|
+
INTERSTITIAL_TABLET = 'INTERSTITIAL_TABLET'.freeze
|
128
|
+
INTERSTITIAL_LANDSCAPE_TABLET = 'INTERSTITIAL_LANDSCAPE_TABLET'.freeze
|
116
129
|
end
|
117
130
|
|
118
131
|
module Optimizations
|
@@ -127,20 +140,26 @@ module TwitterAds
|
|
127
140
|
end
|
128
141
|
|
129
142
|
module AgeBucket
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
AGE_55_TO_64 = 'AGE_55_TO_64'.freeze
|
136
|
-
AGE_OVER_65 = 'AGE_OVER_65'.freeze
|
137
|
-
end
|
138
|
-
|
139
|
-
module AgeBucketCoarse
|
143
|
+
AGE_13_TO_24 = 'AGE_13_TO_24'.freeze
|
144
|
+
AGE_13_TO_34 = 'AGE_13_TO_34'.freeze
|
145
|
+
AGE_13_TO_49 = 'AGE_13_TO_49'.freeze
|
146
|
+
AGE_13_TO_54 = 'AGE_13_TO_54'.freeze
|
147
|
+
AGE_OVER_13 = 'AGE_OVER_13'.freeze
|
140
148
|
AGE_18_TO_34 = 'AGE_18_TO_34'.freeze
|
141
149
|
AGE_18_TO_49 = 'AGE_18_TO_49'.freeze
|
142
|
-
|
150
|
+
AGE_18_TO_54 = 'AGE_18_TO_54'.freeze
|
151
|
+
AGE_OVER_18 = 'AGE_OVER_18'.freeze
|
152
|
+
AGE_21_TO_34 = 'AGE_21_TO_34'.freeze
|
153
|
+
AGE_21_TO_49 = 'AGE_21_TO_49'.freeze
|
154
|
+
AGE_21_TO_54 = 'AGE_21_TO_54'.freeze
|
143
155
|
AGE_OVER_21 = 'AGE_OVER_21'.freeze
|
156
|
+
AGE_25_TO_49 = 'AGE_25_TO_49'.freeze
|
157
|
+
AGE_25_TO_54 = 'AGE_25_TO_54'.freeze
|
158
|
+
AGE_OVER_25 = 'AGE_OVER_25'.freeze
|
159
|
+
AGE_35_TO_49 = 'AGE_35_TO_49'.freeze
|
160
|
+
AGE_35_TO_54 = 'AGE_35_TO_54'.freeze
|
161
|
+
AGE_OVER_35 = 'AGE_OVER_35'.freeze
|
162
|
+
AGE_OVER_50 = 'AGE_OVER_50'.freeze
|
144
163
|
end
|
145
164
|
|
146
165
|
module Events
|