View Source XlFaker (Xl Faker v0.1.0)

A public API for generating random content (e.g., book titles and page content) for Elixirland assignments.

Purpose

This public API is intended to be used for implementations of Elixirland assignments. It provides a way to generate random content that is required for some of the assignments.

Summary

Functions

Generates a list of random pages.

Generates a list of random titles.

Functions

Link to this function

generate_pages(opts \\ [])

View Source

Generates a list of random pages.

Returns

Returns a list where each list element is a string containing 5 random paragraphs. Paragraphs are separated by a single newline (\n).

Options

  • :count - The number of pages to generate. Defaults to 10.

Examples

XlFaker.generate_pages(count: 2)
#=> ["The forest was alive with the sounds of nature. ...", "Excuse me, are you Amelia Rivers? ..."]
Link to this function

generate_titles(opts \\ [])

View Source

Generates a list of random titles.

Returns

Returns a list of strings.

Options

  • :count - The number of titles to generate. Defaults to 10.

Examples

XlFaker.generate_titles(count: 2)
#=> ["A Detailed Jelly", "Wrong Necktie"]