xkcd

Uses the XKCD JSON API to retrieve the random, specific and the latest XKCD comic.


License
MIT

Documentation

Xkcd

Hex.pm Hex.pm Hex.pm

Uses the XKCD JSON API to retrieve a random, specific or the latest comic

Installation

If available in Hex, the package can be installed as:

  1. Add xkcd to your list of dependencies in mix.exs:

    def deps do
      [{:xkcd, "~> 0.0.1"}]
    end
    
  2. Ensure xkcd is started before your application:

    def application do
      [applications: [:xkcd]]
    end
    

Usage

iex> Xkcd.latest
{:ok, %Xkcd.Comic{...}}

iex> Xkcd.random
{:ok, %Xkcd.Comic{...}}

iex> Xkcd.number(256)
{:ok, %Xkcd.Comic{...}}