Created
May 24, 2020 17:59
-
-
Save socksy/fcb456072e0829a5655cf2a5cef01fbf to your computer and use it in GitHub Desktop.
whatdo api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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