coderwall-api
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -1,4 +0,9 @@ | ||
0.1.0 / 2013-07-18 | ||
0.1.3 / 2013-07-19 | ||
================== | ||
* Initial Working Release | ||
* Removed Debug Print Line | ||
0.1.0 - 0.1.2 / 2013-07-18 | ||
========================== | ||
* Initial Working Release |
@@ -78,3 +78,3 @@ "use strict"; | ||
var url = this.options.restBase + username + '.json'; | ||
console.log(url); | ||
this.get(url, function(data) { | ||
@@ -81,0 +81,0 @@ callback(data); |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"author": "Kevin Coughlin <kevintcoughlin@gmail.com>", | ||
@@ -13,0 +13,0 @@ "license": "MIT", |
@@ -31,6 +31,41 @@ # Coderwall-API | ||
Demos of the coderwall-api module are located in `/examples` | ||
Demos of the coderwall-api module are located in [/examples](https://github.com/KevinTCoughlin/node-coderwall/tree/master/example) | ||
## Usage | ||
## API Documentation | ||
* **Profile - .getProfile( username, callback )** | ||
coderwall.getProfile('kevintcoughlin', function(data) { | ||
console.log(data); | ||
}); | ||
* **Sample JSON Response** | ||
{ | ||
"username": "kevintcoughlin", | ||
"name": "Kevin T. Coughlin", | ||
"location": "New Jersey", | ||
"endorsements": 0, | ||
"team": null, | ||
"accounts": { | ||
"github": "KevinTCoughlin" | ||
}, | ||
"badges": [ | ||
{ | ||
"name": "Mongoose 3", | ||
"description": "Have at least three original repos where Ruby is the dominant language", | ||
"created": "2013-07-11T12:07:02Z", | ||
"badge": "https://d3levm2kxut31z.cloudfront.net/assets/badges/mongoose3-f4d6bb5a6f9e8ada6c1959f05f36c583.png" | ||
}, | ||
{ | ||
"name": "Philanthropist", | ||
"description": "Truly improve developer quality of life by sharing at least 50 individual open source projects", | ||
"created": "2013-06-22T03:48:06Z", | ||
"badge": "https://d3levm2kxut31z.cloudfront.net/assets/badges/philanthropist-a8171b1d339c4c70d78a8a67167cbfa3.png" | ||
} | ||
] | ||
} | ||
## Example Usage | ||
```js | ||
@@ -41,3 +76,3 @@ /** | ||
var Coderwall = require('..') | ||
var Coderwall = require('coderwall-api') | ||
, coderwall = new Coderwall; | ||
@@ -49,2 +84,12 @@ | ||
}); | ||
/** Retrieves Coderwall Profile JSON for 'isaacs' */ | ||
coderwall.getProfile('isaacs', function(data) { | ||
console.log(data); | ||
}); | ||
/** Retrieves Coderwall Profile JSON for 'isaacs' */ | ||
coderwall.getProfile('naveen', function(data) { | ||
console.log(data); | ||
}); | ||
``` | ||
@@ -51,0 +96,0 @@ |
8290
122
76