Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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