node-angellist: Easy wrapper around the AngelList API
This module is designed to be an easy-to-use wrapper around the AngelList API. This module is designed to be used with node.js.
Install
npm install angellist
Or from source:
git clone git://github.com/rgerard/node-angellist.git cd node-angellist npm install
Simple Examples
var angel = ; // Init the object with your API keyangel; // Search for a company nameangel;
Documentation
Please refer to the AngelList API documentation for more detail on their API.
AngelList API ### init(clientID, clientSecret)
Inits the object with your client data;
Arguments
- clientID - Your client ID
- clientSecret - Your client secret
Example
// Init an AngelList objectvar angel = ;angel;
### getAuthUrl()
Returns the URL needed to start the authentication process.
Example
// Redirect the user to the auth URLvar url = angel;res;
### requestAccessToken(code, callback)
Requests an access token for a user who has authenticated your application
Arguments
- code - Returned from AngelList after the user has authenticated your app
- callback(err, body) - A callback which is called after the API call has returned, or an error has occurred.
Example
// Fetch the access tokenangel;
### setAccessToken(token)
Stores the access token returned from AngelList
Arguments
- token - Token to save
Example
// Fetch the access tokenangel;
### getMe(callback)
Returns the information about the logged-in user
Arguments
- callback(err, body) - A callback which is called after the API call has returned, or an error has occurred.
Example
// Fetch the posts for a company/personangel;
### search(query, callback)
Returns the search results from a query.
Arguments
- query - The person or company to search for
- callback(err, body) - A callback which is called after the API call has returned, or an error has occurred.
Example
// Search for a person or companyangel;
### getUserById(angelID, callback)
Returns the information about a user by their AngelList ID.
Arguments
- angelID - The AngelList ID of the person to get information for.
- callback(err, body) - A callback which is called after the API call has returned, or an error has occurred.
Example
// Search for a person or companyangel;