Class: RecombeeApiClient::DeleteViewPortion
- Inherits:
-
ApiRequest
- Object
- ApiRequest
- RecombeeApiClient::DeleteViewPortion
- Defined in:
- lib/recombee_api_client/api/delete_view_portion.rb
Overview
Deletes an existing view portion specified by (userId, itemId, sessionId) from the database.
Instance Attribute Summary collapse
-
#ensure_https ⇒ Object
Returns the value of attribute ensure_https.
-
#item_id ⇒ Object
readonly
Returns the value of attribute item_id.
-
#session_id ⇒ Object
readonly
Returns the value of attribute session_id.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#body_parameters ⇒ Object
Values of body parameters as a Hash.
-
#initialize(user_id, item_id, optional = {}) ⇒ DeleteViewPortion
constructor
-
*Required arguments* -
user_id-> ID of the user who rated the item.
-
-
#method ⇒ Object
HTTP method.
-
#path ⇒ Object
Relative path to the endpoint.
-
#query_parameters ⇒ Object
Values of query parameters as a Hash.
Methods included from HashNormalizer
#camelize, #normalize_hash_to_camel_case
Constructor Details
#initialize(user_id, item_id, optional = {}) ⇒ DeleteViewPortion
-
*Required arguments*
-
user_id-> ID of the user who rated the item. -
item_id-> ID of the item which was rated.
-
-
*Optional arguments (given as hash optional)*
-
sessionId-> Identifier of a session.
-
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 24 def initialize(user_id, item_id, optional = {}) @user_id = user_id @item_id = item_id optional = normalize_hash_to_camel_case(optional) @session_id = optional['sessionId'] @optional = optional @timeout = 3000 @ensure_https = false @optional.each do |par, _| raise UnknownOptionalParameter.new(par) unless ['sessionId'].include? par end end |
Instance Attribute Details
#ensure_https ⇒ Object
Returns the value of attribute ensure_https.
14 15 16 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 14 def ensure_https @ensure_https end |
#item_id ⇒ Object (readonly)
Returns the value of attribute item_id.
13 14 15 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 13 def item_id @item_id end |
#session_id ⇒ Object (readonly)
Returns the value of attribute session_id.
13 14 15 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 13 def session_id @session_id end |
#timeout ⇒ Object
Returns the value of attribute timeout.
14 15 16 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 14 def timeout @timeout end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
13 14 15 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 13 def user_id @user_id end |
Instance Method Details
#body_parameters ⇒ Object
Values of body parameters as a Hash
43 44 45 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 43 def body_parameters {} end |
#method ⇒ Object
HTTP method
38 39 40 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 38 def method :delete end |
#path ⇒ Object
Relative path to the endpoint
59 60 61 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 59 def path '/{databaseId}/viewportions/' end |
#query_parameters ⇒ Object
Values of query parameters as a Hash. name of parameter => value of the parameter
49 50 51 52 53 54 55 56 |
# File 'lib/recombee_api_client/api/delete_view_portion.rb', line 49 def query_parameters params = {} params['userId'] = @user_id params['itemId'] = @item_id params['sessionId'] = @optional['sessionId'] if @optional['sessionId'] params end |