My Project
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Patreon Class Reference
Inheritance diagram for Patreon:

Public Member Functions

delegate void onStatus (string text)
 
delegate void onPageReturn (JsonValue jsonData_)
 
bool hasReward (string _rewardTitle)
 Checks if current user has reward.
 
bool IsConnected ()
 
void connect ()
 Connects to patreon page.
 
void cancel ()
 Use it if you use connect() and wish to cancel the connection before it is complete.
 
void refreshToken ()
 Refreshes the token by requesting a new token from patreon page.
 
bool setTokenFromJson (string jsontext, bool loaduserdata_=true)
 If you have token saved in json format, you can skip the authentication proccess and patreon page access by providing the JSON here.
 
JsonValue getUserJsonData ()
 
string getTokenAsJson ()
 If you want to save the token to use later, use this. Afterwards, use setTokenFromJson function to restore token to skip the login process.
 
IEnumerator getPage (string api_auth2_="api/current_user", onPageReturn callback_=null)
 
void getPledges (string campaignId, Action< List< string > > getList)
 

Public Attributes

string client_id
 
string redirect_uri ="http://localhost"
 
int port =8080
 
onStatus onError
 If there is an error, onError(string errorName) will be called.
 
onStatus onConnect
 If connection successful, onConnect(string successMessage) will be called.
 
ObscuredString email =""
 
ObscuredFloat pledge =0
 
List< string > rewards =new List<string>()
 
string status
 
JsonValue getPageCallbackJsonValue
 

Static Public Attributes

static Patreon instance
 

Member Function Documentation

◆ getTokenAsJson()

string Patreon.getTokenAsJson ( )
inline

If you want to save the token to use later, use this. Afterwards, use setTokenFromJson function to restore token to skip the login process.

Returns

◆ hasReward()

bool Patreon.hasReward ( string  _rewardTitle)
inline

Checks if current user has reward.

Parameters
_rewardTitleThe title of the reward in the patreon page
Returns
returns true if user has reward with title _rewardTitle

◆ setTokenFromJson()

bool Patreon.setTokenFromJson ( string  jsontext,
bool  loaduserdata_ = true 
)
inline

If you have token saved in json format, you can skip the authentication proccess and patreon page access by providing the JSON here.

Parameters
jsontextClient information in JSON format

The documentation for this class was generated from the following file: