tmdb_ryanstep 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 +7 -0
- data/lib/environment.rb +7 -0
- data/lib/gemconfig.rb +14 -0
- data/lib/requests.rb +163 -0
- data/lib/tmdb_ryanstep/types/account_favorite_movies_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_favorite_movies_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_favorite_movies_response_results_item.rb +169 -0
- data/lib/tmdb_ryanstep/types/account_favorite_tv_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_favorite_tv_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_favorite_tv_response_results_item.rb +167 -0
- data/lib/tmdb_ryanstep/types/account_lists_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_lists_response_results_item.rb +183 -0
- data/lib/tmdb_ryanstep/types/account_movie_recommendations_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_movie_recommendations_response_results_item.rb +177 -0
- data/lib/tmdb_ryanstep/types/account_movie_watchlist_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_movie_watchlist_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_movie_watchlist_response_results_item.rb +177 -0
- data/lib/tmdb_ryanstep/types/account_rated_movies_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_rated_movies_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_rated_movies_response_results_item.rb +182 -0
- data/lib/tmdb_ryanstep/types/account_rated_movies_response_results_item_account_rating.rb +69 -0
- data/lib/tmdb_ryanstep/types/account_rated_tv_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_rated_tv_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_rated_tv_response_results_item.rb +181 -0
- data/lib/tmdb_ryanstep/types/account_rated_tv_response_results_item_account_rating.rb +69 -0
- data/lib/tmdb_ryanstep/types/account_tv_recommendations_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_tv_recommendations_response_results_item.rb +177 -0
- data/lib/tmdb_ryanstep/types/account_tv_watchlist_request_sort_by.rb +8 -0
- data/lib/tmdb_ryanstep/types/account_tv_watchlist_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/account_tv_watchlist_response_results_item.rb +176 -0
- data/lib/tmdb_ryanstep/types/auth_create_access_token_response.rb +95 -0
- data/lib/tmdb_ryanstep/types/auth_create_request_token_response.rb +87 -0
- data/lib/tmdb_ryanstep/types/auth_logout_response.rb +78 -0
- data/lib/tmdb_ryanstep/types/list_add_items_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/list_add_items_response_results_item.rb +74 -0
- data/lib/tmdb_ryanstep/types/list_clear_response.rb +95 -0
- data/lib/tmdb_ryanstep/types/list_create_response.rb +86 -0
- data/lib/tmdb_ryanstep/types/list_delete_response.rb +78 -0
- data/lib/tmdb_ryanstep/types/list_details_response.rb +237 -0
- data/lib/tmdb_ryanstep/types/list_details_response_comments.rb +215 -0
- data/lib/tmdb_ryanstep/types/list_details_response_created_by.rb +95 -0
- data/lib/tmdb_ryanstep/types/list_details_response_object_ids.rb +47 -0
- data/lib/tmdb_ryanstep/types/list_details_response_results_item.rb +175 -0
- data/lib/tmdb_ryanstep/types/list_item_status_request_media_type.rb +9 -0
- data/lib/tmdb_ryanstep/types/list_item_status_response.rb +103 -0
- data/lib/tmdb_ryanstep/types/list_remove_items_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/list_remove_items_response_results_item.rb +74 -0
- data/lib/tmdb_ryanstep/types/list_update_items_response.rb +90 -0
- data/lib/tmdb_ryanstep/types/list_update_items_response_results_item.rb +74 -0
- data/lib/tmdb_ryanstep/types/list_update_response.rb +78 -0
- data/lib/tmdb_ryanstep.rb +1557 -0
- data/lib/types_export.rb +48 -0
- metadata +175 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module TmdbApiClient
|
7
|
+
class ListUpdateResponse
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :status_message
|
10
|
+
# @return [Boolean]
|
11
|
+
attr_reader :success
|
12
|
+
# @return [Integer]
|
13
|
+
attr_reader :status_code
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param status_message [String]
|
23
|
+
# @param success [Boolean]
|
24
|
+
# @param status_code [Integer]
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [TmdbApiClient::ListUpdateResponse]
|
27
|
+
def initialize(status_message: OMIT, success: OMIT, status_code: OMIT, additional_properties: nil)
|
28
|
+
@status_message = status_message if status_message != OMIT
|
29
|
+
@success = success if success != OMIT
|
30
|
+
@status_code = status_code if status_code != OMIT
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = {
|
33
|
+
"status_message": status_message,
|
34
|
+
"success": success,
|
35
|
+
"status_code": status_code
|
36
|
+
}.reject do |_k, v|
|
37
|
+
v == OMIT
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# Deserialize a JSON object to an instance of ListUpdateResponse
|
42
|
+
#
|
43
|
+
# @param json_object [String]
|
44
|
+
# @return [TmdbApiClient::ListUpdateResponse]
|
45
|
+
def self.from_json(json_object:)
|
46
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
47
|
+
parsed_json = JSON.parse(json_object)
|
48
|
+
status_message = parsed_json["status_message"]
|
49
|
+
success = parsed_json["success"]
|
50
|
+
status_code = parsed_json["status_code"]
|
51
|
+
new(
|
52
|
+
status_message: status_message,
|
53
|
+
success: success,
|
54
|
+
status_code: status_code,
|
55
|
+
additional_properties: struct
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Serialize an instance of ListUpdateResponse to a JSON object
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
def to_json(*_args)
|
63
|
+
@_field_set&.to_json
|
64
|
+
end
|
65
|
+
|
66
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
67
|
+
# hash and check each fields type against the current object's property
|
68
|
+
# definitions.
|
69
|
+
#
|
70
|
+
# @param obj [Object]
|
71
|
+
# @return [Void]
|
72
|
+
def self.validate_raw(obj:)
|
73
|
+
obj.status_message&.is_a?(String) != false || raise("Passed value for field obj.status_message is not the expected type, validation failed.")
|
74
|
+
obj.success&.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
75
|
+
obj.status_code&.is_a?(Integer) != false || raise("Passed value for field obj.status_code is not the expected type, validation failed.")
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|