late-sdk 0.0.91 → 0.0.92

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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -1
  3. data/docs/ConnectApi.md +146 -4
  4. data/docs/GetYoutubePlaylists200Response.md +20 -0
  5. data/docs/GetYoutubePlaylists200ResponsePlaylistsInner.md +28 -0
  6. data/docs/MessagesApi.md +16 -16
  7. data/docs/{UpdateRedditSubreddits200Response.md → UpdateYoutubeDefaultPlaylist200Response.md} +2 -2
  8. data/docs/UpdateYoutubeDefaultPlaylistRequest.md +20 -0
  9. data/docs/WebhooksApi.md +4 -4
  10. data/docs/YouTubePlatformData.md +3 -1
  11. data/lib/late-sdk/api/connect_api.rb +140 -3
  12. data/lib/late-sdk/api/messages_api.rb +12 -12
  13. data/lib/late-sdk/api/webhooks_api.rb +3 -3
  14. data/lib/late-sdk/models/get_youtube_playlists200_response.rb +158 -0
  15. data/lib/late-sdk/models/get_youtube_playlists200_response_playlists_inner.rb +226 -0
  16. data/lib/late-sdk/models/{update_reddit_subreddits200_response.rb → update_youtube_default_playlist200_response.rb} +3 -3
  17. data/lib/late-sdk/models/update_youtube_default_playlist_request.rb +173 -0
  18. data/lib/late-sdk/models/you_tube_platform_data.rb +14 -4
  19. data/lib/late-sdk/version.rb +1 -1
  20. data/lib/late-sdk.rb +4 -1
  21. data/openapi.yaml +92 -0
  22. data/spec/api/connect_api_spec.rb +26 -1
  23. data/spec/api/messages_api_spec.rb +4 -4
  24. data/spec/api/webhooks_api_spec.rb +1 -1
  25. data/spec/models/get_youtube_playlists200_response_playlists_inner_spec.rb +70 -0
  26. data/spec/models/get_youtube_playlists200_response_spec.rb +42 -0
  27. data/spec/models/{update_reddit_subreddits200_response_spec.rb → update_youtube_default_playlist200_response_spec.rb} +6 -6
  28. data/spec/models/update_youtube_default_playlist_request_spec.rb +42 -0
  29. data/spec/models/you_tube_platform_data_spec.rb +6 -0
  30. data/zernio-sdk-0.0.92.gem +0 -0
  31. metadata +18 -6
  32. data/zernio-sdk-0.0.91.gem +0 -0
@@ -0,0 +1,226 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class GetYoutubePlaylists200ResponsePlaylistsInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :title
21
+
22
+ attr_accessor :description
23
+
24
+ attr_accessor :privacy
25
+
26
+ attr_accessor :item_count
27
+
28
+ attr_accessor :thumbnail_url
29
+
30
+ class EnumAttributeValidator
31
+ attr_reader :datatype
32
+ attr_reader :allowable_values
33
+
34
+ def initialize(datatype, allowable_values)
35
+ @allowable_values = allowable_values.map do |value|
36
+ case datatype.to_s
37
+ when /Integer/i
38
+ value.to_i
39
+ when /Float/i
40
+ value.to_f
41
+ else
42
+ value
43
+ end
44
+ end
45
+ end
46
+
47
+ def valid?(value)
48
+ !value || allowable_values.include?(value)
49
+ end
50
+ end
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'id' => :'id',
56
+ :'title' => :'title',
57
+ :'description' => :'description',
58
+ :'privacy' => :'privacy',
59
+ :'item_count' => :'itemCount',
60
+ :'thumbnail_url' => :'thumbnailUrl'
61
+ }
62
+ end
63
+
64
+ # Returns attribute mapping this model knows about
65
+ def self.acceptable_attribute_map
66
+ attribute_map
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ acceptable_attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'id' => :'String',
78
+ :'title' => :'String',
79
+ :'description' => :'String',
80
+ :'privacy' => :'String',
81
+ :'item_count' => :'Integer',
82
+ :'thumbnail_url' => :'String'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ ])
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetYoutubePlaylists200ResponsePlaylistsInner` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ acceptable_attribute_map = self.class.acceptable_attribute_map
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!acceptable_attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetYoutubePlaylists200ResponsePlaylistsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'id')
109
+ self.id = attributes[:'id']
110
+ end
111
+
112
+ if attributes.key?(:'title')
113
+ self.title = attributes[:'title']
114
+ end
115
+
116
+ if attributes.key?(:'description')
117
+ self.description = attributes[:'description']
118
+ end
119
+
120
+ if attributes.key?(:'privacy')
121
+ self.privacy = attributes[:'privacy']
122
+ end
123
+
124
+ if attributes.key?(:'item_count')
125
+ self.item_count = attributes[:'item_count']
126
+ end
127
+
128
+ if attributes.key?(:'thumbnail_url')
129
+ self.thumbnail_url = attributes[:'thumbnail_url']
130
+ end
131
+ end
132
+
133
+ # Show invalid properties with the reasons. Usually used together with valid?
134
+ # @return Array for valid properties with the reasons
135
+ def list_invalid_properties
136
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
137
+ invalid_properties = Array.new
138
+ invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+ warn '[DEPRECATED] the `valid?` method is obsolete'
145
+ privacy_validator = EnumAttributeValidator.new('String', ["public", "private", "unlisted"])
146
+ return false unless privacy_validator.valid?(@privacy)
147
+ true
148
+ end
149
+
150
+ # Custom attribute writer method checking allowed values (enum).
151
+ # @param [Object] privacy Object to be assigned
152
+ def privacy=(privacy)
153
+ validator = EnumAttributeValidator.new('String', ["public", "private", "unlisted"])
154
+ unless validator.valid?(privacy)
155
+ fail ArgumentError, "invalid value for \"privacy\", must be one of #{validator.allowable_values}."
156
+ end
157
+ @privacy = privacy
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param [Object] Object to be compared
162
+ def ==(o)
163
+ return true if self.equal?(o)
164
+ self.class == o.class &&
165
+ id == o.id &&
166
+ title == o.title &&
167
+ description == o.description &&
168
+ privacy == o.privacy &&
169
+ item_count == o.item_count &&
170
+ thumbnail_url == o.thumbnail_url
171
+ end
172
+
173
+ # @see the `==` method
174
+ # @param [Object] Object to be compared
175
+ def eql?(o)
176
+ self == o
177
+ end
178
+
179
+ # Calculates hash code according to all attributes.
180
+ # @return [Integer] Hash code
181
+ def hash
182
+ [id, title, description, privacy, item_count, thumbnail_url].hash
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def self.build_from_hash(attributes)
189
+ return nil unless attributes.is_a?(Hash)
190
+ attributes = attributes.transform_keys(&:to_sym)
191
+ transformed_hash = {}
192
+ openapi_types.each_pair do |key, type|
193
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = nil
195
+ elsif type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[attribute_map[key]].is_a?(Array)
199
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
200
+ end
201
+ elsif !attributes[attribute_map[key]].nil?
202
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
203
+ end
204
+ end
205
+ new(transformed_hash)
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ if value.nil?
215
+ is_nullable = self.class.openapi_nullable.include?(attr)
216
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
+ end
218
+
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ end
225
+
226
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Late
17
- class UpdateRedditSubreddits200Response < ApiModelBase
17
+ class UpdateYoutubeDefaultPlaylist200Response < ApiModelBase
18
18
  attr_accessor :success
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -51,14 +51,14 @@ module Late
51
51
  # @param [Hash] attributes Model attributes in the form of hash
52
52
  def initialize(attributes = {})
53
53
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateRedditSubreddits200Response` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateYoutubeDefaultPlaylist200Response` initialize method"
55
55
  end
56
56
 
57
57
  # check to see if the attribute exists and convert string to symbol for hash key
58
58
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
60
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateRedditSubreddits200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateYoutubeDefaultPlaylist200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
62
  end
63
63
  h[k.to_sym] = v
64
64
  }
@@ -0,0 +1,173 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class UpdateYoutubeDefaultPlaylistRequest < ApiModelBase
18
+ attr_accessor :default_playlist_id
19
+
20
+ attr_accessor :default_playlist_name
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'default_playlist_id' => :'defaultPlaylistId',
26
+ :'default_playlist_name' => :'defaultPlaylistName'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'default_playlist_id' => :'String',
44
+ :'default_playlist_name' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateYoutubeDefaultPlaylistRequest` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateYoutubeDefaultPlaylistRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'default_playlist_id')
71
+ self.default_playlist_id = attributes[:'default_playlist_id']
72
+ else
73
+ self.default_playlist_id = nil
74
+ end
75
+
76
+ if attributes.key?(:'default_playlist_name')
77
+ self.default_playlist_name = attributes[:'default_playlist_name']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ if @default_playlist_id.nil?
87
+ invalid_properties.push('invalid value for "default_playlist_id", default_playlist_id cannot be nil.')
88
+ end
89
+
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ warn '[DEPRECATED] the `valid?` method is obsolete'
97
+ return false if @default_playlist_id.nil?
98
+ true
99
+ end
100
+
101
+ # Custom attribute writer method with validation
102
+ # @param [Object] default_playlist_id Value to be assigned
103
+ def default_playlist_id=(default_playlist_id)
104
+ if default_playlist_id.nil?
105
+ fail ArgumentError, 'default_playlist_id cannot be nil'
106
+ end
107
+
108
+ @default_playlist_id = default_playlist_id
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ default_playlist_id == o.default_playlist_id &&
117
+ default_playlist_name == o.default_playlist_name
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [default_playlist_id, default_playlist_name].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ attributes = attributes.transform_keys(&:to_sym)
138
+ transformed_hash = {}
139
+ openapi_types.each_pair do |key, type|
140
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[attribute_map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
+ end
148
+ elsif !attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
+ end
151
+ end
152
+ new(transformed_hash)
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ if value.nil?
162
+ is_nullable = self.class.openapi_nullable.include?(attr)
163
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
164
+ end
165
+
166
+ hash[param] = _to_hash(value)
167
+ end
168
+ hash
169
+ end
170
+
171
+ end
172
+
173
+ end
@@ -34,6 +34,9 @@ module Late
34
34
  # YouTube video category ID. Defaults to 22 (People & Blogs). Common: 1 (Film), 2 (Autos), 10 (Music), 15 (Pets), 17 (Sports), 20 (Gaming), 23 (Comedy), 24 (Entertainment), 25 (News), 26 (Howto), 27 (Education), 28 (Science & Tech).
35
35
  attr_accessor :category_id
36
36
 
37
+ # Optional YouTube playlist ID to add the video to after upload (e.g. 'PLxxxxxxxxxxxxx'). Use GET /v1/accounts/{id}/youtube-playlists to list available playlists. Works for both immediate and scheduled uploads. Quota cost: 50 YouTube API units per call.
38
+ attr_accessor :playlist_id
39
+
37
40
  class EnumAttributeValidator
38
41
  attr_reader :datatype
39
42
  attr_reader :allowable_values
@@ -64,7 +67,8 @@ module Late
64
67
  :'made_for_kids' => :'madeForKids',
65
68
  :'first_comment' => :'firstComment',
66
69
  :'contains_synthetic_media' => :'containsSyntheticMedia',
67
- :'category_id' => :'categoryId'
70
+ :'category_id' => :'categoryId',
71
+ :'playlist_id' => :'playlistId'
68
72
  }
