Clay.io SDK
Add to the top of <body>
<script>
(function(C,l,a,y,_,i,o){C[_]=C[_]||function(){
(C[_].q=C[_].q||[]).push(arguments)},C[_].l=1*new Date();i=l.createElement(a),
o=l.getElementsByTagName(a)[0];i.async=1;i.src=y;o.parentNode.insertBefore(i,o)
})(window,document,'script','//cdn.wtf/sdk/v1/clay_sdk.js','Clay');
Clay('init', {gameId: 0000})
</script>
Clay('init', {gameId: 0000})
Clay('client.share.any', {text: 'Come play a game with me!'})
Clay('ui.ads.banner', {position: 'top'}, function (err, ad) {
document.body.appendChild(ad.$el)
})
Clay('init', {gameId: 0000})
Clay('ui.ads.page', function (err, ad) {
document.body.appendChild(ad.$el)
})
position: top|bottom
Clay('ui.ads.banner', {position: 'top'}, function (err, ad) {
document.body.appendChild(ad.$el)
})
Share a message using the best available option.
For example, if called from within the Clay.io Android application the native
share modal will appear.
Otherwise, other services such as twitter will be used.
Clay('client.share.any', {text: 'Hello World'})
Clay('version', function (err, version) {
console.log(version);
})
ln -s ../../pre-commit.sh .git/hooks/pre-commit
npm install
npm test