late-sdk 0.0.90 → 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.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/docs/ConnectApi.md +146 -4
- data/docs/GetYoutubePlaylists200Response.md +20 -0
- data/docs/GetYoutubePlaylists200ResponsePlaylistsInner.md +28 -0
- data/docs/InstagramPlatformData.md +6 -2
- data/docs/MediaItem.md +1 -1
- data/docs/MessagesApi.md +16 -16
- data/docs/{UpdateRedditSubreddits200Response.md → UpdateYoutubeDefaultPlaylist200Response.md} +2 -2
- data/docs/UpdateYoutubeDefaultPlaylistRequest.md +20 -0
- data/docs/WebhooksApi.md +4 -4
- data/docs/YouTubePlatformData.md +3 -1
- data/lib/late-sdk/api/connect_api.rb +140 -3
- data/lib/late-sdk/api/messages_api.rb +12 -12
- data/lib/late-sdk/api/webhooks_api.rb +3 -3
- data/lib/late-sdk/models/get_youtube_playlists200_response.rb +158 -0
- data/lib/late-sdk/models/get_youtube_playlists200_response_playlists_inner.rb +226 -0
- data/lib/late-sdk/models/instagram_platform_data.rb +25 -5
- data/lib/late-sdk/models/media_item.rb +1 -1
- data/lib/late-sdk/models/{update_reddit_subreddits200_response.rb → update_youtube_default_playlist200_response.rb} +3 -3
- data/lib/late-sdk/models/update_youtube_default_playlist_request.rb +173 -0
- data/lib/late-sdk/models/you_tube_platform_data.rb +14 -4
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +4 -1
- data/openapi.yaml +102 -2
- data/spec/api/connect_api_spec.rb +26 -1
- data/spec/api/messages_api_spec.rb +4 -4
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/models/get_youtube_playlists200_response_playlists_inner_spec.rb +70 -0
- data/spec/models/get_youtube_playlists200_response_spec.rb +42 -0
- data/spec/models/instagram_platform_data_spec.rb +12 -0
- data/spec/models/{update_reddit_subreddits200_response_spec.rb → update_youtube_default_playlist200_response_spec.rb} +6 -6
- data/spec/models/update_youtube_default_playlist_request_spec.rb +42 -0
- data/spec/models/you_tube_platform_data_spec.rb +6 -0
- data/zernio-sdk-0.0.92.gem +0 -0
- metadata +19 -7
- data/zernio-sdk-0.0.90.gem +0 -0
|
@@ -813,6 +813,69 @@ module Late
|
|
|
813
813
|
return data, status_code, headers
|
|
814
814
|
end
|
|
815
815
|
|
|
816
|
+
# List YouTube playlists
|
|
817
|
+
# 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.
|
|
818
|
+
# @param account_id [String]
|
|
819
|
+
# @param [Hash] opts the optional parameters
|
|
820
|
+
# @return [GetYoutubePlaylists200Response]
|
|
821
|
+
def get_youtube_playlists(account_id, opts = {})
|
|
822
|
+
data, _status_code, _headers = get_youtube_playlists_with_http_info(account_id, opts)
|
|
823
|
+
data
|
|
824
|
+
end
|
|
825
|
+
|
|
826
|
+
# List YouTube playlists
|
|
827
|
+
# 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.
|
|
828
|
+
# @param account_id [String]
|
|
829
|
+
# @param [Hash] opts the optional parameters
|
|
830
|
+
# @return [Array<(GetYoutubePlaylists200Response, Integer, Hash)>] GetYoutubePlaylists200Response data, response status code and response headers
|
|
831
|
+
def get_youtube_playlists_with_http_info(account_id, opts = {})
|
|
832
|
+
if @api_client.config.debugging
|
|
833
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.get_youtube_playlists ...'
|
|
834
|
+
end
|
|
835
|
+
# verify the required parameter 'account_id' is set
|
|
836
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
837
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.get_youtube_playlists"
|
|
838
|
+
end
|
|
839
|
+
# resource path
|
|
840
|
+
local_var_path = '/v1/accounts/{accountId}/youtube-playlists'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
841
|
+
|
|
842
|
+
# query parameters
|
|
843
|
+
query_params = opts[:query_params] || {}
|
|
844
|
+
|
|
845
|
+
# header parameters
|
|
846
|
+
header_params = opts[:header_params] || {}
|
|
847
|
+
# HTTP header 'Accept' (if needed)
|
|
848
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
849
|
+
|
|
850
|
+
# form parameters
|
|
851
|
+
form_params = opts[:form_params] || {}
|
|
852
|
+
|
|
853
|
+
# http body (model)
|
|
854
|
+
post_body = opts[:debug_body]
|
|
855
|
+
|
|
856
|
+
# return_type
|
|
857
|
+
return_type = opts[:debug_return_type] || 'GetYoutubePlaylists200Response'
|
|
858
|
+
|
|
859
|
+
# auth_names
|
|
860
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
861
|
+
|
|
862
|
+
new_options = opts.merge(
|
|
863
|
+
:operation => :"ConnectApi.get_youtube_playlists",
|
|
864
|
+
:header_params => header_params,
|
|
865
|
+
:query_params => query_params,
|
|
866
|
+
:form_params => form_params,
|
|
867
|
+
:body => post_body,
|
|
868
|
+
:auth_names => auth_names,
|
|
869
|
+
:return_type => return_type
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
873
|
+
if @api_client.config.debugging
|
|
874
|
+
@api_client.config.logger.debug "API called: ConnectApi#get_youtube_playlists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
875
|
+
end
|
|
876
|
+
return data, status_code, headers
|
|
877
|
+
end
|
|
878
|
+
|
|
816
879
|
# Complete OAuth callback
|
|
817
880
|
# Exchange the OAuth authorization code for tokens and connect the account to the specified profile.
|
|
818
881
|
# @param platform [String]
|
|
@@ -1968,7 +2031,7 @@ module Late
|
|
|
1968
2031
|
# @param account_id [String]
|
|
1969
2032
|
# @param update_reddit_subreddits_request [UpdateRedditSubredditsRequest]
|
|
1970
2033
|
# @param [Hash] opts the optional parameters
|
|
1971
|
-
# @return [
|
|
2034
|
+
# @return [UpdateYoutubeDefaultPlaylist200Response]
|
|
1972
2035
|
def update_reddit_subreddits(account_id, update_reddit_subreddits_request, opts = {})
|
|
1973
2036
|
data, _status_code, _headers = update_reddit_subreddits_with_http_info(account_id, update_reddit_subreddits_request, opts)
|
|
1974
2037
|
data
|
|
@@ -1979,7 +2042,7 @@ module Late
|
|
|
1979
2042
|
# @param account_id [String]
|
|
1980
2043
|
# @param update_reddit_subreddits_request [UpdateRedditSubredditsRequest]
|
|
1981
2044
|
# @param [Hash] opts the optional parameters
|
|
1982
|
-
# @return [Array<(
|
|
2045
|
+
# @return [Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>] UpdateYoutubeDefaultPlaylist200Response data, response status code and response headers
|
|
1983
2046
|
def update_reddit_subreddits_with_http_info(account_id, update_reddit_subreddits_request, opts = {})
|
|
1984
2047
|
if @api_client.config.debugging
|
|
1985
2048
|
@api_client.config.logger.debug 'Calling API: ConnectApi.update_reddit_subreddits ...'
|
|
@@ -2015,7 +2078,7 @@ module Late
|
|
|
2015
2078
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_reddit_subreddits_request)
|
|
2016
2079
|
|
|
2017
2080
|
# return_type
|
|
2018
|
-
return_type = opts[:debug_return_type] || '
|
|
2081
|
+
return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response'
|
|
2019
2082
|
|
|
2020
2083
|
# auth_names
|
|
2021
2084
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -2036,5 +2099,79 @@ module Late
|
|
|
2036
2099
|
end
|
|
2037
2100
|
return data, status_code, headers
|
|
2038
2101
|
end
|
|
2102
|
+
|
|
2103
|
+
# Set default YouTube playlist
|
|
2104
|
+
# 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).
|
|
2105
|
+
# @param account_id [String]
|
|
2106
|
+
# @param update_youtube_default_playlist_request [UpdateYoutubeDefaultPlaylistRequest]
|
|
2107
|
+
# @param [Hash] opts the optional parameters
|
|
2108
|
+
# @return [UpdateYoutubeDefaultPlaylist200Response]
|
|
2109
|
+
def update_youtube_default_playlist(account_id, update_youtube_default_playlist_request, opts = {})
|
|
2110
|
+
data, _status_code, _headers = update_youtube_default_playlist_with_http_info(account_id, update_youtube_default_playlist_request, opts)
|
|
2111
|
+
data
|
|
2112
|
+
end
|
|
2113
|
+
|
|
2114
|
+
# Set default YouTube playlist
|
|
2115
|
+
# 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).
|
|
2116
|
+
# @param account_id [String]
|
|
2117
|
+
# @param update_youtube_default_playlist_request [UpdateYoutubeDefaultPlaylistRequest]
|
|
2118
|
+
# @param [Hash] opts the optional parameters
|
|
2119
|
+
# @return [Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>] UpdateYoutubeDefaultPlaylist200Response data, response status code and response headers
|
|
2120
|
+
def update_youtube_default_playlist_with_http_info(account_id, update_youtube_default_playlist_request, opts = {})
|
|
2121
|
+
if @api_client.config.debugging
|
|
2122
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.update_youtube_default_playlist ...'
|
|
2123
|
+
end
|
|
2124
|
+
# verify the required parameter 'account_id' is set
|
|
2125
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2126
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectApi.update_youtube_default_playlist"
|
|
2127
|
+
end
|
|
2128
|
+
# verify the required parameter 'update_youtube_default_playlist_request' is set
|
|
2129
|
+
if @api_client.config.client_side_validation && update_youtube_default_playlist_request.nil?
|
|
2130
|
+
fail ArgumentError, "Missing the required parameter 'update_youtube_default_playlist_request' when calling ConnectApi.update_youtube_default_playlist"
|
|
2131
|
+
end
|
|
2132
|
+
# resource path
|
|
2133
|
+
local_var_path = '/v1/accounts/{accountId}/youtube-playlists'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2134
|
+
|
|
2135
|
+
# query parameters
|
|
2136
|
+
query_params = opts[:query_params] || {}
|
|
2137
|
+
|
|
2138
|
+
# header parameters
|
|
2139
|
+
header_params = opts[:header_params] || {}
|
|
2140
|
+
# HTTP header 'Accept' (if needed)
|
|
2141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2142
|
+
# HTTP header 'Content-Type'
|
|
2143
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2144
|
+
if !content_type.nil?
|
|
2145
|
+
header_params['Content-Type'] = content_type
|
|
2146
|
+
end
|
|
2147
|
+
|
|
2148
|
+
# form parameters
|
|
2149
|
+
form_params = opts[:form_params] || {}
|
|
2150
|
+
|
|
2151
|
+
# http body (model)
|
|
2152
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_youtube_default_playlist_request)
|
|
2153
|
+
|
|
2154
|
+
# return_type
|
|
2155
|
+
return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response'
|
|
2156
|
+
|
|
2157
|
+
# auth_names
|
|
2158
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2159
|
+
|
|
2160
|
+
new_options = opts.merge(
|
|
2161
|
+
:operation => :"ConnectApi.update_youtube_default_playlist",
|
|
2162
|
+
:header_params => header_params,
|
|
2163
|
+
:query_params => query_params,
|
|
2164
|
+
:form_params => form_params,
|
|
2165
|
+
:body => post_body,
|
|
2166
|
+
:auth_names => auth_names,
|
|
2167
|
+
:return_type => return_type
|
|
2168
|
+
)
|
|
2169
|
+
|
|
2170
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2171
|
+
if @api_client.config.debugging
|
|
2172
|
+
@api_client.config.logger.debug "API called: ConnectApi#update_youtube_default_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2173
|
+
end
|
|
2174
|
+
return data, status_code, headers
|
|
2175
|
+
end
|
|
2039
2176
|
end
|
|
2040
2177
|
end
|
|
@@ -25,7 +25,7 @@ module Late
|
|
|
25
25
|
# @param message_id [String] The platform message ID to react to
|
|
26
26
|
# @param add_message_reaction_request [AddMessageReactionRequest]
|
|
27
27
|
# @param [Hash] opts the optional parameters
|
|
28
|
-
# @return [
|
|
28
|
+
# @return [UpdateYoutubeDefaultPlaylist200Response]
|
|
29
29
|
def add_message_reaction(conversation_id, message_id, add_message_reaction_request, opts = {})
|
|
30
30
|
data, _status_code, _headers = add_message_reaction_with_http_info(conversation_id, message_id, add_message_reaction_request, opts)
|
|
31
31
|
data
|
|
@@ -37,7 +37,7 @@ module Late
|
|
|
37
37
|
# @param message_id [String] The platform message ID to react to
|
|
38
38
|
# @param add_message_reaction_request [AddMessageReactionRequest]
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
|
-
# @return [Array<(
|
|
40
|
+
# @return [Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>] UpdateYoutubeDefaultPlaylist200Response data, response status code and response headers
|
|
41
41
|
def add_message_reaction_with_http_info(conversation_id, message_id, add_message_reaction_request, opts = {})
|
|
42
42
|
if @api_client.config.debugging
|
|
43
43
|
@api_client.config.logger.debug 'Calling API: MessagesApi.add_message_reaction ...'
|
|
@@ -77,7 +77,7 @@ module Late
|
|
|
77
77
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_message_reaction_request)
|
|
78
78
|
|
|
79
79
|
# return_type
|
|
80
|
-
return_type = opts[:debug_return_type] || '
|
|
80
|
+
return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response'
|
|
81
81
|
|
|
82
82
|
# auth_names
|
|
83
83
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -105,7 +105,7 @@ module Late
|
|
|
105
105
|
# @param message_id [String] The platform message ID to delete
|
|
106
106
|
# @param account_id [String] Social account ID
|
|
107
107
|
# @param [Hash] opts the optional parameters
|
|
108
|
-
# @return [
|
|
108
|
+
# @return [UpdateYoutubeDefaultPlaylist200Response]
|
|
109
109
|
def delete_inbox_message(conversation_id, message_id, account_id, opts = {})
|
|
110
110
|
data, _status_code, _headers = delete_inbox_message_with_http_info(conversation_id, message_id, account_id, opts)
|
|
111
111
|
data
|
|
@@ -117,7 +117,7 @@ module Late
|
|
|
117
117
|
# @param message_id [String] The platform message ID to delete
|
|
118
118
|
# @param account_id [String] Social account ID
|
|
119
119
|
# @param [Hash] opts the optional parameters
|
|
120
|
-
# @return [Array<(
|
|
120
|
+
# @return [Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>] UpdateYoutubeDefaultPlaylist200Response data, response status code and response headers
|
|
121
121
|
def delete_inbox_message_with_http_info(conversation_id, message_id, account_id, opts = {})
|
|
122
122
|
if @api_client.config.debugging
|
|
123
123
|
@api_client.config.logger.debug 'Calling API: MessagesApi.delete_inbox_message ...'
|
|
@@ -153,7 +153,7 @@ module Late
|
|
|
153
153
|
post_body = opts[:debug_body]
|
|
154
154
|
|
|
155
155
|
# return_type
|
|
156
|
-
return_type = opts[:debug_return_type] || '
|
|
156
|
+
return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response'
|
|
157
157
|
|
|
158
158
|
# auth_names
|
|
159
159
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -499,7 +499,7 @@ module Late
|
|
|
499
499
|
# @param message_id [String] The platform message ID
|
|
500
500
|
# @param account_id [String] Social account ID
|
|
501
501
|
# @param [Hash] opts the optional parameters
|
|
502
|
-
# @return [
|
|
502
|
+
# @return [UpdateYoutubeDefaultPlaylist200Response]
|
|
503
503
|
def remove_message_reaction(conversation_id, message_id, account_id, opts = {})
|
|
504
504
|
data, _status_code, _headers = remove_message_reaction_with_http_info(conversation_id, message_id, account_id, opts)
|
|
505
505
|
data
|
|
@@ -511,7 +511,7 @@ module Late
|
|
|
511
511
|
# @param message_id [String] The platform message ID
|
|
512
512
|
# @param account_id [String] Social account ID
|
|
513
513
|
# @param [Hash] opts the optional parameters
|
|
514
|
-
# @return [Array<(
|
|
514
|
+
# @return [Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>] UpdateYoutubeDefaultPlaylist200Response data, response status code and response headers
|
|
515
515
|
def remove_message_reaction_with_http_info(conversation_id, message_id, account_id, opts = {})
|
|
516
516
|
if @api_client.config.debugging
|
|
517
517
|
@api_client.config.logger.debug 'Calling API: MessagesApi.remove_message_reaction ...'
|
|
@@ -547,7 +547,7 @@ module Late
|
|
|
547
547
|
post_body = opts[:debug_body]
|
|
548
548
|
|
|
549
549
|
# return_type
|
|
550
|
-
return_type = opts[:debug_return_type] || '
|
|
550
|
+
return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response'
|
|
551
551
|
|
|
552
552
|
# auth_names
|
|
553
553
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -648,7 +648,7 @@ module Late
|
|
|
648
648
|
# @param conversation_id [String] The conversation ID
|
|
649
649
|
# @param send_typing_indicator_request [SendTypingIndicatorRequest]
|
|
650
650
|
# @param [Hash] opts the optional parameters
|
|
651
|
-
# @return [
|
|
651
|
+
# @return [UpdateYoutubeDefaultPlaylist200Response]
|
|
652
652
|
def send_typing_indicator(conversation_id, send_typing_indicator_request, opts = {})
|
|
653
653
|
data, _status_code, _headers = send_typing_indicator_with_http_info(conversation_id, send_typing_indicator_request, opts)
|
|
654
654
|
data
|
|
@@ -659,7 +659,7 @@ module Late
|
|
|
659
659
|
# @param conversation_id [String] The conversation ID
|
|
660
660
|
# @param send_typing_indicator_request [SendTypingIndicatorRequest]
|
|
661
661
|
# @param [Hash] opts the optional parameters
|
|
662
|
-
# @return [Array<(
|
|
662
|
+
# @return [Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>] UpdateYoutubeDefaultPlaylist200Response data, response status code and response headers
|
|
663
663
|
def send_typing_indicator_with_http_info(conversation_id, send_typing_indicator_request, opts = {})
|
|
664
664
|
if @api_client.config.debugging
|
|
665
665
|
@api_client.config.logger.debug 'Calling API: MessagesApi.send_typing_indicator ...'
|
|
@@ -695,7 +695,7 @@ module Late
|
|
|
695
695
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(send_typing_indicator_request)
|
|
696
696
|
|
|
697
697
|
# return_type
|
|
698
|
-
return_type = opts[:debug_return_type] || '
|
|
698
|
+
return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response'
|
|
699
699
|
|
|
700
700
|
# auth_names
|
|
701
701
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -91,7 +91,7 @@ module Late
|
|
|
91
91
|
# Permanently delete a webhook configuration.
|
|
92
92
|
# @param id [String] Webhook ID to delete
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
|
-
# @return [
|
|
94
|
+
# @return [UpdateYoutubeDefaultPlaylist200Response]
|
|
95
95
|
def delete_webhook_settings(id, opts = {})
|
|
96
96
|
data, _status_code, _headers = delete_webhook_settings_with_http_info(id, opts)
|
|
97
97
|
data
|
|
@@ -101,7 +101,7 @@ module Late
|
|
|
101
101
|
# Permanently delete a webhook configuration.
|
|
102
102
|
# @param id [String] Webhook ID to delete
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
104
|
-
# @return [Array<(
|
|
104
|
+
# @return [Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>] UpdateYoutubeDefaultPlaylist200Response data, response status code and response headers
|
|
105
105
|
def delete_webhook_settings_with_http_info(id, opts = {})
|
|
106
106
|
if @api_client.config.debugging
|
|
107
107
|
@api_client.config.logger.debug 'Calling API: WebhooksApi.delete_webhook_settings ...'
|
|
@@ -129,7 +129,7 @@ module Late
|
|
|
129
129
|
post_body = opts[:debug_body]
|
|
130
130
|
|
|
131
131
|
# return_type
|
|
132
|
-
return_type = opts[:debug_return_type] || '
|
|
132
|
+
return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response'
|
|
133
133
|
|
|
134
134
|
# auth_names
|
|
135
135
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -0,0 +1,158 @@
|
|
|
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 GetYoutubePlaylists200Response < ApiModelBase
|
|
18
|
+
attr_accessor :playlists
|
|
19
|
+
|
|
20
|
+
attr_accessor :default_playlist_id
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'playlists' => :'playlists',
|
|
26
|
+
:'default_playlist_id' => :'defaultPlaylistId'
|
|
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
|
+
:'playlists' => :'Array<GetYoutubePlaylists200ResponsePlaylistsInner>',
|
|
44
|
+
:'default_playlist_id' => :'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::GetYoutubePlaylists200Response` 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::GetYoutubePlaylists200Response`. 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?(:'playlists')
|
|
71
|
+
if (value = attributes[:'playlists']).is_a?(Array)
|
|
72
|
+
self.playlists = value
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'default_playlist_id')
|
|
77
|
+
self.default_playlist_id = attributes[:'default_playlist_id']
|
|
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
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
|
+
true
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Checks equality by comparing each attribute.
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def ==(o)
|
|
99
|
+
return true if self.equal?(o)
|
|
100
|
+
self.class == o.class &&
|
|
101
|
+
playlists == o.playlists &&
|
|
102
|
+
default_playlist_id == o.default_playlist_id
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see the `==` method
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def eql?(o)
|
|
108
|
+
self == o
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Calculates hash code according to all attributes.
|
|
112
|
+
# @return [Integer] Hash code
|
|
113
|
+
def hash
|
|
114
|
+
[playlists, default_playlist_id].hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def self.build_from_hash(attributes)
|
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
|
122
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
123
|
+
transformed_hash = {}
|
|
124
|
+
openapi_types.each_pair do |key, type|
|
|
125
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
126
|
+
transformed_hash["#{key}"] = nil
|
|
127
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
128
|
+
# check to ensure the input is an array given that the attribute
|
|
129
|
+
# is documented as an array but the input is not
|
|
130
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
131
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
132
|
+
end
|
|
133
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
new(transformed_hash)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Returns the object in the form of hash
|
|
141
|
+
# @return [Hash] Returns the object in the form of hash
|
|
142
|
+
def to_hash
|
|
143
|
+
hash = {}
|
|
144
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
145
|
+
value = self.send(attr)
|
|
146
|
+
if value.nil?
|
|
147
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
148
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
hash[param] = _to_hash(value)
|
|
152
|
+
end
|
|
153
|
+
hash
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
end
|