Code Monkey home page Code Monkey logo

spacex_ex's Introduction

๐Ÿš€ Elixir SpaceX API Wrapper

GitHub release GitHub issues GitHub stars GitHub license

A simple API wrapper for r-spacex/SpaceX-API in Elixir!



Table of Contents

Documentation

See the Wiki for full wrapper documentation.

Installation

available in Hex, the package can be installed by adding spacex_ex to your list of dependencies in mix.exs:

def deps do
  [
    {:spacex_ex, "~> 1.0.0"}
  ]
end

Basic Usage

# List of all SpaceX capsule information
{200, capsules} = SpacexEx.capsules

# List of past SpacexEx.launch information
{200, past_launches} = SpacexEx.launches

# List of all SpaceX launch information
{200, all_launches} = SpacexEx.launches_all

# Next SpaceX launch information
{200, next_launch} = SpacexEx.launches_next

# Latest SpaceX launch information
{200, latest_launch} = SpacexEx.launches_latest

# Upcoming SpaceX launch information
{200, upcoming_launch} = SpacexEx.launches_upcoming

# List of all SpaceX launchpad information
{200, launchpads} = SpacexEx.launchpads

# List of all SpaceX mission information
{200, missions} = SpacexEx.missions

# List of all SpaceX capsule part information
{200, part_capsules} = SpacexEx.part_capsules

# List of all SpaceX core part information
{200, part_cores} = SpacexEx.part_cores

# List of all SpaceX payload information
{200, payloads} = SpacexEx.payloads

# List of all SpaceX rocket information
{200, rockets} = SpacexEx.rockets

# Get SpaceX company information
{200, spacex_info} = SpacexEx.info

# Get the SpaceX Roadster information
{200, spacex_roadster} = SpacexEx.info_roadster

# Get SpaceX history information
{200, spacex_history} = SpacexEx.info_history 

# Get a SpaceX capsule information by id
{200, capsule} = SpacexEx.capsules("dragon1")

# Get a SpaceX launchpad information by id
{200, launchpad} = SpacexEx.launchpads("ksc_lc_39a")

# Get a SpaceX missions information by id
{200, mission} = SpacexEx.missions("6C42550")

# Get a SpaceX capsule part information by id
{200, part_capsule} = SpacexEx.part_capsules("C111")

# Get a SpaceX capsule core information by id
{200, part_core} = SpacexEx.part_cores("B1029")

# Get a SpaceX payloads information by id
{200, payload} = SpacexEx.payloads("SpaceX CRS-11")

# Get a SpaceX rockets information by id
{200, rocket} = SpacexEx.rockets("bfr")

# Get attributes of a capsule
capsule.name
>>> "Dragon 1"

capsules.crew_capacity
>>> 0

capsules.description
>>> "Dragon is a reusable spacecraft developed by SpaceX. ..."

spacex_ex's People

Contributors

crunchysoul avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.