Referral

Your account's invite link: each person who joins NoClick through it, and starts using it, adds reward_usd to your balance. A user of your account has none of its own.

class Referral

Your account's invite link and what it has earned.

Attributes
codestring
urlstring
shareTextstring

What a friend reads, then the link.

rewardUsdnumber

What each friend who starts using NoClick adds to your balance.

joinednumber

How many joined through it.

earnednumber

How many of them earned the reward, and what it came to.

earnedUsdnumber
joinedThrough{ name: string | null; channel: string } | null

Whose link your account joined through, if it did.

canApplyUntilDate | null

Until when your account can still apply an invite code (a day after it joined, once); null once it can't.

rawJsonObject

The response JSON exactly as the API sent it.

Types
type JsonObject = { [key: string]: unknown };

getstatic

static get(options?: { client?: NoClick }): Promise<Referral>

Your account's invite link, how many joined and earned through it, and whose link your account joined through.

Parameters
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

The link (url), the line to send it with (share_text) and what it has earned.

applystatic

static apply(code: string, options?: { client?: NoClick }): Promise<Referral>

Apply a friend's invite code (or their join link) to your account, as the person they invited: only within a day of your account's creation, and once. An unknown code throws NotFound; a second one Conflict.

await Referral.apply("ana-k3x9");
Parameters
codestringrequired
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

Your account's invite link, now naming whose link it joined through.