java.lang.Object | |
↳ | co.megacool.megacool.ReferralCode |
A referral code is the magic part tacked on to URLs shared through the SDK that allows us to credit a user for inviting others. You do not need to create these yourself, but they might be useful if you want to identify specific users as seen by Megacool.
A referral code consists of two parts:
The userId is assigned from the server-side the first time the app gets online, but it's possible to create shares before this happens. These shares will be associated with a referral code that doesn't have a userId yet.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | equals(Object o) | ||||||||||
String | getShareId() | ||||||||||
String | getUserId() | ||||||||||
int | hashCode() | ||||||||||
String | toString() | ||||||||||
String |
toString(boolean verbose)
A more verbose stringified version of the referral code.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
shareId
part of the referral code or an empty string if it's not set
userId
part of the referral code.
userId
and shareId
A more verbose stringified version of the referral code.
verbose | pass true to get a verbose representation, otherwise it'll be the
same output as toString() . |
---|
verbose
is
true
, otherwise a concatenation of the userId
and
shareId
.