Skip to content

Small and useful library, which use API of http://randomuser.me to generate random users.

License

Notifications You must be signed in to change notification settings

PatNowak/random_user_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RandomUserApi

Build Status

Small and useful library, which use API of http://randomuser.me to generate random users.

Hex link

Installation

To install this app, just add it in your list of dependencies in mix.exs:

def deps do
  [
    {:random_user_api, "~> 1.2.1"}
  ]
end

Documentation is available here.

Instruction

Usage is very straightforward. In many cases simple call for single user would be enough.

alias RandomUserApi.Engine

# get single user
Engine.get_users()

# get 10 users
 Engine.get_users [number: 10]
 
# get one female
Engine.get users [gender: :female]

# get three men
Engine.get_users [number: 3, gender: :male]

# get one Brazilian
Engine.get_users [nat: "BR"]

TODO:

  • Included / excluded fields
  • list of values

I rewrited this library to use HTTPoison, because HTTPotion had issues with SSL.

Note:

If nationality you put is not known by the API, it will be ignored. Same story with gender.

Enjoy!

About

Small and useful library, which use API of http://randomuser.me to generate random users.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages