rixl 0.1.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.
Files changed (102) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/CODE_OF_CONDUCT.md +10 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +43 -0
  6. data/Rakefile +8 -0
  7. data/lib/feeds/feeds.rb +0 -0
  8. data/lib/feeds/feeds_request_builder.rb +34 -0
  9. data/lib/feeds/item/creators/creators.rb +0 -0
  10. data/lib/feeds/item/creators/creators_request_builder.rb +40 -0
  11. data/lib/feeds/item/creators/item/item.rb +0 -0
  12. data/lib/feeds/item/creators/item/with_creator_item_request_builder.rb +86 -0
  13. data/lib/feeds/item/item/item.rb +0 -0
  14. data/lib/feeds/item/item/with_post_item_request_builder.rb +70 -0
  15. data/lib/feeds/item/item.rb +0 -0
  16. data/lib/feeds/item/with_feed_item_request_builder.rb +98 -0
  17. data/lib/images/images.rb +0 -0
  18. data/lib/images/images_request_builder.rb +103 -0
  19. data/lib/images/item/item.rb +0 -0
  20. data/lib/images/item/with_image_item_request_builder.rb +104 -0
  21. data/lib/images/upload/complete/complete.rb +0 -0
  22. data/lib/images/upload/complete/complete_request_builder.rb +79 -0
  23. data/lib/images/upload/init/init.rb +0 -0
  24. data/lib/images/upload/init/init_request_builder.rb +78 -0
  25. data/lib/images/upload/upload.rb +0 -0
  26. data/lib/images/upload/upload_request_builder.rb +37 -0
  27. data/lib/kiota-lock.json +34 -0
  28. data/lib/models/audio_track.rb +242 -0
  29. data/lib/models/audio_track_delete.rb +102 -0
  30. data/lib/models/chapter.rb +142 -0
  31. data/lib/models/file.rb +242 -0
  32. data/lib/models/file_status.rb +12 -0
  33. data/lib/models/github_com_rixlhq_api_db_sqlc/github_com_rixlhq_api_db_sqlc.rb +0 -0
  34. data/lib/models/github_com_rixlhq_api_db_sqlc_plan_type.rb +10 -0
  35. data/lib/models/github_com_rixlhq_api_db_sqlc_video_quality.rb +9 -0
  36. data/lib/models/github_com_rixlhq_api_internal_errors/github_com_rixlhq_api_internal_errors.rb +0 -0
  37. data/lib/models/github_com_rixlhq_api_internal_errors_error_response.rb +126 -0
  38. data/lib/models/github_com_rixlhq_api_internal_videos/github_com_rixlhq_api_internal_videos.rb +0 -0
  39. data/lib/models/github_com_rixlhq_api_internal_videos_handler_upload/github_com_rixlhq_api_internal_videos_handler_upload.rb +0 -0
  40. data/lib/models/github_com_rixlhq_api_internal_videos_handler_upload_complete_request.rb +84 -0
  41. data/lib/models/github_com_rixlhq_api_internal_videos_handler_upload_init_response.rb +162 -0
  42. data/lib/models/github_com_rixlhq_api_internal_videos_types/github_com_rixlhq_api_internal_videos_types.rb +0 -0
  43. data/lib/models/github_com_rixlhq_api_internal_videos_types_chapter_input.rb +102 -0
  44. data/lib/models/github_com_rixlhq_api_internal_videos_video_response.rb +302 -0
  45. data/lib/models/image.rb +182 -0
  46. data/lib/models/internal_images_handler/internal_images_handler.rb +0 -0
  47. data/lib/models/internal_images_handler_complete_request.rb +104 -0
  48. data/lib/models/internal_images_handler_init_response.rb +122 -0
  49. data/lib/models/internal_images_handler_upload_init_request.rb +104 -0
  50. data/lib/models/internal_videos_handler_subtitles/internal_videos_handler_subtitles.rb +0 -0
  51. data/lib/models/internal_videos_handler_subtitles_language_response.rb +102 -0
  52. data/lib/models/models.rb +29 -0
  53. data/lib/models/pagination/pagination.rb +0 -0
  54. data/lib/models/pagination_paginated_response_image.rb +102 -0
  55. data/lib/models/pagination_paginated_response_post.rb +102 -0
  56. data/lib/models/pagination_paginated_response_video.rb +102 -0
  57. data/lib/models/pagination_pagination.rb +124 -0
  58. data/lib/models/post.rb +262 -0
  59. data/lib/models/post_type.rb +8 -0
  60. data/lib/models/subtitle.rb +222 -0
  61. data/lib/models/subtitle_delete.rb +102 -0
  62. data/lib/models/update_chapters_request.rb +84 -0
  63. data/lib/models/update_chapters_response.rb +102 -0
  64. data/lib/models/video.rb +302 -0
  65. data/lib/models/video_upload_init_request.rb +124 -0
  66. data/lib/rixl.rb +43 -0
  67. data/lib/videos/item/audio_tracks/audio_tracks.rb +0 -0
  68. data/lib/videos/item/audio_tracks/audio_tracks_request_builder.rb +118 -0
  69. data/lib/videos/item/audio_tracks/item/item.rb +0 -0
  70. data/lib/videos/item/audio_tracks/item/with_track_item_request_builder.rb +75 -0
  71. data/lib/videos/item/audio_tracks/language/item/item.rb +0 -0
  72. data/lib/videos/item/audio_tracks/language/item/with_lang_code_item_request_builder.rb +106 -0
  73. data/lib/videos/item/audio_tracks/language/language.rb +0 -0
  74. data/lib/videos/item/audio_tracks/language/language_request_builder.rb +43 -0
  75. data/lib/videos/item/chapters/chapters.rb +0 -0
  76. data/lib/videos/item/chapters/chapters_request_builder.rb +112 -0
  77. data/lib/videos/item/delete/delete.rb +0 -0
  78. data/lib/videos/item/delete/delete_request_builder.rb +72 -0
  79. data/lib/videos/item/item.rb +0 -0
  80. data/lib/videos/item/subtitles/item/item.rb +0 -0
  81. data/lib/videos/item/subtitles/item/with_subtitle_item_request_builder.rb +75 -0
  82. data/lib/videos/item/subtitles/language/item/item.rb +0 -0
  83. data/lib/videos/item/subtitles/language/item/with_lang_code_item_request_builder.rb +106 -0
  84. data/lib/videos/item/subtitles/language/language.rb +0 -0
  85. data/lib/videos/item/subtitles/language/language_request_builder.rb +43 -0
  86. data/lib/videos/item/subtitles/subtitles.rb +0 -0
  87. data/lib/videos/item/subtitles/subtitles_request_builder.rb +118 -0
  88. data/lib/videos/item/thumbnail/thumbnail.rb +0 -0
  89. data/lib/videos/item/thumbnail/thumbnail_request_builder.rb +78 -0
  90. data/lib/videos/item/with_video_item_request_builder.rb +100 -0
  91. data/lib/videos/languages/languages.rb +0 -0
  92. data/lib/videos/languages/languages_request_builder.rb +63 -0
  93. data/lib/videos/upload/complete/complete.rb +0 -0
  94. data/lib/videos/upload/complete/complete_request_builder.rb +79 -0
  95. data/lib/videos/upload/init/init.rb +0 -0
  96. data/lib/videos/upload/init/init_request_builder.rb +78 -0
  97. data/lib/videos/upload/upload.rb +0 -0
  98. data/lib/videos/upload/upload_request_builder.rb +37 -0
  99. data/lib/videos/videos.rb +0 -0
  100. data/lib/videos/videos_request_builder.rb +109 -0
  101. data/sig/rixl.rbs +4 -0
  102. metadata +187 -0
@@ -0,0 +1,302 @@
1
+ require 'microsoft_kiota_abstractions'
2
+ require_relative '../rixl'
3
+ require_relative './models'
4
+
5
+ module Rixl
6
+ module Models
7
+ class Video
8
+ include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
9
+ ##
10
+ # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
11
+ @additional_data
12
+ ##
13
+ # The bitrate property
14
+ @bitrate
15
+ ##
16
+ # The chapters property
17
+ @chapters
18
+ ##
19
+ # The codec property
20
+ @codec
21
+ ##
22
+ # The duration property
23
+ @duration
24
+ ##
25
+ # The file property
26
+ @file
27
+ ##
28
+ # The framerate property
29
+ @framerate
30
+ ##
31
+ # The hdr property
32
+ @hdr
33
+ ##
34
+ # The height property
35
+ @height
36
+ ##
37
+ # The id property
38
+ @id
39
+ ##
40
+ # The plan_type property
41
+ @plan_type
42
+ ##
43
+ # The poster property
44
+ @poster
45
+ ##
46
+ # The width property
47
+ @width
48
+ ##
49
+ ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
50
+ ## @return a i_dictionary
51
+ ##
52
+ def additional_data
53
+ return @additional_data
54
+ end
55
+ ##
56
+ ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
57
+ ## @param value Value to set for the AdditionalData property.
58
+ ## @return a void
59
+ ##
60
+ def additional_data=(value)
61
+ @additional_data = value
62
+ end
63
+ ##
64
+ ## Gets the bitrate property value. The bitrate property
65
+ ## @return a integer
66
+ ##
67
+ def bitrate
68
+ return @bitrate
69
+ end
70
+ ##
71
+ ## Sets the bitrate property value. The bitrate property
72
+ ## @param value Value to set for the bitrate property.
73
+ ## @return a void
74
+ ##
75
+ def bitrate=(value)
76
+ @bitrate = value
77
+ end
78
+ ##
79
+ ## Gets the chapters property value. The chapters property
80
+ ## @return a chapter
81
+ ##
82
+ def chapters
83
+ return @chapters
84
+ end
85
+ ##
86
+ ## Sets the chapters property value. The chapters property
87
+ ## @param value Value to set for the chapters property.
88
+ ## @return a void
89
+ ##
90
+ def chapters=(value)
91
+ @chapters = value
92
+ end
93
+ ##
94
+ ## Gets the codec property value. The codec property
95
+ ## @return a string
96
+ ##
97
+ def codec
98
+ return @codec
99
+ end
100
+ ##
101
+ ## Sets the codec property value. The codec property
102
+ ## @param value Value to set for the codec property.
103
+ ## @return a void
104
+ ##
105
+ def codec=(value)
106
+ @codec = value
107
+ end
108
+ ##
109
+ ## Instantiates a new Video and sets the default values.
110
+ ## @return a void
111
+ ##
112
+ def initialize()
113
+ @additional_data = Hash.new
114
+ end
115
+ ##
116
+ ## Creates a new instance of the appropriate class based on discriminator value
117
+ ## @param parse_node The parse node to use to read the discriminator value and create the object
118
+ ## @return a video
119
+ ##
120
+ def self.create_from_discriminator_value(parse_node)
121
+ raise StandardError, 'parse_node cannot be null' if parse_node.nil?
122
+ return Video.new
123
+ end
124
+ ##
125
+ ## Gets the duration property value. The duration property
126
+ ## @return a double
127
+ ##
128
+ def duration
129
+ return @duration
130
+ end
131
+ ##
132
+ ## Sets the duration property value. The duration property
133
+ ## @param value Value to set for the duration property.
134
+ ## @return a void
135
+ ##
136
+ def duration=(value)
137
+ @duration = value
138
+ end
139
+ ##
140
+ ## Gets the file property value. The file property
141
+ ## @return a file
142
+ ##
143
+ def file
144
+ return @file
145
+ end
146
+ ##
147
+ ## Sets the file property value. The file property
148
+ ## @param value Value to set for the file property.
149
+ ## @return a void
150
+ ##
151
+ def file=(value)
152
+ @file = value
153
+ end
154
+ ##
155
+ ## Gets the framerate property value. The framerate property
156
+ ## @return a string
157
+ ##
158
+ def framerate
159
+ return @framerate
160
+ end
161
+ ##
162
+ ## Sets the framerate property value. The framerate property
163
+ ## @param value Value to set for the framerate property.
164
+ ## @return a void
165
+ ##
166
+ def framerate=(value)
167
+ @framerate = value
168
+ end
169
+ ##
170
+ ## The deserialization information for the current model
171
+ ## @return a i_dictionary
172
+ ##
173
+ def get_field_deserializers()
174
+ return {
175
+ "bitrate" => lambda {|n| @bitrate = n.get_number_value() },
176
+ "chapters" => lambda {|n| @chapters = n.get_collection_of_object_values(lambda {|pn| Rixl::Models::Chapter.create_from_discriminator_value(pn) }) },
177
+ "codec" => lambda {|n| @codec = n.get_string_value() },
178
+ "duration" => lambda {|n| @duration = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
179
+ "file" => lambda {|n| @file = n.get_object_value(lambda {|pn| Rixl::Models::File.create_from_discriminator_value(pn) }) },
180
+ "framerate" => lambda {|n| @framerate = n.get_string_value() },
181
+ "hdr" => lambda {|n| @hdr = n.get_boolean_value() },
182
+ "height" => lambda {|n| @height = n.get_number_value() },
183
+ "id" => lambda {|n| @id = n.get_string_value() },
184
+ "plan_type" => lambda {|n| @plan_type = n.get_enum_value(Rixl::Models::Github_com_rixlhq_api_db_sqlcPlanType) },
185
+ "poster" => lambda {|n| @poster = n.get_object_value(lambda {|pn| Rixl::Models::Image.create_from_discriminator_value(pn) }) },
186
+ "width" => lambda {|n| @width = n.get_number_value() },
187
+ }
188
+ end
189
+ ##
190
+ ## Gets the hdr property value. The hdr property
191
+ ## @return a boolean
192
+ ##
193
+ def hdr
194
+ return @hdr
195
+ end
196
+ ##
197
+ ## Sets the hdr property value. The hdr property
198
+ ## @param value Value to set for the hdr property.
199
+ ## @return a void
200
+ ##
201
+ def hdr=(value)
202
+ @hdr = value
203
+ end
204
+ ##
205
+ ## Gets the height property value. The height property
206
+ ## @return a integer
207
+ ##
208
+ def height
209
+ return @height
210
+ end
211
+ ##
212
+ ## Sets the height property value. The height property
213
+ ## @param value Value to set for the height property.
214
+ ## @return a void
215
+ ##
216
+ def height=(value)
217
+ @height = value
218
+ end
219
+ ##
220
+ ## Gets the id property value. The id property
221
+ ## @return a string
222
+ ##
223
+ def id
224
+ return @id
225
+ end
226
+ ##
227
+ ## Sets the id property value. The id property
228
+ ## @param value Value to set for the id property.
229
+ ## @return a void
230
+ ##
231
+ def id=(value)
232
+ @id = value
233
+ end
234
+ ##
235
+ ## Gets the plan_type property value. The plan_type property
236
+ ## @return a github_com_rixlhq_api_db_sqlc_plan_type
237
+ ##
238
+ def plan_type
239
+ return @plan_type
240
+ end
241
+ ##
242
+ ## Sets the plan_type property value. The plan_type property
243
+ ## @param value Value to set for the plan_type property.
244
+ ## @return a void
245
+ ##
246
+ def plan_type=(value)
247
+ @plan_type = value
248
+ end
249
+ ##
250
+ ## Gets the poster property value. The poster property
251
+ ## @return a image
252
+ ##
253
+ def poster
254
+ return @poster
255
+ end
256
+ ##
257
+ ## Sets the poster property value. The poster property
258
+ ## @param value Value to set for the poster property.
259
+ ## @return a void
260
+ ##
261
+ def poster=(value)
262
+ @poster = value
263
+ end
264
+ ##
265
+ ## Serializes information the current object
266
+ ## @param writer Serialization writer to use to serialize this model
267
+ ## @return a void
268
+ ##
269
+ def serialize(writer)
270
+ raise StandardError, 'writer cannot be null' if writer.nil?
271
+ writer.write_number_value("bitrate", @bitrate)
272
+ writer.write_collection_of_object_values("chapters", @chapters)
273
+ writer.write_string_value("codec", @codec)
274
+ writer.write_object_value("duration", @duration)
275
+ writer.write_object_value("file", @file)
276
+ writer.write_string_value("framerate", @framerate)
277
+ writer.write_boolean_value("hdr", @hdr)
278
+ writer.write_number_value("height", @height)
279
+ writer.write_string_value("id", @id)
280
+ writer.write_enum_value("plan_type", @plan_type)
281
+ writer.write_object_value("poster", @poster)
282
+ writer.write_number_value("width", @width)
283
+ writer.write_additional_data(@additional_data)
284
+ end
285
+ ##
286
+ ## Gets the width property value. The width property
287
+ ## @return a integer
288
+ ##
289
+ def width
290
+ return @width
291
+ end
292
+ ##
293
+ ## Sets the width property value. The width property
294
+ ## @param value Value to set for the width property.
295
+ ## @return a void
296
+ ##
297
+ def width=(value)
298
+ @width = value
299
+ end
300
+ end
301
+ end
302
+ end
@@ -0,0 +1,124 @@
1
+ require 'microsoft_kiota_abstractions'
2
+ require_relative '../rixl'
3
+ require_relative './models'
4
+
5
+ module Rixl
6
+ module Models
7
+ ##
8
+ # Video upload initialization request
9
+ class VideoUploadInitRequest
10
+ include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
11
+ ##
12
+ # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
13
+ @additional_data
14
+ ##
15
+ # The file_name property
16
+ @file_name
17
+ ##
18
+ # The image_format property
19
+ @image_format
20
+ ##
21
+ # The video_quality property
22
+ @video_quality
23
+ ##
24
+ ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
25
+ ## @return a i_dictionary
26
+ ##
27
+ def additional_data
28
+ return @additional_data
29
+ end
30
+ ##
31
+ ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
32
+ ## @param value Value to set for the AdditionalData property.
33
+ ## @return a void
34
+ ##
35
+ def additional_data=(value)
36
+ @additional_data = value
37
+ end
38
+ ##
39
+ ## Instantiates a new VideoUploadInitRequest and sets the default values.
40
+ ## @return a void
41
+ ##
42
+ def initialize()
43
+ @additional_data = Hash.new
44
+ end
45
+ ##
46
+ ## Creates a new instance of the appropriate class based on discriminator value
47
+ ## @param parse_node The parse node to use to read the discriminator value and create the object
48
+ ## @return a video_upload_init_request
49
+ ##
50
+ def self.create_from_discriminator_value(parse_node)
51
+ raise StandardError, 'parse_node cannot be null' if parse_node.nil?
52
+ return VideoUploadInitRequest.new
53
+ end
54
+ ##
55
+ ## Gets the file_name property value. The file_name property
56
+ ## @return a string
57
+ ##
58
+ def file_name
59
+ return @file_name
60
+ end
61
+ ##
62
+ ## Sets the file_name property value. The file_name property
63
+ ## @param value Value to set for the file_name property.
64
+ ## @return a void
65
+ ##
66
+ def file_name=(value)
67
+ @file_name = value
68
+ end
69
+ ##
70
+ ## The deserialization information for the current model
71
+ ## @return a i_dictionary
72
+ ##
73
+ def get_field_deserializers()
74
+ return {
75
+ "file_name" => lambda {|n| @file_name = n.get_string_value() },
76
+ "image_format" => lambda {|n| @image_format = n.get_string_value() },
77
+ "video_quality" => lambda {|n| @video_quality = n.get_enum_value(Rixl::Models::Github_com_rixlhq_api_db_sqlcVideoQuality) },
78
+ }
79
+ end
80
+ ##
81
+ ## Gets the image_format property value. The image_format property
82
+ ## @return a string
83
+ ##
84
+ def image_format
85
+ return @image_format
86
+ end
87
+ ##
88
+ ## Sets the image_format property value. The image_format property
89
+ ## @param value Value to set for the image_format property.
90
+ ## @return a void
91
+ ##
92
+ def image_format=(value)
93
+ @image_format = value
94
+ end
95
+ ##
96
+ ## Serializes information the current object
97
+ ## @param writer Serialization writer to use to serialize this model
98
+ ## @return a void
99
+ ##
100
+ def serialize(writer)
101
+ raise StandardError, 'writer cannot be null' if writer.nil?
102
+ writer.write_string_value("file_name", @file_name)
103
+ writer.write_string_value("image_format", @image_format)
104
+ writer.write_enum_value("video_quality", @video_quality)
105
+ writer.write_additional_data(@additional_data)
106
+ end
107
+ ##
108
+ ## Gets the video_quality property value. The video_quality property
109
+ ## @return a github_com_rixlhq_api_db_sqlc_video_quality
110
+ ##
111
+ def video_quality
112
+ return @video_quality
113
+ end
114
+ ##
115
+ ## Sets the video_quality property value. The video_quality property
116
+ ## @param value Value to set for the video_quality property.
117
+ ## @return a void
118
+ ##
119
+ def video_quality=(value)
120
+ @video_quality = value
121
+ end
122
+ end
123
+ end
124
+ end
data/lib/rixl.rb ADDED
@@ -0,0 +1,43 @@
1
+ require 'microsoft_kiota_abstractions'
2
+ require 'microsoft_kiota_serialization_json'
3
+ require_relative './feeds/feeds_request_builder'
4
+ require_relative './images/images_request_builder'
5
+ require_relative './rixl'
6
+ require_relative './videos/videos_request_builder'
7
+
8
+ module Rixl
9
+ ##
10
+ # The main entry point of the SDK, exposes the configuration and the fluent API.
11
+ class Rixl < MicrosoftKiotaAbstractions::BaseRequestBuilder
12
+
13
+ ##
14
+ # The feeds property
15
+ def feeds()
16
+ return Rixl::Feeds::FeedsRequestBuilder.new(@path_parameters, @request_adapter)
17
+ end
18
+ ##
19
+ # The images property
20
+ def images()
21
+ return Rixl::Images::ImagesRequestBuilder.new(@path_parameters, @request_adapter)
22
+ end
23
+ ##
24
+ # The videos property
25
+ def videos()
26
+ return Rixl::Videos::VideosRequestBuilder.new(@path_parameters, @request_adapter)
27
+ end
28
+ ##
29
+ ## Instantiates a new Rixl and sets the default values.
30
+ ## @param request_adapter The request adapter to use to execute the requests.
31
+ ## @return a void
32
+ ##
33
+ def initialize(request_adapter)
34
+ super(Hash.new, request_adapter, "{+baseurl}")
35
+ MicrosoftKiotaAbstractions::ApiClientBuilder.register_default_serializer(MicrosoftKiotaSerializationJson::JsonSerializationWriterFactory)
36
+ MicrosoftKiotaAbstractions::ApiClientBuilder.register_default_deserializer(MicrosoftKiotaSerializationJson::JsonParseNodeFactory)
37
+ if @request_adapter.get_base_url.nil? || @request_adapter.get_base_url.empty?
38
+ @request_adapter.set_base_url('https://api.rixl.com')
39
+ end
40
+ @path_parameters['baseurl'] = @request_adapter.get_base_url
41
+ end
42
+ end
43
+ end
File without changes
@@ -0,0 +1,118 @@
1
+ require 'microsoft_kiota_abstractions'
2
+ require_relative '../../../models/audio_track'
3
+ require_relative '../../../models/audio_track_delete'
4
+ require_relative '../../../rixl'
5
+ require_relative '../../videos'
6
+ require_relative '../item'
7
+ require_relative './audio_tracks'
8
+ require_relative './item/with_track_item_request_builder'
9
+ require_relative './language/language_request_builder'
10
+
11
+ module Rixl
12
+ module Videos
13
+ module Item
14
+ module AudioTracks
15
+ ##
16
+ # Builds and executes requests for operations under \videos\{videoId}\audio-tracks
17
+ class AudioTracksRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder
18
+
19
+ ##
20
+ # The language property
21
+ def language()
22
+ return Rixl::Videos::Item::AudioTracks::Language::LanguageRequestBuilder.new(@path_parameters, @request_adapter)
23
+ end
24
+ ##
25
+ ## Gets an item from the rixl.videos.item.audioTracks.item collection
26
+ ## @param track_id Audio Track ID
27
+ ## @return a with_track_item_request_builder
28
+ ##
29
+ def by_track_id(track_id)
30
+ raise StandardError, 'track_id cannot be null' if track_id.nil?
31
+ url_tpl_params = @path_parameters.clone
32
+ url_tpl_params["trackId"] = track_id
33
+ return Rixl::Videos::Item::AudioTracks::Item::WithTrackItemRequestBuilder.new(url_tpl_params, @request_adapter)
34
+ end
35
+ ##
36
+ ## Instantiates a new AudioTracksRequestBuilder and sets the default values.
37
+ ## @param path_parameters Path parameters for the request
38
+ ## @param request_adapter The request adapter to use to execute the requests.
39
+ ## @return a void
40
+ ##
41
+ def initialize(path_parameters, request_adapter)
42
+ super(path_parameters, request_adapter, "{+baseurl}/videos/{videoId}/audio-tracks")
43
+ end
44
+ ##
45
+ ## Remove all additional audio tracks from a video using API key authentication
46
+ ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
47
+ ## @return a Fiber of audio_track_delete
48
+ ##
49
+ def delete(request_configuration=nil)
50
+ request_info = self.to_delete_request_information(
51
+ request_configuration
52
+ )
53
+ return @request_adapter.send_async(request_info, lambda {|pn| Rixl::Models::AudioTrackDelete.create_from_discriminator_value(pn) }, nil)
54
+ end
55
+ ##
56
+ ## Replace all audio tracks with the provided ones using API key authentication
57
+ ## @param body The request body
58
+ ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
59
+ ## @return a Fiber of audio_track
60
+ ##
61
+ def post(body, request_configuration=nil)
62
+ raise StandardError, 'body cannot be null' if body.nil?
63
+ request_info = self.to_post_request_information(
64
+ body, request_configuration
65
+ )
66
+ return @request_adapter.send_async(request_info, lambda {|pn| Rixl::Models::AudioTrack.create_from_discriminator_value(pn) }, nil)
67
+ end
68
+ ##
69
+ ## Remove all additional audio tracks from a video using API key authentication
70
+ ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
71
+ ## @return a request_information
72
+ ##
73
+ def to_delete_request_information(request_configuration=nil)
74
+ request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
75
+ unless request_configuration.nil?
76
+ request_info.add_headers_from_raw_object(request_configuration.headers)
77
+ request_info.add_request_options(request_configuration.options)
78
+ end
79
+ request_info.url_template = @url_template
80
+ request_info.path_parameters = @path_parameters
81
+ request_info.http_method = :DELETE
82
+ request_info.headers.try_add('Accept', 'application/json')
83
+ return request_info
84
+ end
85
+ ##
86
+ ## Replace all audio tracks with the provided ones using API key authentication
87
+ ## @param body The request body
88
+ ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
89
+ ## @return a request_information
90
+ ##
91
+ def to_post_request_information(body, request_configuration=nil)
92
+ raise StandardError, 'body cannot be null' if body.nil?
93
+ request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
94
+ unless request_configuration.nil?
95
+ request_info.add_headers_from_raw_object(request_configuration.headers)
96
+ request_info.add_request_options(request_configuration.options)
97
+ end
98
+ request_info.set_content_from_parsable(@request_adapter, 'multipart/form-data', body)
99
+ request_info.url_template = @url_template
100
+ request_info.path_parameters = @path_parameters
101
+ request_info.http_method = :POST
102
+ request_info.headers.try_add('Accept', 'application/json')
103
+ return request_info
104
+ end
105
+ ##
106
+ ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
107
+ ## @param raw_url The raw URL to use for the request builder.
108
+ ## @return a audio_tracks_request_builder
109
+ ##
110
+ def with_url(raw_url)
111
+ raise StandardError, 'raw_url cannot be null' if raw_url.nil?
112
+ return AudioTracksRequestBuilder.new(raw_url, @request_adapter)
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
118
+ end
File without changes
@@ -0,0 +1,75 @@
1
+ require 'microsoft_kiota_abstractions'
2
+ require_relative '../../../../models/audio_track_delete'
3
+ require_relative '../../../../models/github_com_rixlhq_api_internal_errors_error_response'
4
+ require_relative '../../../../rixl'
5
+ require_relative '../../../videos'
6
+ require_relative '../../item'
7
+ require_relative '../audio_tracks'
8
+ require_relative './item'
9
+
10
+ module Rixl
11
+ module Videos
12
+ module Item
13
+ module AudioTracks
14
+ module Item
15
+ ##
16
+ # Builds and executes requests for operations under \videos\{videoId}\audio-tracks\{trackId}
17
+ class WithTrackItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder
18
+
19
+ ##
20
+ ## Instantiates a new WithTrackItemRequestBuilder and sets the default values.
21
+ ## @param path_parameters Path parameters for the request
22
+ ## @param request_adapter The request adapter to use to execute the requests.
23
+ ## @return a void
24
+ ##
25
+ def initialize(path_parameters, request_adapter)
26
+ super(path_parameters, request_adapter, "{+baseurl}/videos/{videoId}/audio-tracks/{trackId}")
27
+ end
28
+ ##
29
+ ## Remove an additional audio track from a video using API key authentication
30
+ ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
31
+ ## @return a Fiber of audio_track_delete
32
+ ##
33
+ def delete(request_configuration=nil)
34
+ request_info = self.to_delete_request_information(
35
+ request_configuration
36
+ )
37
+ error_mapping = Hash.new
38
+ error_mapping["401"] = lambda {|pn| Rixl::Models::Github_com_rixlhq_api_internal_errorsErrorResponse.create_from_discriminator_value(pn) }
39
+ error_mapping["403"] = lambda {|pn| Rixl::Models::Github_com_rixlhq_api_internal_errorsErrorResponse.create_from_discriminator_value(pn) }
40
+ error_mapping["404"] = lambda {|pn| Rixl::Models::Github_com_rixlhq_api_internal_errorsErrorResponse.create_from_discriminator_value(pn) }
41
+ error_mapping["500"] = lambda {|pn| Rixl::Models::Github_com_rixlhq_api_internal_errorsErrorResponse.create_from_discriminator_value(pn) }
42
+ return @request_adapter.send_async(request_info, lambda {|pn| Rixl::Models::AudioTrackDelete.create_from_discriminator_value(pn) }, error_mapping)
43
+ end
44
+ ##
45
+ ## Remove an additional audio track from a video using API key authentication
46
+ ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
47
+ ## @return a request_information
48
+ ##
49
+ def to_delete_request_information(request_configuration=nil)
50
+ request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
51
+ unless request_configuration.nil?
52
+ request_info.add_headers_from_raw_object(request_configuration.headers)
53
+ request_info.add_request_options(request_configuration.options)
54
+ end
55
+ request_info.url_template = @url_template
56
+ request_info.path_parameters = @path_parameters
57
+ request_info.http_method = :DELETE
58
+ request_info.headers.try_add('Accept', 'application/json')
59
+ return request_info
60
+ end
61
+ ##
62
+ ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
63
+ ## @param raw_url The raw URL to use for the request builder.
64
+ ## @return a with_track_item_request_builder
65
+ ##
66
+ def with_url(raw_url)
67
+ raise StandardError, 'raw_url cannot be null' if raw_url.nil?
68
+ return WithTrackItemRequestBuilder.new(raw_url, @request_adapter)
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end