Comparing version 0.0.7 to 0.0.8
@@ -21,1 +21,6 @@ var dwolla = require('../lib/dwolla'); | ||
}); | ||
dwolla.fundingSources(c.token, function(err, data) { | ||
if (err) { console.log(err); } | ||
console.log(data); | ||
}); |
@@ -353,1 +353,34 @@ var https = require('https'); | ||
}; | ||
/** | ||
* Retrieves verified funding source by identifier for the user associated with the authorized access token. | ||
* https://www.dwolla.com/developers/endpoints/fundingsources/details | ||
* | ||
* @param {String} oauth_token | ||
* @param {String} fundingId | ||
* @param {Function} fn | ||
**/ | ||
exports.fundingSourceById = function(oauth_token, id, fn) { | ||
if (typeof fn !== 'function') { throw new Error('Missing callback'); } | ||
if (!oauth_token) { throw new Error('Missing arg oauth_token'); } | ||
var params = { oauth_token: oauth_token }; | ||
_request('/fundingsources/' + id, params, fn); | ||
}; | ||
/** | ||
* Retrieves a list of verified funding sources for the user | ||
* associated with the authorized access token. | ||
* https://www.dwolla.com/developers/endpoints/fundingsources/list | ||
* | ||
* @param {String} oauth_token | ||
* @param {Function} fn | ||
**/ | ||
exports.fundingSources = function(oauth_token, fn) { | ||
if (typeof fn !== 'function') { throw new Error('Missing callback'); } | ||
if (!oauth_token) { throw new Error('Missing arg oauth_token'); } | ||
var params = { oauth_token: oauth_token }; | ||
_request('/fundingsources/', params, fn); | ||
}; | ||
@@ -5,3 +5,3 @@ { | ||
"description": "Dwolla API for node.js", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -13,4 +13,3 @@ # Dwolla API for node.js | ||
Requires a valid user OAuth2 token. Note tokens do not expire and may be | ||
reused. See https://github.com/bnoguchi/everyauth for an example on how | ||
to authorize a user and get a Dwolla OAuth2 token. | ||
reused. | ||
@@ -25,5 +24,24 @@ * fullAccountInfo(oauth_token, callback) | ||
* request(oauth_token, pin, sourceId, amount[, params], callback) | ||
* fundingSources(oauth_token, callback) | ||
* fundingSourceById(oauth_token, id, callback) | ||
All optional parameters are passed in as an optional object before the callback. | ||
### How to obtain a Dwolla OAuth2 token | ||
To authenticate a user, follow the examples from one of the following modules. | ||
#### everyauth | ||
[everyauth](http://everyauth.com/) is an authentication and authorization module for your node.js Connect and Express apps. See http://everyauth.com/#other-modules/dwolla-oauth2 | ||
#### passport-dwolla | ||
[Passport](http://passportjs.org/) is authentication middleware for Node.js, popular for being lightweight, modular, and flexible. A strategy for authenticating with Dwolla, along with an example, is available in the [passport-dwolla](https://github.com/jaredhanson/passport-dwolla) module. | ||
#### Dwolla Developer Site | ||
The Dwolla [Generate Token](http://developers.dwolla.com/dev/token) tool allows you | ||
create a valid OAuth token for testing purposes. | ||
## Installation | ||
@@ -30,0 +48,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
21145
17
0
531
85