Supporting the Groot economy
-
Clone repo:
git clone https://github.com/acm-uiuc/groot-gig-service cd groot-gig-service
-
Install dependencies:
pip install -r requirements.txt
-
Copy settings template:
cd groot_gig_service cp settings.template.py settings.py
-
Add your DB credentials to settings.py.
python app.py
Returns list of gigs.
Each gig "looks like":
{
"active": true,
"created_at": "2017-03-06T14:15:10",
"credits": 1.23,
"description": "Clean up the office",
"id": 12345,
"issuer": "bcongdo2"
}
Returns information about a specific gig.
Each gig "looks like":
{
"active": true,
"created_at": "2017-03-06T14:15:10",
"credits": 1.23,
"description": "Clean up the office",
"id": 12345,
"issuer": "bcongdo2"
}
Endpoint for creating a Gig
Body Params:
issuer
- NetID of the user being creating the Gig- Required
description
- Description of the gigcredits
- Amount of credits being offered for the gig- Required
- Type: Float
admin_task
- If True, then credits are created when Claim is fulfilled. If False, then credits are deducted from the issuer when Claim is fulfilled- Default: False
Endpoint for activating/deactivating a gig
Body Params:
active
- New state of the Gig- Required
- Type: Bool
Deletes the specified Gig.
Returns list of claims.
URL Params:
gig_id
- Filter by associated gig id- Optional
- Type: Int
Each claim "looks like":
{
"claimant": "bcongdo2",
"created_at": "2017-03-06T15:26:45",
"fulfilled": false,
"gig_id": 5,
"id": 2
}
Endpoint for creating a claim
Body Params:
claimant
- NetID of user making claim- Required
gig_id
- ID of gig being claimed- Required
- Type: int
Endpoint for fulfilling a claim
Endpoint for deleting a claim. Creates transactions to transfer credits to claimant as necessary.
Contributions to groot-gig-service
are welcomed!
- Fork the repo.
- Create a new feature branch.
- Add your feature / make your changes.
- Install pep8 and run
pep8 *.py
in the root project directory to lint your changes. Fix any linting errors. - Create a PR.
- ???
- Profit.