clay-sdk-base
v1.1.3
Published
Clay.io SDK Base is a subset of the Clay.io SDK
Downloads
36
Readme
WARNING: WILL BE DEPRECATED MAY 2, 2015
Use Clay.io SDK instead
Clay.io SDK Base
Clay.io SDK Base is a subset of the Clay.io SDK
Install
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_base.js','Clay');
Clay('init', {gameId: 0000})
</script>
Example
Clay('init', {gameId: 0000})
Clay('client.share.any', {text: 'Come play a game with me!'})
Usage
Init
Clay('init', {gameId: 0000})
Share Any
Share a message using the best available option.
See Clay.io SDK docs for details.
Clay('client.share.any', {text: 'Hello World'})
Version
Clay('version', function (err, version) {
console.log(version);
})
Contributing
Install pre-commit hook
ln -s ../../pre-commit.sh .git/hooks/pre-commit
npm install
npm test