Faker Elixir (octopus) v1.0.2 FakerElixir.Internet
Generate fake data for the domain Internet
Summary
Functions
Return an email
Return an email with the name given
Examples
Return a password given by an user
Return an url
Return an url with https://
Return a user agent string
Return a user agent string for the type given
Return an user name
Return an user name for the name given
Functions
Return an email
Examples
iex> FakerElixir.Internet.email
"demarcus@ezra.io"
You can set :popular to generate an email with a popular domain
FakerElixir.Internet.email(:popular)
"candelario@gmail.com"
You can set :school to generate an email with an university domain
FakerElixir.Internet.email(:school)
"trycia@uab.edu"
Return an email with the name given
Examples
iex> FakerElixir.Internet.email("Peter Moleski")
"peter.moleski@ethel.net"
Examples
iex> FakerElixir.Internet.email(:popular, "Peter Sobieska")
"peter.sobieska@hotmail.com"
iex> FakerElixir.Internet.email(:school, "Harry potter")
"harry.potter@pittstate.edu"
Return a password given by an user
Examples
iex> FakerElixir.Internet.password(:weak)
"robbie"
iex> FakerElixir.Internet.password(:normal)
"francesco6"
iex> FakerElixir.Internet.password(:strong)
"tOu%Mt*B16ueLs!0uA3rDA"
Return an url with https://
Examples
iex> FakerElixir.Internet.url(:safe)
"https://www.stefan-little.org/"
Return a user agent string
Examples
iex> FakerElixir.Internet.user_agent
"Mozilla/5.0 (iPad; CPU OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B411 Safari/600.1.4"
Return a user agent string for the type given
Allowed types: :bot, :browser, :chrome, :desktop,
:firefox, :console, :ie, :opera, :phone,
:playstation, :safari, :tablet, :wii, :xbox
Note:
:browserrandomly picks a user agent from:ie,:opera,:firefox,:safari:consolerandomly picks a user agent from:playstation,:xbox,:wii
Examples
iex> FakerElixir.Internet.user_agent(:chrome)
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"