This feature is only available for your authenticated users. Please visit the authentication feature specification before trying to implement it
Coming soon
Coming soon
import { STWish } from "../../models/wish";export interface ISTWishesSDK {/*** List wishes*/getWishes(): Promise<Array<STWish>>;/*** Create wish* @param wishToCreate*/createWish(wishToCreate: STWish): Promise<STWish>;/*** Delete wish* @param wishToDelete*/deleteWish(wishToDelete: STWish): Promise<number>;}
The wishlist feature allows your users to emit wishes for some contents. It's a way to group wished contents in a list in order to buy them afterwards.
When a wished content is acquired using the transaction system, it will be automatically removed from the wish list.
Coming soon
Coming soon
const wishList = await staytunedSDK.STWishes.getWishes();
Coming soon
Coming soon
const createdWish = await staytunedSDK.STWishes.createWish({contentKey: 'a-content-key', // Can be a content keyelementKey: 'an-element-key', // Or an element Key});
A wish can be linked to a content OR an element but never both (will result in the wish to not be created)
Coming soon
Coming soon
// Will return the number of deleted wish (1 | 0)const deletedWishNumber = await staytunedSDK.STWishes.deleteWish({id: 123, // A wish id});