Class: Rixl::Feeds::Item::WithFeedItemRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- Rixl::Feeds::Item::WithFeedItemRequestBuilder
- Defined in:
- lib/feeds/item/with_feed_item_request_builder.rb
Overview
Builds and executes requests for operations under feedsfeedId
Defined Under Namespace
Classes: WithFeedItemRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#by_post_id(post_id) ⇒ Object
Gets an item from the rixl.feeds.item.item collection.
-
#creators ⇒ Object
The creators property.
-
#get(request_configuration = nil) ⇒ Object
Retrieve posts in a feed, with pagination.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new WithFeedItemRequestBuilder and sets the default values.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve posts in a feed, with pagination.
-
#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 WithFeedItemRequestBuilder and sets the default values.
39 40 41 |
# File 'lib/feeds/item/with_feed_item_request_builder.rb', line 39 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/feeds/{feedId}{?limit*,offset*}") end |
Instance Method Details
#by_post_id(post_id) ⇒ Object
Gets an item from the rixl.feeds.item.item collection
27 28 29 30 31 32 |
# File 'lib/feeds/item/with_feed_item_request_builder.rb', line 27 def by_post_id(post_id) raise StandardError, 'post_id cannot be null' if post_id.nil? url_tpl_params = @path_parameters.clone url_tpl_params["postId"] = post_id return Rixl::Feeds::Item::Item::WithPostItemRequestBuilder.new(url_tpl_params, @request_adapter) end |
#creators ⇒ Object
The creators property
19 20 21 |
# File 'lib/feeds/item/with_feed_item_request_builder.rb', line 19 def creators() return Rixl::Feeds::Item::Creators::CreatorsRequestBuilder.new(@path_parameters, @request_adapter) end |
#get(request_configuration = nil) ⇒ Object
Retrieve posts in a feed, with pagination.
47 48 49 50 51 52 53 54 55 |
# File 'lib/feeds/item/with_feed_item_request_builder.rb', line 47 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["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::PaginationPaginatedResponsePost.create_from_discriminator_value(pn) }, error_mapping) end |
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve posts in a feed, with pagination.
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/feeds/item/with_feed_item_request_builder.rb', line 61 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 |
#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.
79 80 81 82 |
# File 'lib/feeds/item/with_feed_item_request_builder.rb', line 79 def with_url(raw_url) raise StandardError, 'raw_url cannot be null' if raw_url.nil? return WithFeedItemRequestBuilder.new(raw_url, @request_adapter) end |