GitXplorerGitXplorer
R

B2W-SWAPI

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
c4b25a5d6a226a381e195c26e411d8820cf7eb2b

Visual README.md's enhancements

RRonkiro committed 5 years ago
Unverified
7db07bff45a542de54ee307ee9ec6ecdbf376312

Fix img

RRonkiro committed 5 years ago
Unverified
b4452dac51696272dfcd908f9f4444dadaa08a42

aligning image center

RRonkiro committed 5 years ago
Unverified
e3f48b4772eee22af8f4ccb7618f6ffc71223c24

Add img in README

RRonkiro committed 5 years ago
Unverified
e38f18f52462827bf666d18ecd14826f95efb2c3

Add yoda-fork

RRonkiro committed 5 years ago
Unverified
52eb2e2782b558838a9ddb8e4f5d4facc2e85620

Fix README

RRonkiro committed 5 years ago

README

The README file for this repository.

SWAPI

This repo was made as a solution to B2W's challenge Star Wars API.

Requirements

  • Python 3 (Recommended: 3.6.6)
  • MongoDB Host

Used technologies:

  • mongoengine
  • flask-restful
  • requests (For SWAPI)

Installation

(The use of a virtual environment is totally encouraged) First of all, use app.cfg or .env files to configure your settings. Then, run the following commands:

pip install -r requirements.txt     # Download dependencies
python main.py                      # Run server

A minimal Dockerfile is also available to standard this process.

Usage

/api/planets

GET: Returns list of planets in API's database.

POST: Creates a new planet.

/api/planets/:id

GET: Returns the planet referenced by id

DELETE: Deletes the planet referenced by id

/api/planets/:name

GET: Returns the planet referenced by name

DELETE: Deletes the planet referenced by name

Running tests

Execute:

pytest

This will start a detailed test, running all tests from tests/ directory

End

Thanks for the B2W team for giving me the opportunity to try this challenge.

May the force be with us.