-
Notifications
You must be signed in to change notification settings - Fork 0
API Documentation
Gets all BitByteTree
s sorted in ascending alphabetical order and all BitByteNode
s belonging to each of those trees
Request: No params
Response Body:
{
"trees": BitByteTree[],
"error": nullable
}
Gets a specific BitByteTree
and all its BitByteNode
s by the BitByteTree
's id
Request:
-
id
: id ofBitByteTree
Response Body:
{
"tree": BitByteTree,
"error": nullable
}
Increments a specific BitByteTree
's points
field by the number of points provided. Response does not return BitByteNode
s of tree.
Request:
{
"id": Integer,
"points": Integer
}
Response Body:
{
"tree": BitByteTreeSimple,
"error": nullable
}
Updates a BitByteTree
's profile picture given a file in the request body.
Request:
-
multipart/form-data
request body "image": File
"id": Integer
Response Body:
{
"tree": BitByteTreeSimple,
"error": nullable
}
Updates a BitByteTree
's fields given the desired fields in the request body. All fields in request are optional.
Request:
{
"name": String,
"points": Integer,
"year": Integer,
"description": String
}
Response:
{
"tree": BitByteTreeSimple
}
Gets all BitByteNode
s in no particular order
Request: None
Response:
{
"nodes": BitByteNode[],
"error": nullable
}
Gets a BitByteNode
by its id
Request:
-
id
- id ofBitByteNode
Response:
{
"node": BitByteNode,
"error": nullable
}
Gets all children of a particular BitByteNode
, including itself.
Request:
-
id
- id of rootBitByteNode
Response:
{
"nodes": BitByteNode[],
"error": nullable
}
Creates a BitByteNode
, as well as a BitByteTree
if the BitByteNode
's tree_name
does not currently exist as a BitByteTree
.
Request:
{
"name": String,
"username": String,
"major": String,
"college": String,
"class_year": Integer,
"tree_name": String,
"quarter_joined": String,
"linkedin": String,
"facebook": String,
"instagram": String,
"profile_url": String,
"opt_in": Boolean
}
Response:
{
"node": BitByteNode,
"error": nullable
}