randomuser_ex v0.1.0 RandomuserEx
Elixir wrapper to consume randomuser.me API.
Just a simple wrapper for the randomuser.me API in order to make easy to get information to create random users in our applications.
Link to this section Summary
Functions
Fetch N random users generated by randomuser.me matching the options specified
Fetch one random user generated by randomuser.me matching the options specified
Link to this section Functions
Link to this function
get_many(params \\ %{}, number \\ 1)
Fetch N random users generated by randomuser.me matching the options specified.
Usage example
iex(1)> {:ok, users} = RandomuserEx.get_many(%{nat: :es}, 20) iex(2)> length(users) 20 iex(3)> !is_nil(Enum.at(users, 0)) true
Link to this function
get_one(params \\ %{})
Fetch one random user generated by randomuser.me matching the options specified.
Usage example
iex(1)> {:ok, user} = RandomuserEx.get_one(%{gender: :male}) iex(2)> !is_nil(user) true