69
73
  end
70
74
 
@@ -86,7 +90,8 @@ module Late
86
90
  :'made_for_kids' => :'Boolean',
87
91
  :'first_comment' => :'String',
88
92
  :'contains_synthetic_media' => :'Boolean',
89
- :'category_id' => :'String'
93
+ :'category_id' => :'String',
94
+ :'playlist_id' => :'String'
90
95
  }
91
96
  end
92
97
 
@@ -143,6 +148,10 @@ module Late
143
148
  else
144
149
  self.category_id = '22'
145
150
  end
151
+
152
+ if attributes.key?(:'playlist_id')
153
+ self.playlist_id = attributes[:'playlist_id']
154
+ end
146
155
  end
147
156
 
148
157
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -220,7 +229,8 @@ module Late
220
229
  made_for_kids == o.made_for_kids &&
221
230
  first_comment == o.first_comment &&
222
231
  contains_synthetic_media == o.contains_synthetic_media &&
223
- category_id == o.category_id
232
+ category_id == o.category_id &&
233
+ playlist_id == o.playlist_id
224
234
  end
225
235
 
226
236
  # @see the `==` method
@@ -232,7 +242,7 @@ module Late
232
242
  # Calculates hash code according to all attributes.
233
243
  # @return [Integer] Hash code
234
244
  def hash
235
- [title, visibility, made_for_kids, first_comment, contains_synthetic_media, category_id].hash
245
+ [title, visibility, made_for_kids, first_comment, contains_synthetic_media, category_id, playlist_id].hash
236
246
  end
237
247
 
238
248
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Late
14
- VERSION = '0.0.91'
14
+ VERSION = '0.0.92'
15
15
  end
