Skip to content

Clyff/sw-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SW-API

My Star Wars based API

Requisites

You need this softwares and modules instaled in your machine to run this application:

Instalation

  1. Download the repository:
$ git clone [email protected]:Clyff/sw-api.git
$ cd sw-api
  1. Create a virtual enviroment and activactivate it:
$ virtualenv env
$ source env/bin/activate
  1. Within the enviroment, install the packages:
$ pip install -r requirements.txt
  1. Start MongoDB (if not already started at boot) and run the application:
$ sudo service mongod start
$ python main.py

Usage

The following routes ar avaliable (all under the port 5000):

  • /planets/list: Returns a list of all Planets stored in the collection.
  • /planets/view: Returns a specific Planet based on url parameters. Avaliable GET parameters: nome and id.
  • /planets/create: Creates a Planet, if the name is avaliable, and return it. Avaliable POST parameters: nome (obrigatory), clima and terreno.
  • /planets/update: Updates a existing Planet and return it. Avaliable POST parameters: nome (obrigatory), clima and terreno.
  • /planets/delete: Deletes a specific Planet based on POST parameters. Avaliable POST parameters: nome (obrigatory).

Docs

List of documentations used to create this application:

About

My Star Wars based API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages