twitter-ads 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6fb4befdf5ee2d5b88722ae972166970cf2595b6
4
- data.tar.gz: 8665ca5d969a1a03f13a8c0dcf57719a1523936a
3
+ metadata.gz: 960147733ff2dcaddd726fd01064152695055f88
4
+ data.tar.gz: 33c89c5efa732eaa1e98b7a3fde336b6672c0255
5
5
  SHA512:
6
- metadata.gz: 795e91e3a932600ed0d67c52b74006e8f08819464d51d1a968af96e31c4dbbeb37ccca49e0fcf98014e47fe2ba850f900e855c8fa3dd1dcd618e24cb3aaa7e43
7
- data.tar.gz: 369d6ec2a92a433f591b1ed3482a85ff51a4294ab3cfa6be7792a5540b6d93088de737bcbc1f392caaec2bee1c4385b955faf02262835005dd417d17c833ea2f
6
+ metadata.gz: 2b33c9868bee1b43a954079be44eb43c9e581e815ea8d56612a94b1001498675dae0919518d612b6e39ef6571f411ebc87f55069d11e300298eab8b33ee132e4
7
+ data.tar.gz: 41221b6220ee792e99c56704480ccd4e3b2d16571d19c9fe0d378492ea2134798f934a724c40e10035dda50266e29967da3ea9f411e6661e0e4ec121750436ce
data/README.md CHANGED
@@ -84,7 +84,7 @@ Have a question? Want to discuss a new feature? Come chat with us in the [Twitte
84
84
 
85
85
  Like the [Response](https://github.com/twitterdev/twitter-ruby-ads-sdk/blob/master/lib/twitter-ads/http/response.rb) and [Request](https://github.com/twitterdev/twitter-ruby-ads-sdk/blob/master/lib/twitter-ads/http/request.rb) classes, the Ads API SDK fully models all [error objects](https://github.com/twitterdev/twitter-ruby-ads-sdk/blob/master/lib/twitter-ads/error.rb) for easy error handling.
86
86
 
87
- <img src="http://i.imgur.com/opbv7Nh.png"/ alt="Error Hierarchy">
87
+ <img src="http://i.imgur.com/opbv7Nh.png" alt="Error Hierarchy">
88
88
 
89
89
  ## License
90
90
 
@@ -94,6 +94,46 @@ module TwitterAds
94
94
  response.body[:data]
95
95
  end
96
96
 
97
+ # Returns a collection of media creatives available to the current account.
98
+ #
99
+ # @param id [String] The MediaCreative ID value.
100
+ # @param opts [Hash] A Hash of extended options.
101
+ # @option opts [String] :line_item_id Scope the result to a line item ID.
102
+ # @option opts [String] :campaign_id Scope the result to a campaign ID.
103
+ # @option opts [Boolean] :with_deleted Indicates if deleted items should be included.
104
+ # @option opts [String] :sort_by The object param to sort the API response by.
105
+ #
106
+ # @return A Cursor or object instance.
107
+ def media_creatives(id = nil, opts = {})
108
+ load_resource(Creative::MediaCreative, id, opts)
109
+ end
110
+
111
+ # Returns a collection of account media available to the current account.
112
+ #
113
+ # @param id [String] The Account Media ID value.
114
+ # @param opts [Hash] A Hash of extended options.
115
+ # @option opts [String] :account_media_ids Comma separated account media ids
116
+ # @option opts [Boolean] :with_deleted Indicates if deleted items should be included.
117
+ # @option opts [String] :sort_by The object param to sort the API response by.
118
+ #
119
+ # @return A Cursor or object instance.
120
+ def account_media(id = nil, opts = {})
121
+ load_resource(Creative::AccountMedia, id, opts)
122
+ end
123
+
124
+ # Returns a collection of media library available to the current account.
125
+ #
126
+ # @param id [String] The Media key value.
127
+ # @param opts [Hash] A Hash of extended options.
128
+ # @option opts [String] :media_type can be VIDEO, IMAGE or GIF
129
+ # @option opts [Boolean] :with_deleted Indicates if deleted items should be included.
130
+ # @option opts [String] :sort_by The object param to sort the API response by.
131
+ #
132
+ # @return A Cursor or object instance.
133
+ def media_library(id = nil, opts = {})
134
+ load_resource(Creative::MediaLibrary, id, opts)
135
+ end
136
+
97
137
  # Returns a collection of promotable users available to the current account.
98
138
  #
99
139
  # @param id [String] The PromotableUser ID value.
@@ -3,7 +3,7 @@
3
3
 
4
4
  module TwitterAds
5
5
 
6
- API_VERSION = '3'.freeze
6
+ API_VERSION = '4'.freeze
7
7
 
8
8
  # The Ads API Client class which functions as a
9
9
  # container for basic API consumer information.
@@ -22,6 +22,7 @@ module TwitterAds
22
22
  property :media_url, read_only: true
23
23
  property :tweeted, type: :bool, read_only: true
24
24
  property :updated_at, type: :time, read_only: true
25
+ property :poster_image_url, read_only: true
25
26
 
26
27
  # writable
27
28
  property :media_category
@@ -2,5 +2,5 @@
2
2
  # Copyright (C) 2015 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
- VERSION = '4.0.0'.freeze
5
+ VERSION = '4.0.1'.freeze
6
6
  end
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.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Black
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-02-14 00:00:00.000000000 Z
13
+ date: 2019-02-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json