public static void shareLink(BranchUniversalObject universalObject, BranchLinkProperties linkProperties, string message, BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; _shareLinkWithLinkProperties(universalObject.ToJsonString(), linkProperties.ToJsonString(), message, callbackId); }
/** * Apply a referral code if it exists in Branch system and is still valid (see above). If the code is valid, returns the referral code object in the callback. */ public static void applyReferralCode(string code, BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; _applyReferralCodeWithCallback(code, callbackId); }
/** * Specifiy an identity for the current session and receive information about the set. */ public static void setIdentity(string userId, BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; _setIdentityWithCallback(userId, callbackId); }
/** * Initialize session and receive information about how it opened, specifying whether is should be referrable. */ public static void initSession(bool isReferrable, BranchCallbackWithParams callback) { if (_sessionCounter == 0) { ++_sessionCounter; _isFirstSessionInited = true; autoInitCallbackWithParams = callback; var callbackId = _getNextCallbackId(); _branchCallbacks [callbackId] = callback; _initSessionAsReferrableWithCallback(isReferrable, callbackId); } }
/** * Initialize session and receive information about how it opened, specifying whether is should be referrable. */ public static void initSession(bool isReferrable, BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; _initSessionAsReferrableWithCallback(isReferrable, callbackId); }
/** * Initialize session and receive information about how it opened. */ public static void initSession(BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; _initSessionWithCallback(callbackId); }
/** * Get a referral code for this session with a prefix identifier for a specified amount set to expire at the specified time in a specified bucket with a specified calculation type and location * Calc Type can be one of 0 (unlimited, reward can be applied continually) or 1 (unique, user can only apply a specific code once) * Location can be one of 0 (referree, user applying referral code receives credit), 1 (referrer, user who created code receives credit), or 2 (both, both the sender and receiver receive credit) */ public static void getReferralCode(string prefix, int amount, DateTime expiration, string bucket, int calcType, int location, BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; _getReferralCodeWithPrefixAmountExpirationBucketTypeLocationAndCallback(prefix, amount, expiration.ToString("yyyy-MM-ddTHH:mm:ssZ"), bucket, calcType, location, callbackId); }
/** * Get a referral code for this session for a specified amount set to expire at the specified time */ public static void getReferralCode(int amount, DateTime expiration, BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; _getReferralCodeWithAmountExpirationAndCallback(amount, expiration.ToString("yyyy-MM-ddTHH:mm:ssZ"), callbackId); }
/** * Get a referral code for this session with a prefix identifier for a specified amount */ public static void getReferralCode(string prefix, int amount, BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; _getReferralCodeWithPrefixAmountAndCallback(prefix, amount, callbackId); }
/** * Get an arbitrary referral code for this session */ public static void getReferralCode(BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; _getReferralCodeWithCallback(callbackId); }
/** * Get a referral code for this session with a prefix identifier for a specified amount set to expire at the specified time */ public static void getReferralCode(string prefix, int amount, DateTime? expiration, BranchCallbackWithParams callback) { var callbackId = _getNextCallbackId(); _branchCallbacks[callbackId] = callback; if (expiration.HasValue) { _getReferralCodeWithPrefixAmountExpirationAndCallback(prefix, amount, expiration.Value.ToString("yyyy-MM-ddTHH:mm:ssZ"), callbackId); } else { _getReferralCodeWithPrefixAmountExpirationAndCallback(prefix, amount, "", callbackId); } }