Giter Site home page Giter Site logo

groot-gigs-service's Introduction

groot-gig-service

Build Status

Supporting the Groot economy

Join the chat at https://acm-uiuc.slack.com/messages/C6XGZD212/

Install / Setup

  1. Clone repo:

    git clone https://github.com/acm-uiuc/groot-gig-service
    cd groot-gig-service
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Copy settings template:

    cd groot_gig_service
    cp settings.template.py settings.py
    
  4. Add your DB credentials to settings.py.

Run Application

python app.py

Routes

Gig Routes

GET /gigs

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"
}

GET /gigs/:gig_id

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"
}

POST /gigs

Endpoint for creating a Gig

Body Params:

  • issuer - NetID of the user being creating the Gig
    • Required
  • description - Description of the gig
  • credits - 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

PUT /gigs/:gig_id

Endpoint for activating/deactivating a gig

Body Params:

  • active - New state of the Gig
    • Required
    • Type: Bool

DELETE /gigs/:gig_id

Deletes the specified Gig.

Claim Routes

GET /gigs/claims

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
}

POST /gigs/claims

Endpoint for creating a claim

Body Params:

  • claimant - NetID of user making claim
    • Required
  • gig_id - ID of gig being claimed
    • Required
    • Type: int

PUT /gigs/claims/:claim_id

Endpoint for fulfilling a claim

DELETE /gigs/claims/:claim_id

Endpoint for deleting a claim. Creates transactions to transfer credits to claimant as necessary.

Contributing

Contributions to groot-gig-service are welcomed!

  1. Fork the repo.
  2. Create a new feature branch.
  3. Add your feature / make your changes.
  4. Install pep8 and run pep8 *.py in the root project directory to lint your changes. Fix any linting errors.
  5. Create a PR.
  6. ???
  7. Profit.

groot-gigs-service's People

Contributors

bcongdon avatar narendasan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

groot-gigs-service's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.