Commit 1f2c4830 authored by Aaron Tidwell's avatar Aaron Tidwell

update docs

parent 758a0728
......@@ -3,7 +3,7 @@
checkout this repo into ./
```
var challonge = require('./../');
var challonge = require('./node-challonge');
var client = challonge.createClient({
apiKey: '***yourAPIKey***'
......@@ -18,4 +18,29 @@ function index() {
});
}
```
For docs: http://api.challonge.com/v1
Library is organized into resource.method
For API calls that require nested params (eg: http://api.challonge.com/v1/documents/tournaments/create) properties should be specified nested. example:
```
var challonge = require('./node-challonge');
var client = challonge.createClient({
apiKey: '***yourAPIKey***'
});
client.tournaments.create({
tournament: {
name: 'new_tournament_name',
url: 'new_tournament_url', //also can be used as id
tournament_type: 'single elimination',
},
callback: function(err,data){
if (err) { console.log(err); return; }
console.log(data);
}
});
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment