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

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

email()

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"
email(name)

Return an email with the name given

Examples

iex> FakerElixir.Internet.email("Peter Moleski")
"peter.moleski@ethel.net"
email(atom, name)

Examples

iex> FakerElixir.Internet.email(:popular, "Peter Sobieska")
"peter.sobieska@hotmail.com"
iex> FakerElixir.Internet.email(:school, "Harry potter")
"harry.potter@pittstate.edu"
password(atom)

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"
url()

Return an url

Examples

iex> FakerElixir.Internet.url
"http://www.alejandra-connelly.com/"
url(atom)

Return an url with https://

Examples

iex> FakerElixir.Internet.url(:safe)
"https://www.stefan-little.org/"
user_agent()

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"
user_agent(type)

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:

  • :browser randomly picks a user agent from :ie, :opera, :firefox, :safari
  • :console randomly 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"
user_name()

Return an user name

Examples

iex> FakerElixir.Internet.user_name
"chadrick"
user_name(name)

Return an user name for the name given

Examples

iex> FakerElixir.Internet.user_name("Jeremie GES")
"jeremie.ges"