TMBDiscoverParams
@interface TMBDiscoverParams : 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
TMBDiscoverParamsfor user recommendations – only set the number of recommended items (TMBDiscoveryobjects) you want to return.Declaration
Objective-C
+ (nullable instancetype)discoverRecommended:(nullable NSNumber *)number;Swift
class func discoverRecommended(_ number: NSNumber?) -> Self?Parameters
numberNumber of recommendations to return.
-
Get
TMBDiscoverParamsfor user recommendations with given number of recommended items (TMBDiscoveryobjects) you want to return, andgetPropertiesset to given value (set totrueto include item properties in returnedTMBDiscoveryobjects).Declaration
Objective-C
+ (nullable instancetype)discoverRecommended:(nullable NSNumber *)number getProperties:(BOOL)getProperties;Swift
class func discoverRecommended(_ number: NSNumber?, getProperties: Bool) -> Self?Parameters
numberNumber of recommendations to return.
getPropertiesInclude items’ properties and tags in the discovery objects.
-
Expanded discover params for recommendations.
Declaration
Objective-C
+ (nullable instancetype)discoverRecommended:(nullable NSNumber *)number excludeItems:(nullable NSArray *)excludeItems variability:(nullable NSNumber *)variability filter:(nullable NSDictionary *)filter getProperties:(BOOL)getProperties continuation:(BOOL)continuation noCreate:(nullable NSString *)noCreate;Swift
class func discoverRecommended(_ number: NSNumber?, excludeItems: [Any]?, variability: NSNumber?, filter: [AnyHashable : Any]?, getProperties: Bool, continuation: Bool, noCreate: String?) -> Self?Parameters
numberNumber of recommendations to return. Maximum of 200.
excludeItemsList of item ids to exclude from results. Useful for hiding items that are already being displayed to the user.
variabilityRepresents the degree of variability applied to the results. variability helps make results more dynamic, and is intelligently weighted to prioritize higher-scoring results (i.e. it does not just shuffle the results). Defaults to 0 if not supplied.
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.
continuationAuto-continue from last discover-next or discover-recommended request for the given user. Allows you to ‘show more’ or implement infinite scrolling.
noCreateDisables automatic creation of novel users and/or items. Set to
userto disable user creation,itemto disable item creation, oruser,itemto disable both user and item creation. -
The simplest way to get
TMBDiscoverParamsfor up-next for a given item page. IfTMBClientuserId has been set, the results will be tuned for the user.Declaration
Objective-C
+ (nullable instancetype)discoverNext:(nullable NSString *)item number:(nullable NSNumber *)number;Swift
class func discoverNext(_ item: String?, number: NSNumber?) -> Self?Parameters
itemItem’s unique identifier.
numberNumber of recommendations to return.
-
The simplest way to get
TMBDiscoverParamsfor a given item. IfTMBClientuserId has been set, the results will be tuned for the user.Declaration
Objective-C
+ (nullable instancetype)discoverNext:(nullable NSString *)item number:(nullable NSNumber *)number getProperties:(BOOL)getProperties;Swift
class func discoverNext(_ item: String?, number: NSNumber?, getProperties: Bool) -> Self?Parameters
itemItem’s unique identifier.
numberNumber of recommendations to return.
getPropertiesInclude items’ properties and tags in the discovery objects.
-
Expanded discover params for up-next suggestions.
Declaration
Objective-C
+ (nullable instancetype)discoverNext:(nullable NSString *)item number:(nullable NSNumber *)number excludeItems:(nullable NSArray *)excludeItems variability:(nullable NSNumber *)variability filter:(nullable NSDictionary *)filter getProperties:(BOOL)getProperties noCreate:(nullable NSString *)noCreate;Swift
class func discoverNext(_ item: String?, number: NSNumber?, excludeItems: [Any]?, variability: NSNumber?, filter: [AnyHashable : Any]?, getProperties: Bool, noCreate: String?) -> Self?Parameters
itemItem’s unique identifier.
numberNumber of recommendations to return. Maximum of 200.
excludeItemsList of item ids to exclude from results. Useful for hiding items that are already being displayed to the user.
variabilityRepresents the degree of variability applied to the results. variability helps make results more dynamic, and is intelligently weighted to prioritize higher-scoring results (i.e. it does not just shuffle the results). Defaults to 0 if not supplied.
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.
noCreateDisables automatic creation of novel users and/or items. Set to
userto disable user creation,itemto disable item creation, oruser,itemto disable both user and item creation. -
DiscoverNext params for user recommendations.
Declaration
Objective-C
+ (nullable instancetype)discoverNextParamsWithUser:(nullable NSString *)user number:(nullable NSNumber *)number;Swift
class func discoverNextParams(withUser user: String?, number: NSNumber?) -> Self?Parameters
userUser’s unique identifier.
numberNumber of recommendations to return.
-
DiscoverNext params for user-item recommendations.
Declaration
Objective-C
+ (nullable instancetype)discoverNextParamsWithUser:(nullable NSString *)user item:(nullable NSString *)item number:(nullable NSNumber *)number;Swift
class func discoverNextParams(withUser user: String?, item: 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 excludeItems:(nullable NSArray *)excludeItems variability:(nullable NSNumber *)variability filter:(nullable NSDictionary *)filter getProperties:(BOOL)getProperties continuation:(BOOL)continuation noCreate:(nullable NSString *)noCreate;Swift
init?(user: String?, item: String?, number: NSNumber?, excludeItems: [Any]?, variability: NSNumber?, filter: [AnyHashable : Any]?, getProperties: Bool, continuation: Bool, noCreate: String?)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 200.
excludeItemsList of item ids to exclude from results. Useful for hiding items that are already being displayed to the user.
variabilityRepresents the degree of variability applied to the results. Variability helps make results more dynamic, and is intelligently weighted to prioritize higher-scoring results (i.e. it does not just shuffle the results). Defaults to 0 if not supplied.
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.
noCreateDisables automatic creation of novel users and/or items. Set to
userto disable user creation,itemto disable item creation, oruser,itemto disable both user and item creation. -
List of item ids to exclude from results. Useful for hiding items that are already being displayed to the user.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSArray *excludeItems;Swift
var excludeItems: [Any]? { get } -
Represents the degree of variability applied to the results. Variability helps make results more dynamic, and is intelligently weighted to prioritize higher-scoring results (i.e. it does not just shuffle the results). Defaults to 0 if not supplied.
Declaration
Objective-C
@property (nonatomic, nullable) NSNumber *variability;Swift
var variability: NSNumber? { get set }
View on GitHub
TMBDiscoverParams Class Reference