Last active
August 29, 2015 14:01
-
-
Save keang/b1a4150f314e8fdaf40f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="gimmie-root"></div> | |
<script type="text/javascript"> | |
var _gimmie = { | |
"endpoint" : "/gimmie-connect?gimmieapi=", //for Rack example above, change this field to "/gimmieapi=" | |
"gimmie_endpoint" : "https://api-rtqa.gimmieworld.com", // An optional endpoint for bypassing secret authentication, for open API like /categories.json | |
"key" : "###################", //get consumer_key from the portal | |
"country" : "SG", //country code which affects visible rewards | |
"locale" : "us", //locale | |
//remove the user field below if no user has signed in | |
"user" : { | |
"name" : "{{username}}", | |
"realname" : "{{username}}", | |
"email" : "{{username}}", | |
"avatar" : "https://www.gravatar.com/avatar/90b6b8f25c8a9a42ba74804b80f5cebf" | |
}, | |
"options" : { | |
"animate" : true, | |
"auto_show_notification" : true, | |
"notification_timeout" : 20, | |
"responsive" : true, | |
"show_anonymous_rewards" : true, | |
"shuffle_reward" : true, | |
"default_level_icon" : "", | |
"pages" : { | |
"catalog" : { | |
"hide" : false | |
}, | |
"profile" : { | |
"hide" : false, | |
"redemptions" : true, | |
"mayorships" : false, | |
"badges" : true, | |
"activities" : true | |
}, | |
"leaderboard" : { | |
"table" : "alltime", //alltime,thisweek,last7days,pastweek,today,last30days,pastmonth,thismonth | |
"hide" : false, | |
"mostpoints" : true, | |
"mostrewards" : true, | |
"mostvalues" : true | |
} | |
} | |
}, | |
"events" : { | |
"widgetLoad" : function () { | |
console.log ('Loaded'); | |
}, | |
"login" : function () { | |
console.log ('Login'); | |
}, | |
"loadLeaderboard" : function (data, cb) { | |
//data | |
cb(data); | |
} | |
}, | |
"text" : { | |
"help" : "" | |
}, | |
"templates" : { | |
}, | |
}; | |
(function(d){ | |
var js, id = "gimmie-widget", ref = d.getElementsByTagName("script")[0]; | |
if (d.getElementById(id)) {return;} | |
js = d.createElement("script"); js.id = id; js.async = true; | |
js.src = "//api.gimmieworld.com/cdn/gimmie-widget2.all.js"; | |
ref.parentNode.insertBefore(js, ref); | |
}(document)); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment