Class: Rixl::Videos::VideosRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- Rixl::Videos::VideosRequestBuilder
- Defined in:
- lib/videos/videos_request_builder.rb
Overview
Builds and executes requests for operations under videos
Defined Under Namespace
Classes: VideosRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#by_video_id(video_id) ⇒ Object
Gets an item from the rixl.videos.item collection.
-
#get(request_configuration = nil) ⇒ Object
Retrieve all videos for a specific project, with pagination and sorting.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new VideosRequestBuilder and sets the default values.
-
#languages ⇒ Object
The languages property.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve all videos for a specific project, with pagination and sorting.
-
#upload ⇒ Object
The upload property.
-
#with_url(raw_url) ⇒ Object
Returns a request builder with the provided arbitrary URL.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new VideosRequestBuilder and sets the default values.
43 44 45 |
# File 'lib/videos/videos_request_builder.rb', line 43 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/videos{?limit*,offset*,order*,sort*}") end |
Instance Method Details
#by_video_id(video_id) ⇒ Object
Gets an item from the rixl.videos.item collection
31 32 33 34 35 36 |
# File 'lib/videos/videos_request_builder.rb', line 31 def by_video_id(video_id) raise StandardError, 'video_id cannot be null' if video_id.nil? url_tpl_params = @path_parameters.clone url_tpl_params["videoId"] = video_id return Rixl::Videos::Item::WithVideoItemRequestBuilder.new(url_tpl_params, @request_adapter) end |
#get(request_configuration = nil) ⇒ Object
Retrieve all videos for a specific project, with pagination and sorting.
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/videos/videos_request_builder.rb', line 51 def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new error_mapping["400"] = lambda {|pn| Rixl::Models::Github_com_rixlhq_api_internal_errorsErrorResponse.create_from_discriminator_value(pn) } error_mapping["401"] = lambda {|pn| Rixl::Models::Github_com_rixlhq_api_internal_errorsErrorResponse.create_from_discriminator_value(pn) } error_mapping["403"] = lambda {|pn| Rixl::Models::Github_com_rixlhq_api_internal_errorsErrorResponse.create_from_discriminator_value(pn) } error_mapping["500"] = lambda {|pn| Rixl::Models::Github_com_rixlhq_api_internal_errorsErrorResponse.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| Rixl::Models::PaginationPaginatedResponseVideo.create_from_discriminator_value(pn) }, error_mapping) end |
#languages ⇒ Object
The languages property
18 19 20 |
# File 'lib/videos/videos_request_builder.rb', line 18 def languages() return Rixl::Videos::Languages::LanguagesRequestBuilder.new(@path_parameters, @request_adapter) end |
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve all videos for a specific project, with pagination and sorting.
67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/videos/videos_request_builder.rb', line 67 def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.(request_configuration.) end request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :GET request_info.headers.try_add('Accept', 'application/json') return request_info end |
#upload ⇒ Object
The upload property
23 24 25 |
# File 'lib/videos/videos_request_builder.rb', line 23 def upload() return Rixl::Videos::Upload::UploadRequestBuilder.new(@path_parameters, @request_adapter) end |
#with_url(raw_url) ⇒ Object
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
85 86 87 88 |
# File 'lib/videos/videos_request_builder.rb', line 85 def with_url(raw_url) raise StandardError, 'raw_url cannot be null' if raw_url.nil? return VideosRequestBuilder.new(raw_url, @request_adapter) end |