Skip to content

Latest commit

 

History

History
88 lines (59 loc) · 1.33 KB

README.md

File metadata and controls

88 lines (59 loc) · 1.33 KB

Randomuser

This gem returns simple JSON/hash responses from the Random User Generator API.

Installation

Add this line to your application's Gemfile:

gem 'randomuser'

And then execute:

$ bundle

Or install it as a standalone gem with:

$ gem install randomuser

Usage

To request a single random user:

Randomuser.generate

To request multiple random users:

Randomuser.generate(5)

To request a single female random user:

Randomuser.generate_female

To request multiple female random users:

Randomuser.generate_female(5)

To request a single male random user:

Randomuser.generate_male

To request multiple male random users:

Randomuser.generate_male(5)

To request a specific user:

Randomuser.generate_seed('foobar')

For more information on this API, please see the Random User Generator site.

Tests

Testing works as usual:

git clone https://github.com/humanshell/randomuser.git
cd randomuser
bundle install
rake

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request