Documentation
¶
Overview ¶
Package recombee implements a client for Recombee API. The client uses batch endpoint to send requests to the API.
For detailed documentation please see Recombee's API reference: https://docs.recombee.com/api.html.
Index ¶
- type Auth
- type BatchRequest
- type BatchResponse
- type BearerTokenAuth
- type Client
- type ClientOption
- type HmacSignatureAuth
- type Recommendations
- type Request
- func AddBookmark(userId string, itemId string, opts ...RequestOption) Request
- func AddCartAddition(userId string, itemId string, opts ...RequestOption) Request
- func AddDetailView(userId string, itemId string, opts ...RequestOption) Request
- func AddItem(itemId string) Request
- func AddItemProperty(propertyName string, typ string) Request
- func AddManualReQLSegment(segmentationId, segmentId, filter string, opts ...RequestOption) Request
- func AddPurchase(userId string, itemId string, opts ...RequestOption) Request
- func AddRating(userId string, itemId string, rating float64, opts ...RequestOption) Request
- func AddSearchSynonym(term, synonym string, opts ...RequestOption) Request
- func AddSeries(seriesId string) Request
- func AddUser(userId string) Request
- func AddUserProperty(propertyName string, typ string) Request
- func Batch(requests []Request, opts ...RequestOption) Request
- func CreateAutoReQLSegmentation(segmentationId, sourceType, expression string, opts ...RequestOption) Request
- func CreateManualReQLSegmentation(segmentationId, sourceType string, opts ...RequestOption) Request
- func CreatePropertyBasedSegmentation(segmentationId, sourceType, propertyName string, opts ...RequestOption) Request
- func DeleteAllSearchSynonyms() Request
- func DeleteBookmark(userId string, itemId string, opts ...RequestOption) Request
- func DeleteCartAddition(userId string, itemId string, opts ...RequestOption) Request
- func DeleteDetailView(userId string, itemId string, opts ...RequestOption) Request
- func DeleteItem(itemId string) Request
- func DeleteItemProperty(propertyName string) Request
- func DeleteManualReQLSegment(segmentationId, segmentId string) Request
- func DeleteMoreItems(filter string) Request
- func DeletePurchase(userId string, itemId string, opts ...RequestOption) Request
- func DeleteRating(userId string, itemId string, opts ...RequestOption) Request
- func DeleteSearchSynonym(id string) Request
- func DeleteSegmentation(segmentationId string) Request
- func DeleteSeries(seriesId string) Request
- func DeleteUser(userId string) Request
- func DeleteUserProperty(propertyName string) Request
- func DeleteViewPortion(userId string, itemId string, opts ...RequestOption) Request
- func GetItemPropertyInfo(propertyName string) Request
- func GetItemValues(itemId string) Request
- func GetSegmentation(segmentationId string) Request
- func GetUserPropertyInfo(propertyName string) Request
- func GetUserValues(userId string) Request
- func InsertToSeries(seriesId string, itemType string, itemId string, time_ float64, ...) Request
- func ListItemBookmarks(itemId string) Request
- func ListItemCartAddition(itemId string) Request
- func ListItemDetailViews(itemId string) Request
- func ListItemProperties() Request
- func ListItemPurchases(itemId string) Request
- func ListItemRatings(itemId string) Request
- func ListItemViewPortions(itemId string) Request
- func ListItems(opts ...RequestOption) Request
- func ListSearchSynonyms(opts ...RequestOption) Request
- func ListSegmentations(sourceType string) Request
- func ListSeries() Request
- func ListSeriesItems(seriesId string) Request
- func ListUserBookmarks(userId string) Request
- func ListUserCartAddition(userId string) Request
- func ListUserDetailViews(userId string) Request
- func ListUserProperties() Request
- func ListUserPurchases(userId string) Request
- func ListUserRatings(userId string) Request
- func ListUserViewPortions(userId string) Request
- func ListUsers(opts ...RequestOption) Request
- func MergeUsers(targetUserId string, sourceUserId string, opts ...RequestOption) Request
- func RecommendItemSegmentsToItem(itemId string, targetUserId string, count int, opts ...RequestOption) Request
- func RecommendItemSegmentsToItemSegment(contextSegmentId string, targetUserId string, count int, opts ...RequestOption) Request
- func RecommendItemSegmentsToUser(userId string, count int, opts ...RequestOption) Request
- func RecommendItemsToItem(itemId string, targetUserId string, count int, opts ...RequestOption) Request
- func RecommendItemsToUser(userId string, count int, opts ...RequestOption) Request
- func RecommendNextItems(recommId string, count int, opts ...RequestOption) Request
- func RecommendUsersToItem(itemId string, count int, opts ...RequestOption) Request
- func RecommendUsersToUser(userId string, count int, opts ...RequestOption) Request
- func RemoveFromSeries(seriesId string, itemType string, itemId string, time_ float64) Request
- func ResetDatabase() Request
- func SearchItemSegments(userId string, searchQuery string, count int, opts ...RequestOption) Request
- func SearchItems(userId string, searchQuery string, count int, opts ...RequestOption) Request
- func SetItemValues(itemId string, opts ...RequestOption) Request
- func SetUserValues(userId string, opts ...RequestOption) Request
- func SetViewPortion(userId string, itemId string, portion float64, opts ...RequestOption) Request
- func UpdateAutoReQLSegmentation(segmentationId string, opts ...RequestOption) Request
- func UpdateManualReQLSegment(segmentationId, segmentId, filter string, opts ...RequestOption) Request
- func UpdateManualReQLSegmentation(segmentationId string, opts ...RequestOption) Request
- func UpdateMoreItems(filter string, changes interface{}) Request
- func UpdatePropertyBasedSegmentation(segmentationId string, opts ...RequestOption) Request
- type RequestOption
- func WithAmount(amount float64) RequestOption
- func WithBooster(booster string) RequestOption
- func WithCascadeCreate() RequestOption
- func WithCount(count int) RequestOption
- func WithDescription(description string) RequestOption
- func WithDuration(dur time.Duration) RequestOption
- func WithExpression(expression string) RequestOption
- func WithFilter(filter string) RequestOption
- func WithIncludedProperties(enable bool) RequestOption
- func WithKeyValue(k string, v interface{}) RequestOption
- func WithLogic(logic interface{}) RequestOption
- func WithMinRelevance(min string) RequestOption
- func WithOffset(offset int) RequestOption
- func WithPrice(price float64) RequestOption
- func WithProfit(profit float64) RequestOption
- func WithRecommId(id string) RequestOption
- func WithReturnProperties(enable bool) RequestOption
- func WithRotationRate(rate float64) RequestOption
- func WithRotationTime(t float64) RequestOption
- func WithScenario(scenario string) RequestOption
- func WithSessionId(id string) RequestOption
- func WithTimestamp(ts time.Time) RequestOption
- func WithTitle(title string) RequestOption
- func WithUserImpact(impact float64) RequestOption
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchRequest ¶
type BatchRequest struct {
Requests []Request `json:"requests"`
}
type BatchResponse ¶
type BatchResponse []struct {
Code int `json:"code"`
Json json.RawMessage `json:"json"`
}
BatchResponse represents a message returned by Recombee Batch API.
type BearerTokenAuth ¶ added in v0.6.0
type BearerTokenAuth struct {
// contains filtered or unexported fields
}
func NewBearerTokenAuth ¶ added in v0.6.0
func NewBearerTokenAuth(token string) *BearerTokenAuth
func (*BearerTokenAuth) Authenticate ¶ added in v0.6.0
func (a *BearerTokenAuth) Authenticate(request *http.Request) error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type ClientOption ¶
type ClientOption func(c *Client)
ClientOption for http client to be configured.
func WithDistinctRecomms ¶
func WithDistinctRecomms(v bool) ClientOption
WithDistinctRecomms makes all the recommended items for a certain user distinct among multiple recommendation requests in the batch.
func WithMaxBatchSize ¶
func WithMaxBatchSize(max int) ClientOption
WithMaxBatchSize sets max batch size that is sent to the API in a single request.
func WithMaxIdleConnections ¶ added in v0.6.1
func WithMaxIdleConnections(total int, perHost int) ClientOption
func WithRequestTimeout ¶
func WithRequestTimeout(t time.Duration) ClientOption
WithRequestTimeout sets request timeout.
type HmacSignatureAuth ¶ added in v0.6.0
type HmacSignatureAuth struct {
// contains filtered or unexported fields
}
func NewHmacSignatureAuth ¶ added in v0.6.0
func NewHmacSignatureAuth(secret []byte) *HmacSignatureAuth
NewHmacSignatureAuth creates authentication using token created in Recombee admin for the HMAC signature.
func (*HmacSignatureAuth) Authenticate ¶ added in v0.6.0
func (a *HmacSignatureAuth) Authenticate(request *http.Request) error
type Recommendations ¶ added in v0.2.0
type Request ¶
type Request struct {
Path string `json:"path"`
Method string `json:"method"`
Params map[string]interface{} `json:"params,omitempty"`
}
Request is a request to Recombee API.
func AddBookmark ¶ added in v0.4.0
func AddBookmark(userId string, itemId string, opts ...RequestOption) Request
AddBookmark adds a bookmark of the given item made by the given user.
func AddCartAddition ¶ added in v0.5.0
func AddCartAddition(userId string, itemId string, opts ...RequestOption) Request
AddCartAddition adds a cart addition of the given item made by the given user.
func AddDetailView ¶
func AddDetailView(userId string, itemId string, opts ...RequestOption) Request
AddDetailView adds a detail view of the given item made by the given user.
func AddItem ¶
AddItem adds new item of the given itemId to the items catalog.
All the item properties for the newly created items are set to null.
func AddItemProperty ¶
AddItemProperty adds item property.
Adding an item property is somehow equivalent to adding a column to the table of items. The items may be characterized by various properties of different types.
func AddManualReQLSegment ¶ added in v0.5.0
func AddManualReQLSegment(segmentationId, segmentId, filter string, opts ...RequestOption) Request
AddManualReQLSegment adds a new Segment into a Manual ReQL Segmentation.
The new Segment is defined by a ReQL filter that returns true for an item in case that this item belongs to the segment.
func AddPurchase ¶
func AddPurchase(userId string, itemId string, opts ...RequestOption) Request
AddPurchase adds a purchase of the given item made by the given user.
func AddRating ¶
func AddRating(userId string, itemId string, rating float64, opts ...RequestOption) Request
AddRating adds a rating of the given item made by the given user.
func AddSearchSynonym ¶ added in v0.5.0
func AddSearchSynonym(term, synonym string, opts ...RequestOption) Request
AddSearchSynonym adds a new synonym for the Search items.
When the term is used in the search query, the synonym is also used for the full-text search. Unless oneWay=true, it works also in the opposite way (synonym -> term).
func AddUserProperty ¶ added in v0.5.0
AddUserProperty is somehow equivalent to adding a column to the table of users. The users may be characterized by various properties of different types.
func Batch ¶ added in v0.5.0
func Batch(requests []Request, opts ...RequestOption) Request
Batch processing allows you to submit arbitrary sequence of requests within a single HTTPS request.
Any type of request from the above documentation may be used in the Batch, and the Batch may combine different types of requests arbitrarily as well.
func CreateAutoReQLSegmentation ¶ added in v0.5.0
func CreateAutoReQLSegmentation(segmentationId, sourceType, expression string, opts ...RequestOption) Request
CreateAutoReQLSegmentation Segment the items using a ReQL expression.
For each item, the expression should return a set that contains IDs of segments to which the item belongs to.
func CreateManualReQLSegmentation ¶ added in v0.5.0
func CreateManualReQLSegmentation(segmentationId, sourceType string, opts ...RequestOption) Request
CreateManualReQLSegmentation segments the items using multiple ReQL filters.
Use the Add Manual ReQL Items Segment endpoint to create the individual segments.
func CreatePropertyBasedSegmentation ¶ added in v0.5.0
func CreatePropertyBasedSegmentation(segmentationId, sourceType, propertyName string, opts ...RequestOption) Request
CreatePropertyBasedSegmentation creates a Segmentation that splits the items into segments based on values of a particular item property.
A segment is created for each unique value of the property. In case of set properties, a segment is created for each value in the set. Item belongs to all these segments.
func DeleteAllSearchSynonyms ¶ added in v0.5.0
func DeleteAllSearchSynonyms() Request
DeleteAllSearchSynonyms deletes all synonyms defined in the database.
func DeleteBookmark ¶ added in v0.4.0
func DeleteBookmark(userId string, itemId string, opts ...RequestOption) Request
DeleteBookmark deletes a bookmark uniquely specified by `userId`, `itemId`, and `timestamp` or all the bookmarks with the given `userId` and `itemId` if `timestamp` is omitted.
func DeleteCartAddition ¶ added in v0.5.0
func DeleteCartAddition(userId string, itemId string, opts ...RequestOption) Request
DeleteCartAddition deletes an existing cart addition uniquely specified by userId, itemId, and timestamp or all the cart additions with the given userId and itemId if timestamp is omitted.
func DeleteDetailView ¶
func DeleteDetailView(userId string, itemId string, opts ...RequestOption) Request
DeleteDetailView deletes an existing detail view uniquely specified by (userId, itemId, and timestamp) or all the detail views with the given userId and itemId if timestamp is omitted.
func DeleteItem ¶
DeleteItem deletes an item of the given itemId from the catalog.
If there are any purchases, ratings, bookmarks, cart additions, or detail views of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some series, it will be removed from all the series where present.
func DeleteItemProperty ¶
DeleteItemProperty deletes item property.
Deleting an item property is roughly equivalent to removing a column from the table of items.
func DeleteManualReQLSegment ¶ added in v0.5.0
DeleteManualReQLSegment deletes a Segment from a Manual ReQL Segmentation.
func DeleteMoreItems ¶ added in v0.5.0
DeleteMoreItems deletes all the items that pass the filter.
If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful) and only exclude the item from recommendations. In such a case, use ReQL filter instead of deleting the item completely.
func DeletePurchase ¶
func DeletePurchase(userId string, itemId string, opts ...RequestOption) Request
DeletePurchase deletes an existing purchase uniquely specified by userId, itemId, and timestamp or all the purchases with the given userId and itemId if timestamp is omitted.
func DeleteRating ¶
func DeleteRating(userId string, itemId string, opts ...RequestOption) Request
DeleteRating deletes an existing rating specified by (userId, itemId, timestamp) from the database or all the ratings with the given userId and itemId if timestamp is omitted.
func DeleteSearchSynonym ¶ added in v0.5.0
DeleteSearchSynonym deletes synonym of the given id. This synonym is no longer taken into account in the Search items.
func DeleteSegmentation ¶ added in v0.5.0
DeleteSegmentation deletes existing Segmentation.
func DeleteSeries ¶
DeleteSeries deletes the series of the given seriesId from the database.
Deleting a series will only delete assignment of items to it, not the items themselves!
func DeleteUser ¶
DeleteUser deletes a user of the given userId from the database.
If there are any purchases, ratings, bookmarks, cart additions or detail views made by the user present in the database, they will be deleted in cascade as well.
func DeleteUserProperty ¶ added in v0.5.0
DeleteUserProperty is roughly equivalent to removing a column from the table of users.
func DeleteViewPortion ¶
func DeleteViewPortion(userId string, itemId string, opts ...RequestOption) Request
DeleteViewPortion deletes an existing view portion specified by (userId, itemId, sessionId) from the database.
func GetItemPropertyInfo ¶
GetItemPropertyInfo gets information about specified item property.
func GetItemValues ¶
GetItemValues gets all the current property values of the given item.
func GetSegmentation ¶ added in v0.5.0
GetSegmentation gets existing Segmentation.
func GetUserPropertyInfo ¶ added in v0.5.0
GetUserPropertyInfo gets information about specified user property.
func GetUserValues ¶ added in v0.5.0
GetUserValues gets all the current property values of the given user.
func InsertToSeries ¶
func InsertToSeries(seriesId string, itemType string, itemId string, time_ float64, opts ...RequestOption) Request
InsertToSeries inserts an existing item/series into a series of the given seriesId at a position determined by time.
func ListItemBookmarks ¶ added in v0.4.0
ListItemBookmarks lists all the ever-made bookmarks of the given item.
func ListItemCartAddition ¶ added in v0.5.0
ListItemCartAddition lists all the ever-made cart additions of the given item.
func ListItemDetailViews ¶
ListItemDetailViews lists all the detail views of the given item ever made by different users.
func ListItemProperties ¶ added in v0.5.0
func ListItemProperties() Request
ListItemProperties gets the list of all the item properties in your database.
func ListItemPurchases ¶
ListItemPurchases lists all the ever-made purchases of the given item.
func ListItemRatings ¶
ListItemRatings lists all the ratings of an item ever submitted by different users.
func ListItemViewPortions ¶
ListItemViewPortions lists all the view portions of an item ever submitted by different users.
func ListItems ¶
func ListItems(opts ...RequestOption) Request
ListItems gets a list of IDs of items currently present in the catalog.
func ListSearchSynonyms ¶ added in v0.5.0
func ListSearchSynonyms(opts ...RequestOption) Request
ListSearchSynonyms gives the list of synonyms defined in the database.
func ListSegmentations ¶ added in v0.5.0
ListSegmentations return all existing items Segmentations.
func ListSeries ¶
func ListSeries() Request
ListSeries gets the list of all the series currently present in the database.
func ListSeriesItems ¶
ListSeriesItems lists all the items present in the given series, sorted according to their time index values.
func ListUserBookmarks ¶ added in v0.4.0
ListUserBookmarks lists all the bookmarks ever made by the given user.
func ListUserCartAddition ¶ added in v0.5.0
ListUserCartAddition lists all the cart additions ever made by the given user.
func ListUserDetailViews ¶
ListUserDetailViews lists all the detail views of different items ever made by the given user.
func ListUserProperties ¶ added in v0.5.0
func ListUserProperties() Request
ListUserProperties gets the list of all the user properties in your database.
func ListUserPurchases ¶
ListUserPurchases lists all the purchases ever made by the given user.
func ListUserRatings ¶
ListUserRatings lists all the ratings ever submitted by the given user.
func ListUserViewPortions ¶
ListUserViewPortions lists all the view portions ever submitted by the given user.
func ListUsers ¶
func ListUsers(opts ...RequestOption) Request
ListUsers gets a list of IDs of users currently present in the catalog.
func MergeUsers ¶
func MergeUsers(targetUserId string, sourceUserId string, opts ...RequestOption) Request
MergeUsers merges interactions (purchases, ratings, bookmarks, detail views …) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two becomes desirable.
Merging happens between two users referred to as the target and the source. After the merge, all the interactions of the source user are attributed to the target user, and the source user is deleted.
func RecommendItemSegmentsToItem ¶ added in v0.5.0
func RecommendItemSegmentsToItem(itemId string, targetUserId string, count int, opts ...RequestOption) Request
RecommendItemSegmentsToItem recommends Segments from a Segmentation that are the most relevant to a particular item.
Based on the used Segmentation, this endpoint can be used for example for:
- Recommending the related categories
- Recommending the related genres
- Recommending the related brands
- Recommending the related artists
func RecommendItemSegmentsToItemSegment ¶ added in v0.5.0
func RecommendItemSegmentsToItemSegment( contextSegmentId string, targetUserId string, count int, opts ...RequestOption, ) Request
RecommendItemSegmentsToItemSegment recommends Segments from a result Segmentation that are the most relevant to a particular Segment from a context Segmentation.
Based on the used Segmentations, this endpoint can be used for example for:
- Recommending the related brands to particular brand
- Recommending the related brands to particular category
- Recommending the related artists to a particular genre (assuming songs are the Items)
func RecommendItemSegmentsToUser ¶ added in v0.5.0
func RecommendItemSegmentsToUser(userId string, count int, opts ...RequestOption) Request
RecommendItemSegmentsToUser recommends the top Segments from a Segmentation for a particular user, based on the user’s past interactions.
Based on the used Segmentation, this endpoint can be used for example for:
- Recommending the top categories for the user
- Recommending the top genres for the user
- Recommending the top brands for the user
- Recommending the top artists for the user
func RecommendItemsToItem ¶
func RecommendItemsToItem(itemId string, targetUserId string, count int, opts ...RequestOption) Request
RecommendItemsToItem recommends a set of items that are somehow related to one given item, X. A typical scenario is when the user A is viewing X. Then you may display items to the user that he might also be interested in. Recommend items to item request gives you Top-N such items, optionally taking the target user A into account.
The returned items are sorted by relevance (the first item being the most relevant).
Besides the recommended items, also a unique recommId is returned in the response. It can be used to:
Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See Reported metrics.
Get subsequent recommended items when the user scrolls down (infinite scroll) or goes to the next page. See Recommend Next Items.
func RecommendItemsToUser ¶
func RecommendItemsToUser(userId string, count int, opts ...RequestOption) Request
RecommendItemsToUser recommends top-N items that are most likely to be of high value for the given user.
The most typical use cases are recommendations on the homepage, in some “Picked just for you” section, or in email.
The returned items are sorted by relevance (the first item being the most relevant).
Besides the recommended items, also a unique recommId is returned in the response. It can be used to:
Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items).
Get subsequent recommended items when the user scrolls down (infinite scroll) or goes to the next page.
func RecommendNextItems ¶ added in v0.5.0
func RecommendNextItems(recommId string, count int, opts ...RequestOption) Request
RecommendNextItems returns items that shall be shown to a user as next recommendations when the user e.g. scrolls the page down (infinite scroll) or goes to the next page.
It accepts recommId of a base recommendation request (e.g., request from the first page) and the number of items that shall be returned (count).
func RecommendUsersToItem ¶ added in v0.5.0
func RecommendUsersToItem(itemId string, count int, opts ...RequestOption) Request
RecommendUsersToItem recommends users that are likely to be interested in the given item.
It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters.
The returned users are sorted by predicted interest in the item (the first user being the most interested).
func RecommendUsersToUser ¶ added in v0.5.0
func RecommendUsersToUser(userId string, count int, opts ...RequestOption) Request
RecommendUsersToUser gets users similar to the given user, based on the user’s past interactions (purchases, ratings, etc.) and values of properties.
It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters.
The returned users are sorted by similarity (the first user being the most similar).
func RemoveFromSeries ¶
RemoveFromSeries removes an existing series item from the series.
func ResetDatabase ¶ added in v0.5.0
func ResetDatabase() Request
ResetDatabase completely erases all your data, including items, item properties, series, user database, purchases, ratings, detail views, and bookmarks. Make sure the request is never executed in the production environment! Resetting your database is irreversible.
func SearchItemSegments ¶ added in v0.5.0
func SearchItemSegments(userId string, searchQuery string, count int, opts ...RequestOption) Request
SearchItemSegments performs a full-text personalized search that returns Segments from a Segmentation. The results are based on the provided searchQuery and also on the user’s past interactions (purchases, ratings, etc.).
func SearchItems ¶ added in v0.5.0
func SearchItems(userId string, searchQuery string, count int, opts ...RequestOption) Request
SearchItems performs a full-text personalized search.
func SetItemValues ¶ added in v0.5.0
func SetItemValues(itemId string, opts ...RequestOption) Request
SetItemValues sets or updates (some) property values of the given item. The properties (columns) must be previously created by AddItemProperty.
func SetUserValues ¶ added in v0.5.0
func SetUserValues(userId string, opts ...RequestOption) Request
SetUserValues sets or updates (some) property values of the given user. The properties (columns) must be previously created by Add user property.
func SetViewPortion ¶
func SetViewPortion(userId string, itemId string, portion float64, opts ...RequestOption) Request
SetViewPortion sets viewed portion of an item (for example a video or article) by a user (at a session). If you send a new request with the same (userId, itemId, sessionId), the portion gets updated.
func UpdateAutoReQLSegmentation ¶ added in v0.5.0
func UpdateAutoReQLSegmentation(segmentationId string, opts ...RequestOption) Request
UpdateAutoReQLSegmentation updates an existing Segmentation.
func UpdateManualReQLSegment ¶ added in v0.5.0
func UpdateManualReQLSegment(segmentationId, segmentId, filter string, opts ...RequestOption) Request
UpdateManualReQLSegment update definition of the Segment.
func UpdateManualReQLSegmentation ¶ added in v0.5.0
func UpdateManualReQLSegmentation(segmentationId string, opts ...RequestOption) Request
UpdateManualReQLSegmentation updates an existing Segmentation.
func UpdateMoreItems ¶ added in v0.5.0
UpdateMoreItems updates (some) property values of all the items that pass the filter.
func UpdatePropertyBasedSegmentation ¶ added in v0.5.0
func UpdatePropertyBasedSegmentation(segmentationId string, opts ...RequestOption) Request
UpdatePropertyBasedSegmentation updates a Property Based Segmentation
type RequestOption ¶
type RequestOption = func(map[string]interface{})
func WithAmount ¶
func WithAmount(amount float64) RequestOption
func WithBooster ¶
func WithBooster(booster string) RequestOption
func WithCascadeCreate ¶
func WithCascadeCreate() RequestOption
func WithCount ¶
func WithCount(count int) RequestOption
func WithDescription ¶ added in v0.5.1
func WithDescription(description string) RequestOption
func WithDuration ¶
func WithDuration(dur time.Duration) RequestOption
func WithExpression ¶ added in v0.5.1
func WithExpression(expression string) RequestOption
func WithFilter ¶
func WithFilter(filter string) RequestOption
func WithIncludedProperties ¶
func WithIncludedProperties(enable bool) RequestOption
func WithKeyValue ¶
func WithKeyValue(k string, v interface{}) RequestOption
func WithLogic ¶
func WithLogic(logic interface{}) RequestOption
func WithMinRelevance ¶
func WithMinRelevance(min string) RequestOption
WithMinRelevance is relevance of recommended item. Possible values are "low", "medium", "high". Default is "low, meaning that the recombee system attempts to recommend a number of items to count at any cost.
func WithOffset ¶
func WithOffset(offset int) RequestOption
func WithPrice ¶
func WithPrice(price float64) RequestOption
func WithProfit ¶
func WithProfit(profit float64) RequestOption
func WithRecommId ¶
func WithRecommId(id string) RequestOption
func WithReturnProperties ¶
func WithReturnProperties(enable bool) RequestOption
func WithRotationRate ¶
func WithRotationRate(rate float64) RequestOption
func WithRotationTime ¶
func WithRotationTime(t float64) RequestOption
func WithScenario ¶
func WithScenario(scenario string) RequestOption
func WithSessionId ¶
func WithSessionId(id string) RequestOption
func WithTimestamp ¶
func WithTimestamp(ts time.Time) RequestOption
func WithTitle ¶ added in v0.5.1
func WithTitle(title string) RequestOption
func WithUserImpact ¶
func WithUserImpact(impact float64) RequestOption
Source Files
¶
- auth.go
- client.go
- client_option.go
- interaction_bookmark.go
- interaction_cart_addition.go
- interaction_detail_views.go
- interaction_purchase.go
- interaction_rating.go
- interaction_view_portion.go
- item_properties.go
- item_values.go
- items.go
- miscellaneous.go
- recommandation.go
- recommendation_item_segments.go
- recommendation_items.go
- recommendation_users.go
- request.go
- request_option.go
- search.go
- segmentation.go
- segmentation_auto_reql.go
- segmentation_manual_reql.go
- segmentation_property_based.go
- series.go
- series_items.go
- user_properties.go
- user_values.go
- users.go
- util.go