My Star Wars based API
You need this softwares and modules instaled in your machine to run this application:
- Download the repository:
$ git clone [email protected]:Clyff/sw-api.git
$ cd sw-api
- Create a virtual enviroment and activactivate it:
$ virtualenv env
$ source env/bin/activate
- Within the enviroment, install the packages:
$ pip install -r requirements.txt
- Start MongoDB (if not already started at boot) and run the application:
$ sudo service mongod start
$ python main.py
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
andid
. - /planets/create: Creates a Planet, if the name is avaliable, and return it. Avaliable POST parameters:
nome
(obrigatory),clima
andterreno
. - /planets/update: Updates a existing Planet and return it. Avaliable POST parameters:
nome
(obrigatory),clima
andterreno
. - /planets/delete: Deletes a specific Planet based on POST parameters. Avaliable POST parameters:
nome
(obrigatory).
List of documentations used to create this application: