TMBDiscoverBasicParams
@interface TMBDiscoverBasicParams : NSObject <TMBObjectEncodable>
An object representing parameters used to retrieve discoveries. Not all parameters are needed for all requests. - see: https://tamber.com/docs/api/#discover
-
The simplest way to get
TMBDiscoverBasicParamsfor user recommendations – only set the number of recommended items (TMBDiscoveryobjects) you want to return.Declaration
Objective-C
+ (nullable instancetype)discoverRecommendations:(nullable NSNumber *)number;Swift
class func discoverRecommendations(_ number: NSNumber?) -> Self?Parameters
numberNumber of recommendations to return.
-
Expanded discover params for user recommendations.
Declaration
Objective-C
+ (nullable instancetype)discoverRecommendations:(nullable NSNumber *)number page:(nullable NSNumber *)page filter:(nullable NSDictionary *)filter getProperties:(BOOL)getProperties testEvents:(nullable NSArray *)testEvents;Swift
class func discoverRecommendations(_ number: NSNumber?, page: NSNumber?, filter: [AnyHashable : Any]?, getProperties: Bool, testEvents: [Any]?) -> Self?Parameters
numberNumber of recommendations to return. Maximum of 500.
pageThe page of recommended items to return.
filterThe filter to apply on the discoveries. See https://tamber.com/docs/api/#filtering and our filtering guide at https://tamber.com/docs/guides/filtering.html for reference.
getPropertiesInclude items’ properties and tags in the discovery objects.
testEventsRecommendations will be made as if the supplied events had occurred, but the engine will not be affected in any way. Also works if the user that has not yet been created, allowing you to see what a visiting user’s recommendations would be. Warning: recommendations with test_events are generated at a lower priority of computational resources and are not representative of recommendation API performance.
-
Discover params for user recommendations.
Declaration
Objective-C
+ (nullable instancetype)discoverParamsWithUser:(nullable NSString *)user number:(nullable NSNumber *)number;Swift
class func discover(withUser user: String?, number: NSNumber?) -> Self?Parameters
userUser’s unique identifier.
numberNumber of recommendations to return.
-
Initialize discover params for user recommendations.
Declaration
Objective-C
- (nullable instancetype)initWithUser:(nullable NSString *)user item:(nullable NSString *)item number:(nullable NSNumber *)number page:(nullable NSNumber *)page filter:(nullable NSDictionary *)filter getProperties:(BOOL)getProperties testEvents:(nullable NSArray *)testEvents;Swift
init?(user: String?, item: String?, number: NSNumber?, page: NSNumber?, filter: [AnyHashable : Any]?, getProperties: Bool, testEvents: [Any]?)Parameters
userUser’s unique identifier. Used for discover-recommended and discover-recommended_similar.
itemItem’s unique identifier. Used for discover-similar and discover-recommended_similar.
numberNumber of recommendations to return. Maximum of 500.
pageThe page of recommended items to return.
filterThe filter to apply on the discoveries. See https://tamber.com/docs/api/#filtering and our filtering guide at https://tamber.com/docs/guides/filtering.html for reference.
getPropertiesInclude items’ properties and tags in the discovery objects.
testEventsRecommendations will be made as if the supplied events had occurred, but the engine will not be affected in any way. Also works if the user that has not yet been created, allowing you to see what a visiting user’s recommendations would be. Warning: recommendations with test_events are generated at a lower priority of computational resources and are not representative of recommendation API performance.
View on GitHub
TMBDiscoverBasicParams Class Reference