randomuser
Installation
Install using the node.js package manager npm:
$ npm install randomuser
Examples
Demos of the randomuser module are located in: ./examples
Usage
Require Module and Initialize Client
var RandomUser = require('randomuser')
, r = new RandomUser();
.getUsers(callback)
r.getUsers(function(data) {
console.log(data);
});
.getUsers(params, callback)
r.getUsers({ seed: "foxie", results: 5, gender: "male" }, function(data) {
console.log(data);
});
Documentation
params {Object}results
- int specifying number of results to returngenders
- string - "male" or "female" specifying gender to generateseed
- string - service will return same data for given seed
Testing
$ npm test
Contributing
Feel free to contribute!