Giter VIP home page Giter VIP logo

amongus-todo's Introduction

Among Us TODOs API

Among Us banner

Fake REST API server of tasks from Among Us

Getting Started

This application is backed by the default data from a json file (default to be db.json, however it can be specified through an environment variable). The underlying server that power the application is json-server

Starting the application

Simply npm start and the server will be started with the default configurations on port 3000 and db file to be db.json

App-level configurations

  • DB: path to the json file that will be used as the database
  • PORT: port that the app will start on

Testing

  • Code linting: npm run lint
  • Full test suite: npm test

API Reference

Data from the json database file will be loaded every time the app starts and db writes will be made to the same file as well. Hence, a note on if the data is not commited into source, we might see differences between environments.

Listed below are basic usages of the API, more advanced usages can be found here.

POST /todos

Create a new tasks

POST /todos

{
    text: string,
    type: "short" | "long" | "common"
}

GET /todos/:id

Get task by ID

GET /todos/:id

GET /todos

Get tasks

GET /todos

Possible query parameters:

  • q: full text search
  • _page and _limit: paginate
  • any fields from the TODO object: filter using specific fields
  • _start and _end: slice based on TODO ID

PUT /todos/:id

Replace whole TODO item content

PUT /todos/:id

{
    text: string,
    type: "common" | "long" | "short"
}

PATCH /todos/:id

Partial update TODO item

PATCH /todos/:id

{
    text?: string,
    type?: "common" | "long" | "short"
}

DELETE /todos/:id

Delete a TODO item

DELETE /todos/:id

Contributing

For any requests, bug or comments, please open an issue or submit a pull request.

amongus-todo's People

Contributors

yudapencil avatar stanleynguyen avatar lauyuda 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.