coderwall-api

Coderwall API Client Library for Node.js

npm install coderwall-api
8 downloads in the last week
16 downloads in the last month

Coderwall-API

A node.js wrapper for Coderwall's REST API.

Installation

Install using the node.js package manager npm:

  $ npm install coderwall-api

Or...

Install via git clone:

  $ git clone git://github.com/KevinTCoughlin/node-coderwall.git
  $ cd node-coderwall
  $ npm install

Requirements

You can install coderwall-api and its dependencies with npm:

  $ npm install coderwall-api

Dependencies

Examples

Demos of the coderwall-api module are located in /examples

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

/**
 *  Retrieves Coderwall JSON data for the given profile
 */

var Coderwall = require('coderwall-api')
  , coderwall = new Coderwall;

/** Retrieves Coderwall Profile JSON for 'kevintcoughlin' */
coderwall.getProfile('kevintcoughlin', function(data) {
  console.log(data);
});

/** 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);
});

Testing

Issue the following Make command in the top directory to run the mocha.js test cases:

  $ make test

LICENSE

Coderwall-API: Copyright (c) 2013 Kevin Coughlin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

npm loves you