Popularity
1.5
Declining
Activity
0.0
Stable
7
2
1
Monthly Downloads: 4
Programming language: Elixir
License: MIT License
Tags:
Third Party APIs
random_user alternatives and similar packages
Based on the "Third Party APIs" category.
Alternatively, view random_user alternatives based on common mentions on social networks and blogs.
-
gringotts
A complete payment library for Elixir and Phoenix Framework -
MongoosePush
MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS. -
sendgrid
Create and send composable emails with Elixir and SendGrid. -
mailchimp
A basic Elixir wrapper for version 3 of the MailChimp API -
sparkpost
SparkPost client library for Elixir https://developers.sparkpost.com -
diplomat
Elixir library for interacting with Google's Cloud Datastore -
elixtagram
:camera: Instagram API client for the Elixir language (elixir-lang) -
google_sheets
Elixir library for fetching Google Spreadsheet data in CSV format -
pay_pal
:money_with_wings: PayPal REST API client for the Elixir language (elixir-lang) -
amazon_product_advertising_client
An Amazon Product Advertising API client for Elixir -
cashier
Cashier is an Elixir library that aims to be an easy to use payment gateway, whilst offering the fault tolerance and scalability benefits of being built on top of Erlang/OTP -
elixir_ipfs_api
The Elixir library that is used to communicate with the IPFS REST endpoint. -
dogstatsd
An Elixir client for DogStatsd https://www.datadoghq.com/
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Promo
www.influxdata.com
Do you think we are missing an alternative of random_user or a related project?
README
RandomUser
Features
- [x] Return one random user
- [x] Return multiple random users
- [x] Seeds (always returns Becky Sims)
- [x] Choose gender, nationality and other options
- [x] Format results
Installation
This package is available in Hex and can be installed as follows:
Add
random_user
to your list of dependencies inmix.exs
:def deps do [{:random_user, "~> 0.3.3"}] end
Ensure
random_user
is started before your application:def application do [applications: [:random_user]] end
Usage
One Random User
# Returns one random user
RandomUser.Random.one
# Returns a random female user
RandomUser.Random.one(%{ gender: "female" })
# Returns a random British female user
RandomUser.Random.one(%{ gender: "female", nat: "gb" })
Multiple Random Users
# Returns 50 users
RandomUser.Random.multiple(50)
# Returns 50 female users
RandomUser.Random.multiple(50, %{ gender: "female" })
# Returns 50 female users from AU and NZ
RandomUser.Random.multiple(50, %{ gender: "female", nat: "au,nz" })
Get results easily with Parser
For one random user:
res = RandomUser.Random.one |> RandomUser.Parser.results |> RandomUser.Parser.parse
res.gender
res.picture["large"]
For multiple random users:
users = RandomUser.Random.multiple(2) |> RandomUser.Parser.results
Enum.map(users, fn u ->
user = RandomUser.Parser.parse(u)
large_pic = user.picture["large"]
end)