recombee-api-client 6.2.0__tar.gz → 6.3.0__tar.gz
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.
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/PKG-INFO +1 -1
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_client.py +1 -1
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_item_property.py +26 -4
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_user_property.py +25 -3
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_next_item_segments.py +8 -7
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/inputs/__init__.py +2 -0
- recombee_api_client-6.3.0/recombee_api_client/inputs/property_metadata.py +38 -0
- recombee_api_client-6.3.0/recombee_api_client/inputs/property_role.py +38 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client.egg-info/PKG-INFO +1 -1
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client.egg-info/SOURCES.txt +2 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/setup.py +1 -1
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/LICENSE +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/README.rst +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/__init__.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/__init__.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_bookmark.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_cart_addition.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_detail_view.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_item.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_manual_reql_segment.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_purchase.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_rating.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_search_synonym.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_series.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_user.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/batch.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/composite_recommendation.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/create_auto_reql_segmentation.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/create_manual_reql_segmentation.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/create_property_based_segmentation.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_all_search_synonyms.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_bookmark.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_cart_addition.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_detail_view.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_item.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_item_property.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_manual_reql_segment.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_more_items.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_purchase.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_rating.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_search_synonym.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_segmentation.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_series.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_user.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_user_property.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/delete_view_portion.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/get_item_property_info.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/get_item_values.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/get_segmentation.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/get_user_property_info.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/get_user_values.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/insert_to_series.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_item_bookmarks.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_item_cart_additions.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_item_detail_views.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_item_properties.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_item_purchases.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_item_ratings.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_item_view_portions.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_items.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_scenarios.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_search_synonyms.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_segmentations.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_series.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_series_items.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_user_bookmarks.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_user_cart_additions.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_user_detail_views.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_user_properties.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_user_purchases.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_user_ratings.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_user_view_portions.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/list_users.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/merge_users.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_item_segments_to_item.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_item_segments_to_item_segment.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_item_segments_to_user.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_items_to_item.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_items_to_item_segment.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_items_to_user.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_next_items.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_users_to_item.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/recommend_users_to_user.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/remove_from_series.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/request.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/reset_database.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/search_item_segments.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/search_items.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/set_item_values.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/set_user_values.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/set_values.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/set_view_portion.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/update_auto_reql_segmentation.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/update_manual_reql_segment.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/update_manual_reql_segmentation.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/update_more_items.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/update_property_based_segmentation.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/exceptions.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/inputs/composite_recommendation_stage_parameters.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/inputs/input.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/inputs/logic.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/utils/__init__.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/utils/serialize_to_json.py +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client.egg-info/dependency_links.txt +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client.egg-info/requires.txt +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client.egg-info/top_level.txt +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/setup.cfg +0 -0
- {recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/tests/test.py +0 -0
|
@@ -105,7 +105,7 @@ class RecombeeClient:
|
|
|
105
105
|
|
|
106
106
|
@staticmethod
|
|
107
107
|
def __get_http_headers(additional_headers: dict = None) -> dict:
|
|
108
|
-
headers = {"User-Agent": "recombee-python-api-client/6.
|
|
108
|
+
headers = {"User-Agent": "recombee-python-api-client/6.3.0"}
|
|
109
109
|
if additional_headers:
|
|
110
110
|
headers.update(additional_headers)
|
|
111
111
|
return headers
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from recombee_api_client.inputs.property_metadata import PropertyMetadata
|
|
2
|
+
from recombee_api_client.inputs.property_role import PropertyRole
|
|
1
3
|
from recombee_api_client.api_requests.request import Request
|
|
2
4
|
from recombee_api_client.utils.serialize_to_json import serialize_to_json
|
|
3
5
|
from typing import Union, List
|
|
@@ -19,7 +21,7 @@ class AddItemProperty(Request):
|
|
|
19
21
|
:param type: Value type of the item property to be created. One of: `int`, `double`, `string`, `boolean`, `timestamp`, `set`, `image` or `imageList`.
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
* `int
|
|
24
|
+
* `int` - Signed integer number.
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
* `double` - Floating point number. It uses 64-bit base-2 format (IEEE 754 standard).
|
|
@@ -31,7 +33,7 @@ class AddItemProperty(Request):
|
|
|
31
33
|
* `boolean` - *true* / *false*
|
|
32
34
|
|
|
33
35
|
|
|
34
|
-
* `timestamp` - Value representing date and time.
|
|
36
|
+
* `timestamp` - Value representing date and time. ISO8601-1 pattern (string) or UTC epoch time (number).
|
|
35
37
|
|
|
36
38
|
|
|
37
39
|
* `set` - Set of strings.
|
|
@@ -43,9 +45,23 @@ class AddItemProperty(Request):
|
|
|
43
45
|
* `imageList` - List of URLs that refer to images.
|
|
44
46
|
|
|
45
47
|
|
|
48
|
+
|
|
49
|
+
Optional parameters:
|
|
50
|
+
|
|
51
|
+
:param role: [Role](https://docs.recombee.com/api/property_roles_metadata#roles) to assign to the property.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
:param metadata: List of [metadata](https://docs.recombee.com/api/property_roles_metadata#metadata) entries to assign to the property.
|
|
55
|
+
|
|
46
56
|
"""
|
|
47
57
|
|
|
48
|
-
def __init__(
|
|
58
|
+
def __init__(
|
|
59
|
+
self,
|
|
60
|
+
property_name: str,
|
|
61
|
+
type: str,
|
|
62
|
+
role: PropertyRole = DEFAULT,
|
|
63
|
+
metadata: List[PropertyMetadata] = DEFAULT,
|
|
64
|
+
):
|
|
49
65
|
super().__init__(
|
|
50
66
|
path="/items/properties/%s" % (property_name),
|
|
51
67
|
method="put",
|
|
@@ -54,12 +70,19 @@ class AddItemProperty(Request):
|
|
|
54
70
|
)
|
|
55
71
|
self.property_name = property_name
|
|
56
72
|
self.type = type
|
|
73
|
+
self.role = role
|
|
74
|
+
self.metadata = metadata
|
|
57
75
|
|
|
58
76
|
def get_body_parameters(self) -> dict:
|
|
59
77
|
"""
|
|
60
78
|
Values of body parameters as a dictionary (name of parameter: value of the parameter).
|
|
61
79
|
"""
|
|
62
80
|
p = dict()
|
|
81
|
+
p["type"] = serialize_to_json(self.type)
|
|
82
|
+
if self.role is not DEFAULT:
|
|
83
|
+
p["role"] = serialize_to_json(self.role)
|
|
84
|
+
if self.metadata is not DEFAULT:
|
|
85
|
+
p["metadata"] = serialize_to_json(self.metadata)
|
|
63
86
|
|
|
64
87
|
return p
|
|
65
88
|
|
|
@@ -68,6 +91,5 @@ class AddItemProperty(Request):
|
|
|
68
91
|
Values of query parameters as a dictionary (name of parameter: value of the parameter).
|
|
69
92
|
"""
|
|
70
93
|
params = dict()
|
|
71
|
-
params["type"] = serialize_to_json(self.type)
|
|
72
94
|
|
|
73
95
|
return params
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from recombee_api_client.inputs.property_metadata import PropertyMetadata
|
|
2
|
+
from recombee_api_client.inputs.property_role import PropertyRole
|
|
1
3
|
from recombee_api_client.api_requests.request import Request
|
|
2
4
|
from recombee_api_client.utils.serialize_to_json import serialize_to_json
|
|
3
5
|
from typing import Union, List
|
|
@@ -31,15 +33,29 @@ class AddUserProperty(Request):
|
|
|
31
33
|
* `boolean` - *true* / *false*
|
|
32
34
|
|
|
33
35
|
|
|
34
|
-
* `timestamp` - Value representing date and time.
|
|
36
|
+
* `timestamp` - Value representing date and time. ISO8601-1 pattern (string) or UTC epoch time (number).
|
|
35
37
|
|
|
36
38
|
|
|
37
39
|
* `set` - Set of strings.
|
|
38
40
|
|
|
39
41
|
|
|
42
|
+
|
|
43
|
+
Optional parameters:
|
|
44
|
+
|
|
45
|
+
:param role: [Role](https://docs.recombee.com/api/property_roles_metadata#roles) to assign to the property.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
:param metadata: List of [metadata](https://docs.recombee.com/api/property_roles_metadata#metadata) entries to assign to the property.
|
|
49
|
+
|
|
40
50
|
"""
|
|
41
51
|
|
|
42
|
-
def __init__(
|
|
52
|
+
def __init__(
|
|
53
|
+
self,
|
|
54
|
+
property_name: str,
|
|
55
|
+
type: str,
|
|
56
|
+
role: PropertyRole = DEFAULT,
|
|
57
|
+
metadata: List[PropertyMetadata] = DEFAULT,
|
|
58
|
+
):
|
|
43
59
|
super().__init__(
|
|
44
60
|
path="/users/properties/%s" % (property_name),
|
|
45
61
|
method="put",
|
|
@@ -48,12 +64,19 @@ class AddUserProperty(Request):
|
|
|
48
64
|
)
|
|
49
65
|
self.property_name = property_name
|
|
50
66
|
self.type = type
|
|
67
|
+
self.role = role
|
|
68
|
+
self.metadata = metadata
|
|
51
69
|
|
|
52
70
|
def get_body_parameters(self) -> dict:
|
|
53
71
|
"""
|
|
54
72
|
Values of body parameters as a dictionary (name of parameter: value of the parameter).
|
|
55
73
|
"""
|
|
56
74
|
p = dict()
|
|
75
|
+
p["type"] = serialize_to_json(self.type)
|
|
76
|
+
if self.role is not DEFAULT:
|
|
77
|
+
p["role"] = serialize_to_json(self.role)
|
|
78
|
+
if self.metadata is not DEFAULT:
|
|
79
|
+
p["metadata"] = serialize_to_json(self.metadata)
|
|
57
80
|
|
|
58
81
|
return p
|
|
59
82
|
|
|
@@ -62,6 +85,5 @@ class AddUserProperty(Request):
|
|
|
62
85
|
Values of query parameters as a dictionary (name of parameter: value of the parameter).
|
|
63
86
|
"""
|
|
64
87
|
params = dict()
|
|
65
|
-
params["type"] = serialize_to_json(self.type)
|
|
66
88
|
|
|
67
89
|
return params
|
|
@@ -9,23 +9,24 @@ DEFAULT = uuid.uuid4()
|
|
|
9
9
|
|
|
10
10
|
class RecommendNextItemSegments(Request):
|
|
11
11
|
"""
|
|
12
|
-
Returns Item
|
|
12
|
+
Returns [Item Segments](https://docs.recombee.com/segmentations) to be shown as the next recommendations when a user scrolls (e.g., within a carousel or feed of Item Segments such as brands, artists, topics, or categories).
|
|
13
|
+
|
|
14
|
+
The request requires the `recommId` of a base recommendation request and the number of Segments to return (`count`).
|
|
13
15
|
|
|
14
|
-
It accepts `recommId` of a base recommendation request (e.g., request from the first page) and the number of segments that shall be returned (`count`).
|
|
15
16
|
The base request can be one of:
|
|
16
17
|
- [Recommend Item Segments to Item](https://docs.recombee.com/api#recommend-item-segments-to-item)
|
|
17
18
|
- [Recommend Item Segments to User](https://docs.recombee.com/api#recommend-item-segments-to-user)
|
|
18
19
|
- [Recommend Item Segments to Item Segment](https://docs.recombee.com/api#recommend-item-segments-to-item-segment)
|
|
19
20
|
- [Search Item Segments](https://docs.recombee.com/api#search-item-segments)
|
|
20
21
|
|
|
21
|
-
All
|
|
22
|
+
All other parameters are inherited from the base request associated with the provided `recommId`.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
The number of
|
|
24
|
+
This endpoint can be called multiple times for a single `recommId`. Each call returns different Item Segments that have not been recommended in previous calls.
|
|
25
|
+
The number of calls made so far is returned in the `numberNextRecommsCalls` field.
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
Requests can be made up to 30 minutes after the base request or the most recent Recommend Next Item Segments call.
|
|
27
28
|
|
|
28
|
-
For billing purposes, each call to
|
|
29
|
+
For billing purposes, each call to this endpoint is counted as a separate recommendation request.
|
|
29
30
|
|
|
30
31
|
Required parameters:
|
|
31
32
|
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/inputs/__init__.py
RENAMED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from recombee_api_client.inputs.property_role import PropertyRole
|
|
2
|
+
from recombee_api_client.inputs.property_metadata import PropertyMetadata
|
|
1
3
|
from recombee_api_client.inputs.composite_recommendation_stage_parameters import (
|
|
2
4
|
CompositeRecommendationStageParameters,
|
|
3
5
|
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from recombee_api_client.inputs.input import Input
|
|
2
|
+
from recombee_api_client.utils.serialize_to_json import serialize_to_json
|
|
3
|
+
|
|
4
|
+
from typing import Union, List
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
import uuid
|
|
7
|
+
|
|
8
|
+
DEFAULT = uuid.uuid4()
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PropertyMetadata(Input):
|
|
12
|
+
"""
|
|
13
|
+
Initializes PropertyMetadata input
|
|
14
|
+
Required parameters:
|
|
15
|
+
|
|
16
|
+
:param name: Name of the [metadata](https://docs.recombee.com/api/property_roles_metadata#metadata) assigned to the property.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Optional parameters:
|
|
20
|
+
|
|
21
|
+
:param settings: Optional configuration for this metadata entry.
|
|
22
|
+
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
def __init__(self, name: str, settings: dict = DEFAULT):
|
|
26
|
+
self.name = name
|
|
27
|
+
self.settings = settings
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict:
|
|
30
|
+
"""
|
|
31
|
+
Serializes the input into a dict for sending to the Recombee API.
|
|
32
|
+
"""
|
|
33
|
+
res = dict()
|
|
34
|
+
res["name"] = serialize_to_json(self.name)
|
|
35
|
+
if self.settings is not DEFAULT:
|
|
36
|
+
res["settings"] = serialize_to_json(self.settings)
|
|
37
|
+
|
|
38
|
+
return res
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from recombee_api_client.inputs.input import Input
|
|
2
|
+
from recombee_api_client.utils.serialize_to_json import serialize_to_json
|
|
3
|
+
|
|
4
|
+
from typing import Union, List
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
import uuid
|
|
7
|
+
|
|
8
|
+
DEFAULT = uuid.uuid4()
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PropertyRole(Input):
|
|
12
|
+
"""
|
|
13
|
+
Initializes PropertyRole input
|
|
14
|
+
Required parameters:
|
|
15
|
+
|
|
16
|
+
:param name: Name of the [role](https://docs.recombee.com/api/property_roles_metadata#roles) assigned to the property.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Optional parameters:
|
|
20
|
+
|
|
21
|
+
:param settings: Optional configuration specific to the selected role.
|
|
22
|
+
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
def __init__(self, name: str, settings: dict = DEFAULT):
|
|
26
|
+
self.name = name
|
|
27
|
+
self.settings = settings
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict:
|
|
30
|
+
"""
|
|
31
|
+
Serializes the input into a dict for sending to the Recombee API.
|
|
32
|
+
"""
|
|
33
|
+
res = dict()
|
|
34
|
+
res["name"] = serialize_to_json(self.name)
|
|
35
|
+
if self.settings is not DEFAULT:
|
|
36
|
+
res["settings"] = serialize_to_json(self.settings)
|
|
37
|
+
|
|
38
|
+
return res
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client.egg-info/SOURCES.txt
RENAMED
|
@@ -100,6 +100,8 @@ recombee_api_client/inputs/__init__.py
|
|
|
100
100
|
recombee_api_client/inputs/composite_recommendation_stage_parameters.py
|
|
101
101
|
recombee_api_client/inputs/input.py
|
|
102
102
|
recombee_api_client/inputs/logic.py
|
|
103
|
+
recombee_api_client/inputs/property_metadata.py
|
|
104
|
+
recombee_api_client/inputs/property_role.py
|
|
103
105
|
recombee_api_client/utils/__init__.py
|
|
104
106
|
recombee_api_client/utils/serialize_to_json.py
|
|
105
107
|
tests/test.py
|
|
@@ -10,7 +10,7 @@ with open(path.join(here, "README.rst"), encoding="utf-8") as f:
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name="recombee-api-client",
|
|
13
|
-
version="6.
|
|
13
|
+
version="6.3.0",
|
|
14
14
|
description="Client for Recombee recommendation API",
|
|
15
15
|
long_description=long_description,
|
|
16
16
|
url="https://github.com/Recombee/python-api-client",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_item.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/add_user.py
RENAMED
|
File without changes
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/batch.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/api_requests/request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client.egg-info/requires.txt
RENAMED
|
File without changes
|
{recombee_api_client-6.2.0 → recombee_api_client-6.3.0}/recombee_api_client.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|