data/lib/late-sdk.rb CHANGED
@@ -335,6 +335,8 @@ require 'late-sdk/models/get_you_tube_daily_views403_response'
335
335
  require 'late-sdk/models/get_you_tube_daily_views500_response'
336
336
  require 'late-sdk/models/get_you_tube_transcript200_response'
337
337
  require 'late-sdk/models/get_you_tube_transcript200_response_segments_inner'
338
+ require 'late-sdk/models/get_youtube_playlists200_response'
339
+ require 'late-sdk/models/get_youtube_playlists200_response_playlists_inner'
338
340
  require 'late-sdk/models/google_business_platform_data'
339
341
  require 'late-sdk/models/google_business_platform_data_call_to_action'
340
342
  require 'late-sdk/models/handle_o_auth_callback_request'
@@ -618,7 +620,6 @@ require 'late-sdk/models/update_profile200_response'
618
620
  require 'late-sdk/models/update_profile_request'
619
621
  require 'late-sdk/models/update_queue_slot200_response'
620
622
  require 'late-sdk/models/update_queue_slot_request'
621
- require 'late-sdk/models/update_reddit_subreddits200_response'
622
623
  require 'late-sdk/models/update_reddit_subreddits_request'
623
624
  require 'late-sdk/models/update_sequence200_response'
624
625
  require 'late-sdk/models/update_sequence200_response_sequence'
@@ -635,6 +636,8 @@ require 'late-sdk/models/update_whats_app_group_chat_request'
635
636
  require 'late-sdk/models/update_whats_app_template200_response'
636
637
  require 'late-sdk/models/update_whats_app_template200_response_template'
637
638
  require 'late-sdk/models/update_whats_app_template_request'
639
+ require 'late-sdk/models/update_youtube_default_playlist200_response'
640
+ require 'late-sdk/models/update_youtube_default_playlist_request'
638
641
  require 'late-sdk/models/upload_media_direct200_response'
639
642
  require 'late-sdk/models/upload_token_response'
640
643
  require 'late-sdk/models/upload_token_status_response'
data/openapi.yaml CHANGED
@@ -1629,6 +1629,9 @@ components:
1629
1629
  type: string
1630
1630
  default: '22'
1631
1631
  description: "YouTube video category ID. Defaults to 22 (People & Blogs). Common: 1 (Film), 2 (Autos), 10 (Music), 15 (Pets), 17 (Sports), 20 (Gaming), 23 (Comedy), 24 (Entertainment), 25 (News), 26 (Howto), 27 (Education), 28 (Science & Tech)."
1632
+ playlistId:
1633
+ type: string
1634
+ description: "Optional YouTube playlist ID to add the video to after upload (e.g. 'PLxxxxxxxxxxxxx'). Use GET /v1/accounts/{id}/youtube-playlists to list available playlists. Works for both immediate and scheduled uploads. Quota cost: 50 YouTube API units per call."
1632
1635
  description: Videos under 3 min auto-detected as Shorts. Custom thumbnails for regular videos only. Scheduled videos are uploaded immediately with the specified visibility.
1633
1636
 
1634
1637
  GoogleBusinessPlatformData:
@@ -9897,6 +9900,95 @@ paths:
9897
9900
  '401': { $ref: '#/components/responses/Unauthorized' }
9898
9901
  '404': { description: Account not found }
9899
9902
 
