Skip to content

notdevinclark/xkcd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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{...}}

About

An Elixir Hex for accessing the XKCD JSON API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages