-
Notifications
You must be signed in to change notification settings - Fork 0
API documentation
AuxiliumCDNG edited this page Dec 27, 2021
·
2 revisions
BulletFlask is based on locations and types. Objects will be layed out according to their type. Object will appear in a place according to their location. This allows for great flexibility since every object may contain every other object. This is also practical for adding more features...
parameters:
- type
- location
- name
- content (if type is not category)
returns either:
- "success", 201 (If succeeded)
- "missing permissions", 403
- "Unknown Type", 400
- [error while checking permissions], 500
parameters:
- location
- breadcrumb? (may be used to return data for breadcrumb generation)
- version? (may be used to specify a version of an element)
returns either:
- "location not found", 404 (if location wasn't found in db)
- tuple (may be an error)
- json formatted contents (regular output):
{"current": {...}, "contents": [ {...}, {...}... ] }
parameters:
- location
returns:
- A list of available versions of the element:
[ {...data like current from get...}, {...}, ... ]
parameters:
- id (the id of an element to delete)
returns either:
- Code 406 (if you wanted to delete forum root with the id 0)
- "missing permissions", 403
-
{"message": "success", "redirect": ...the location of the parent element...}, 200
This endpoint is used to move an element to another location. You firstly cut it with this endpoint and then paste it with the next endpoint. parameters:
- id (the id of an element to cut)
returns either:
- Code 406 (if you wanted to delete forum root with the id 0)
- "missing permissions", 403
-
{"message": "success", "redirect": ...the location of the element...}, 200
Use this endpoint to paste the cut element. parameters:
- target (the location to put the cut element)
returns either:
- "no element cut", 412
- Code 406 (if you wanted to delete forum root with the id 0)
- "missing permissions", 403
-
{"message": "success", "redirect": ...the location of the element...}, 200
parameters:
- id (id of the element to edit)
- name (new name of the element; may be the same)
- content (new content of the element; may be the same; only if type is not category)
returns either:
- "missing permissions", 403
-
{"message": "success", "redirect": ...the location of the element...}, 200