Skip to content

Instantly share code, notes, and snippets.

@socksy
Created May 24, 2020 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save socksy/fcb456072e0829a5655cf2a5cef01fbf to your computer and use it in GitHub Desktop.
Save socksy/fcb456072e0829a5655cf2a5cef01fbf to your computer and use it in GitHub Desktop.
whatdo api
- Have items
- Item is some text with some metadata
- Some metadata is strongly defined (status, category)
- The rest is weakly defined, but has useful datatypes (namely, enum, dates)
- Each item has an id
- the first half of the id is the location where it is (making it a uri), the second can be anything as long as it's a unique reference on that service to that item
- Items have locations, which can differ per service
- they can mean something semantically, or they could be totally arbitrary
- a full list of locations and their restrictions (or lack of them) should be available per service
- a restriction on a location can include:
- how many items are allowed in this location
- how long an item can be in this location
- what properties are required for an item in this location
- TODO how to deal with nested locations (disallow them?)
- There are clients and servers
- clients are expected to keep track of items and sync with services individually
- all calls are authenticated with oauth2 (including informational ones)
- response is in JSON
- calls:
GET /locations
returns a list of locations, each with an optional list of restrictions
GET /location/id
returns an ordered list of items
PUT /item/id
GET /item/id
DELETE /item/id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment