Class: Referral

Referral

Methods

(static) getReferred(params) → {Promise.<PaginatedReferredUsers>}

List of users referred by the current user.
Parameters:
Name Type Description
params Object getReferred parameters.
Properties
Name Type Description
event string If set, result will include only referred users for this specific event.
next_cursor string String cursor returned from the previous request.
limit number Number of referred users to return.
Source:
Returns:
- A Promise of page of referred users.
Type
Promise.<PaginatedReferredUsers>

(static) getReferredUsers() → {Promise.<Array.<ReferredUser>>}

List of users referred by the current user.
Deprecated:
  • Use getReferred instead
Source:
Returns:
- A Promise of an array of referred users.
Type
Promise.<Array.<ReferredUser>>

(static) getReferrers(params) → {Promise.<Array.<ReferralUser>>}

List of referrers of the current user.
Parameters:
Name Type Description
params Object getReferrers parameters.
Properties
Name Type Description
event string If set, result will include only referrers for this specific event.
Source:
Returns:
- A Promise of an array of referrers.
Type
Promise.<Array.<ReferralUser>>

Type Definitions

PaginatedReferredUsers

Type:
  • Object
Properties:
Name Type Description
referred Array.<ReferralUser> List of referred users
next_cursor string String cursor to use to get the next batch of referred users
Source:

ReferralUser

Type:
  • Object
Properties:
Name Type Description
user User User
event_date string The date the event was triggered, in RFC3339 format..
event string The related event
custom_data Object.<string, string> The custom data from the event. For the `app_install` event additional data is included: * `$channel` * `$suspicious` * `$platform` * any other custom data included in the Smart Invite
Source:

ReferredUser

Type:
  • Object
Properties:
Name Type Description
id string User ID
display_name string Username
avatar_url string URL to user's picture
auth_identities Object.<string, string> Custom identity key/value pairs, e.g "email":"hello@example.com"
install_date string The date the user installed the app, in RFC3339 format. Only applies to users who install the app from a GetSocial link.
install_channel string The channel the user installed the app from, e.g whatsapp.
Source: