Skip to content

Instantly share code, notes, and snippets.

View raphaelgmelo's full-sized avatar

Raphael Melo raphaelgmelo

View GitHub Profile
// Set Joysticket Credentials
// Replace the parameters with your App's Authentication Data
JoysticketSDK.Instance.SetCredentials ("PUBLIC_KEY", "PRIVATE_KEY");
// Initialize the SDK
JoysticketSDK.Instance.Initialize ();
// Joysticket user authentication
// Shows the Joysticket interface for the user to login or signup to Joysticket
JoysticketSDK.Instance.ShowViewLogin ();
// Verify and reward user with Tickets
// Replace the parameter with the code registered on the developers web panel
JoysticketSDK.Instance.TrackEventWithCallback ("CODE_FOR_YOUR_EVENT");
// Required delegate
JoysticketSDK.Instance.TrackEventFinished +=
new JoysticketSDK.TrackEventFinishedEventHandler(OnTrackEventFinished);
public void OnTrackEventFinished(JoysticketEvent joysticketEvent){
// Verify and reward user with Tickets
// Replace the parameter with the code registered on the developers web panel
JoysticketSDK.Instance.TrackEvent ("CODE_FOR_YOUR_EVENT");
{
"message" : "Error description"
}
curl --verbose \
--header "Authorization: ba14ef0f3dcaf77b92b710761f700acfbdff3d6e6887dd634189c237604ea57720140910540245" \
https://joysticket.com/api/v2/country
[
{
"id" : "BR" ,
"name" : "Brazil"
} ,
{
"id" : "ES" ,
"name" : "Spain"
}
]
curl --verbose \
--header "Authorization: ba14ef0f3dcaf77b92b710761f700acfbdff3d6e6887dd634189c237604ea57720140910540245" \
--data "username=denismendes&email=denis@joysticket.com&password=123456&country=1" \
https://joysticket.com/api/v2/user`
{
"createdAt" : {
"date" : "2014-09-23 16:27:16.000000" ,
"timezone_type" : 3 ,
"timezone" : "America/Sao_Paulo"
}
}