Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a6a66b
commit 82cb070
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// Dribbble.js is a client for the Dribbble´s API (http://http://dribbble.com/api) | ||
// Usage: | ||
// var dribbble = require('dribbble'); | ||
// var callback = function(shot, err){ | ||
// if(!err) console.log(shot); | ||
// } | ||
// | ||
// dribbble.shots(21603, callback); | ||
// | ||
|
||
var dribbble = exports; | ||
|
||
|
||
|
||
// | ||
// This function get the shot for a espeficed :id, then call the callback with | ||
// callback = function(shot, err). `shot` is a object all informaction about the shot. | ||
// If any error then `err` is not null. | ||
// | ||
dribbble.shots = function(id, callback){} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
var vows = require('vows'), | ||
assert = require('assert'), | ||
sys = require('sys'); | ||
|
||
var dribbble = require('./../lib/dribbble'); | ||
|
||
// Suite for testing the client. | ||
var client_suite = vows.describe("Basic tests for Dribbble´s client"); | ||
client_suite.addBatch({ | ||
"A Dribbble client": { | ||
topic: dribbble, | ||
"should be a object": function(topic){ | ||
assert.ok(typeof topic === 'object'); | ||
}, | ||
"Should have a function to get the 'shots'":function(topic){ | ||
assert.ok(typeof topic.shots === 'function'); | ||
}, | ||
"Should have a function to get a set of rebounds":function(topic){ | ||
assert.ok(typeof topic.rebounds === 'function'); | ||
}, | ||
"Should have a function to get the set of comments for the shot specified":function(topic){ | ||
assert.ok(typeof topic.comments === 'function'); | ||
}, | ||
"Should have a function to get the list of shots":function(topic){ | ||
assert.ok(typeof topic.list === 'function'); | ||
}, | ||
"Should have a function to get the most recent shots for the player":function(topic){ | ||
assert.ok(typeof topic.shots_for_player === 'function'); | ||
}, | ||
"Should have a function to get the most recent shots published by those the player":function(topic){ | ||
assert.ok(typeof topic.shots_following_for_player === 'function'); | ||
}, | ||
"Should have a function to get shots liked by the player":function(topic){ | ||
assert.ok(typeof topic.shots_likes_for_player === 'function'); | ||
}, | ||
"Should have a function to get the player":function(topic){ | ||
assert.ok(typeof topic.player === 'function'); | ||
}, | ||
"Should have a function to get the player followers":function(topic){ | ||
assert.ok(typeof topic.player_followers === 'function'); | ||
}, | ||
"Should have a function to get the player following":function(topic){ | ||
assert.ok(typeof topic.player_following === 'function'); | ||
}, | ||
"Should have a function to get the list of players drafted":function(topic){ | ||
assert.ok(typeof topic.player_draftees === 'function'); | ||
} | ||
}, | ||
}).export(module); |