swapi v0.0.1 Swapi

Simple wrapper for the Star Wars API

Summary

Functions

Gets an individual or list of films from the Star Wars Universe Example:

iex> Swapi.films
{:ok,  {[...]}}
iex> Swapi.films(1)
{:ok, {...ls(1) }}

Gets an individual or list of people from the Star Wars Universe Example:

iex> Swapi.people
{:ok,  {[...]}}
iex> Swapi.people(1)
{:ok, {...ls(1) }}

Gets an individual or list of planets from the Star Wars Universe Example:

iex> Swapi.planets
{:ok,  {[...]}}
iex> Swapi.planets(1)
{:ok, {...ls(1) }}

Gets the root url with a list of available resources Example:

iex> Swapi.root
{:ok,  {...}}

Gets the schema for any specific resource Example:

iex> Swapi.schema("people")
{:ok,  {...}}

Gets an individual or list of species from the Star Wars Universe Example:

iex> Swapi.species
{:ok,  {[...]}}
iex> Swapi.species(1)
{:ok, {...ls(1) }}

Gets an individual or list of starships from the Star Wars Universe Example:

iex> Swapi.starships
{:ok,  {[...]}}
iex> Swapi.starships(1)
{:ok, {...ls(1) }}

Gets an individual or list of vehicles from the Star Wars Universe Example:

iex> Swapi.vehicles
{:ok,  {[...]}}
iex> Swapi.vehicles(1)
{:ok, {...ls(1) }}

Functions

films(id \\ nil)

Gets an individual or list of films from the Star Wars Universe Example:

iex> Swapi.films
{:ok,  {[...]}}
iex> Swapi.films(1)
{:ok, {...ls(1) }}
people(id \\ nil)

Gets an individual or list of people from the Star Wars Universe Example:

iex> Swapi.people
{:ok,  {[...]}}
iex> Swapi.people(1)
{:ok, {...ls(1) }}
planets(id \\ nil)

Gets an individual or list of planets from the Star Wars Universe Example:

iex> Swapi.planets
{:ok,  {[...]}}
iex> Swapi.planets(1)
{:ok, {...ls(1) }}
root()

Gets the root url with a list of available resources Example:

iex> Swapi.root
{:ok,  {...}}
schema(resource)

Gets the schema for any specific resource Example:

iex> Swapi.schema("people")
{:ok,  {...}}
species(id \\ nil)

Gets an individual or list of species from the Star Wars Universe Example:

iex> Swapi.species
{:ok,  {[...]}}
iex> Swapi.species(1)
{:ok, {...ls(1) }}
starships(id \\ nil)

Gets an individual or list of starships from the Star Wars Universe Example:

iex> Swapi.starships
{:ok,  {[...]}}
iex> Swapi.starships(1)
{:ok, {...ls(1) }}
vehicles(id \\ nil)

Gets an individual or list of vehicles from the Star Wars Universe Example:

iex> Swapi.vehicles
{:ok,  {[...]}}
iex> Swapi.vehicles(1)
{:ok, {...ls(1) }}