Git Product home page Git Product logo

isa-api's Introduction

International Showtimes API

Specification summary:

  • RESTful api.
  • JSON response
  • Api versioning.
  • Exception Handling
  • Authentication
  • RSpec testing.
  • API Request monitoring
  • Dockerized

Getting Started

The application is Dockerized to streamline the setup of the development environment on a new machine and enable the app to run Dockerized in production.

The only dependency is that you have Docker up and running on your host system. See the Get Docker guide for your system.

Pull the repo, build the app, setup the database:

git clone [email protected]:JamesOkunlade/isa-api.git 
cd isa-api

docker-compose build
docker-compose run --rm app rake db:setup

Running

To start all the services, run:

docker-compose up

This will block your shell, so you'll want to run this in tmux or its own tab. If you want to detach after starting, you can use the -d flag.

docker-compose up -d

Open a Rails console

docker-compose exec app rails console

Run database migrations

docker-compose exec app rake db:migrate
  • Install Httpie to use in testing endpoints locally from the terminal
# For Mac
$ brew install httpie

# Linux
$ apt install httpie

API Endpoints

API Endpoint Functionality
GET /listjobs Fetches a list of jobs and their statues
POST /createjob Creates a new job
GET /sidekiq Displays the sidekiq dashboard

Testing API locally from terminal using the Httpie

# To login existing the existing user
http POST :3000/auth/login email=test@example.com password=foobar

# To get all jobs
http :3000/listsjobs \
>Authorization:<auth_token>

# To create a new job
http POST :3000/createjob name='The vampire diaries'

Author

James Okunlade

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.