9903
+ /v1/accounts/{accountId}/youtube-playlists:
9904
+ get:
9905
+ operationId: getYoutubePlaylists
9906
+ tags: [Connect]
9907
+ summary: List YouTube playlists
9908
+ description: Returns the playlists available for a connected YouTube account. Use this to get a playlist ID when creating a YouTube post with the `playlistId` field.
9909
+ parameters:
9910
+ - name: accountId
9911
+ in: path
9912
+ required: true
9913
+ schema: { type: string }
9914
+ responses:
9915
+ '200':
9916
+ description: Playlists list
9917
+ content:
9918
+ application/json:
9919
+ schema:
9920
+ type: object
9921
+ properties:
9922
+ playlists:
9923
+ type: array
9924
+ items:
9925
+ type: object
9926
+ properties:
9927
+ id: { type: string }
9928
+ title: { type: string }
9929
+ description: { type: string }
9930
+ privacy: { type: string, enum: [public, private, unlisted] }
9931
+ itemCount: { type: integer }
9932
+ thumbnailUrl: { type: string }
9933
+ defaultPlaylistId:
9934
+ type: string
9935
+ nullable: true
9936
+ example:
9937
+ playlists:
9938
+ - id: "PLxxxxxxxxxxxxx"
9939
+ title: "Tutorials"
9940
+ description: "Step-by-step video tutorials"
9941
+ privacy: "public"
9942
+ itemCount: 24
9943
+ thumbnailUrl: "https://i.ytimg.com/vi/xxx/mqdefault.jpg"
9944
+ - id: "PLyyyyyyyyyyyyy"
9945
+ title: "Vlogs"
9946
+ description: "Weekly vlogs"
9947
+ privacy: "public"
9948
+ itemCount: 52
9949
+ thumbnailUrl: "https://i.ytimg.com/vi/yyy/mqdefault.jpg"
9950
+ defaultPlaylistId: null
9951
+ '400': { description: Not a YouTube account }
9952
+ '401': { $ref: '#/components/responses/Unauthorized' }
9953
+ '404': { description: Account not found }
9954
+ put:
9955
+ operationId: updateYoutubeDefaultPlaylist
9956
+ tags: [Connect]
9957
+ summary: Set default YouTube playlist
9958
+ description: Sets the default playlist used when publishing videos for this account. When a post does not specify a `playlistId`, the default playlist is not automatically used (it is stored for client-side convenience).
9959
+ parameters:
9960
+ - name: accountId
9961
+ in: path
9962
+ required: true
9963
+ schema: { type: string }
9964
+ requestBody:
9965
+ required: true
9966
+ content:
9967
+ application/json:
9968
+ schema:
9969
+ type: object
9970
+ required: [defaultPlaylistId]
9971
+ properties:
9972
+ defaultPlaylistId: { type: string }
9973
+ defaultPlaylistName: { type: string }
9974
+ example:
9975
+ defaultPlaylistId: "PLxxxxxxxxxxxxx"
9976
+ defaultPlaylistName: "Tutorials"
9977
+ responses:
9978
+ '200':
9979
+ description: Default playlist set
9980
+ content:
9981
+ application/json:
9982
+ schema:
9983
+ type: object
9984
+ properties:
9985
+ success: { type: boolean }
9986
+ example:
9987
+ success: true
9988
+ '400': { description: Invalid request }
9989
+ '401': { $ref: '#/components/responses/Unauthorized' }
9990
+ '404': { description: Account not found }
9991
+
9900
9992
  /v1/accounts/{accountId}/gmb-locations:
9901
9993
  get:
9902
9994
  operationId: getGmbLocations
@@ -180,6 +180,18 @@ describe 'ConnectApi' do
180
180
  end
181
181
  end
182
182
 
183
+ # unit tests for get_youtube_playlists
184
+ # List YouTube playlists
185
+ # Returns the playlists available for a connected YouTube account. Use this to get a playlist ID when creating a YouTube post with the &#x60;playlistId&#x60; field.
186
+ # @param account_id
187
+ # @param [Hash] opts the optional parameters
188
+ # @return [GetYoutubePlaylists200Response]
189
+ describe 'get_youtube_playlists test' do
190
+ it 'should work' do
191
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
192
+ end
193
+ end
194
+
183
195
  # unit tests for handle_o_auth_callback
184
196
  # Complete OAuth callback
185
197
  # Exchange the OAuth authorization code for tokens and connect the account to the specified profile.
@@ -391,11 +403,24 @@ describe 'ConnectApi' do
391
403
  # @param account_id
392
404
  # @param update_reddit_subreddits_request
393
405
  # @param [Hash] opts the optional parameters
394
- # @return [UpdateRedditSubreddits200Response]
406
+ # @return [UpdateYoutubeDefaultPlaylist200Response]
395
407
  describe 'update_reddit_subreddits test' do
396
408
  it 'should work' do
397
409
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
398
410
  end
399
411
  end
400
412
 
413
+ # unit tests for update_youtube_default_playlist
414
+ # Set default YouTube playlist
415
+ # Sets the default playlist used when publishing videos for this account. When a post does not specify a &#x60;playlistId&#x60;, the default playlist is not automatically used (it is stored for client-side convenience).
416
+ # @param account_id
417
+ # @param update_youtube_default_playlist_request
418
+ # @param [Hash] opts the optional parameters
419
+ # @return [UpdateYoutubeDefaultPlaylist200Response]
420
+ describe 'update_youtube_default_playlist test' do
421
+ it 'should work' do
422
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
423
+ end
424
+ end
425
+
401
426
  end