Colllection specifications
Alex-D opened this issue · comments
Alexandre Demode commented
The need
We should be able to organize our Elements into Colllections.
States:
- private (default): Colllection is only available for the user who created it
- public (read only): an user can share a Colllection with the rest of the world via a public link
Also, we want to be able to share a Colllection with other users in write mode.
Definition
Colllection is a subfolder of "Colllections" folder or "Inbox" folder itself and has 2 properties:
- id (string):
base64({userId}:{colllectionPath})
colllectionPath
is the real path of Colllection.
Example:42:Colllections/My splendid colllection
That string is encoded in base64 to be used in URLs - name (string): it is the colllection folder name
- public (boolean):
false
by default
API URIs
Method | URL | Action |
---|---|---|
POST |
/api/colllections |
Create a new Colllection |
GET |
/api/colllections |
List all Colllections |
GET |
/api/colllections/{colllectionId} |
Get a given Colllection |
PUT |
/api/colllections/{colllectionId} |
Rename Colllection / Change permissions (future) |
DELETE |
/api/colllections/{colllectionId} |
Delete a Colllection and contents |
colllectionId
is the id
as described above.
Front URLs
URL | Action |
---|---|
/{userSlug} |
List all Colllections of a given user |
/{userSlug}/{colllectionId} |
Show an user Colllection |
colllectionId
is the id
as described above.