Giter VIP home page Giter VIP logo

knowledgium's Introduction

Knowledgium API Documentation

Vokal hack day stuff.

Coders (users)

Create A New Coder

POST: /api/coder/register/

Body:

{
    "email": "[email protected]",
    "password": "henshin",
    "first_name": "KR",
    "last_name": "Hibiki"
}

Notes:

  • first_name and last_name are not required.

Response:

{
    "id": 1,
    "token": "sahfdlhsafh02373274027402742128hsdfg8s83"
}

Status Codes:

  • 201 if successfully created
  • 400 if incorrect data is provided (badly formatted email or empty string for password)
  • 409 if a Coder with this email already exists.

Login Coder

POST: /api/coder/login/

Body:

{
    "email": "[email protected]",
    "password": "henshin"
}

Response:

{
    "id": 1,
    "token": "sahfdlhsafh02373274027402742128hsdfg8s83"
}

Status Codes:

  • 200 if successfully logged in
  • 400 if bad data were provided
  • 401 if credentials are invalid

Current Coder

GET: /api/coder/

Body:

{
    "id": 1,
    "email": "[email protected]",
    "first_name": "KR",
    "last_name": "Hibiki",
    "created": "YYYY-MM-DD"
}

Notes:

  • the HTTP_AUTHORIZATION header will have to be set to the user's token in the request
  • ex: Token sahfdlhsafh02373274027402742128hsdfg8s83 in the header

Status Codes:

  • 200 if successful
  • 401 if unauthorized

Content

Create a Category

POST: /api/category/all/

Body:

{
    "title": "Japanese Live Action"
}

Notes:

  • Set HTTP_AUTHORIZATION header here
  • Only users with is_staff set to True (admins) can create categories

Status Codes:

  • 201 if created
  • 403 if non-admin tries to create

List all Categories

GET: /api/category/all/

Response:

[
    {
        "id": 1,
        "title": "Japanese Live Action"
    },
    {
        "id": 2,
        "title": "Anime"
    },
]

Status Codes: -200 success

Create Content

POST: /api/content/

knowledgium's People

Contributors

tuss4 avatar

Watchers

James Cloos avatar Alex Nimmer avatar

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.