Skip to content

evernaschi/spacex_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Space-x API

API for creating tasks in Trello.
A task may be:

  1. An issue: This represents a business feature that needs implementation, they will provide a short title and a description. All issues gets added to the “To Do” list as unassigned
  2. A bug: This represents a problem that needs fixing. They will only provide a description, the title needs to be randomized with the following pattern: bug-{word}-{number}. It doesn't matter that they repeat internally. The bugs should be assigned to a random member of the board and have the “Bug” label.
  3. A task: This represents some manual work that needs to be done. It will count with just a title and a category (Maintenance, Research, or Test) each corresponding to a label in trello

Setup

  1. Install Python, pip and virtualenv if you do not already have them.

  2. Clone this repository:

    git clone https://github.com/evernaschi/spacex_api.git
    
  3. In the app directory, create a file whose name is .env, and put inside it:

    SECRET_KEY = '....your secret key ....'
    TRELLO_KEY = '0109e2ca4440a60b57cbf0a51c10d600'
    TRELLO_TOKEN = '5dd9d5beb8299ca4c6a75e3bb06c66defbd606d106d84223f80e97fe896c889c'
    

    You can use a website like this https://djecrety.ir/ for generating your SECRET_KEY. You can use my Trello key and token for this time.

How to run

  1. Create a virtualenv.

    python3 -m venv env
    source env/bin/activate
    
  2. Install the dependencies needed to run the app.

    pip install -r requirements.txt
    
  3. Now sync your database:

    python manage.py migrate
    
  4. Run the server:

    python manage.py runserver
    
  5. After creating a Task, you can see the results in My Board

Examples:

python manage.py runserver 3000
curl -H "Content-Type: application/json" -d '{"type":"issue", "title":"Send Message", "description":"Let pilots"}' http://localhost:3000 
http POST http://127.0.0.1:8000/ type="issue" title="Send Message" description="Let pilots"  

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages