-
Notifications
You must be signed in to change notification settings - Fork 0
API
The below API is currently in progress.
We're copying database queries from the original brainspell project to figure out the kinds of information we want to extract.
/api/endpoint
parameters: {this: 'that', foo: 0.0}
returns: {'the-other': 2}
(See some_function in some_file.php:LINE_NO)
###Brainspell.php
Function User-Register //Checks if user is registered otherwise adds inputs to database
Global: {$dbname, $connection} // Global variables not passed as inputs Parameters: {'username','password','email'} Returns: {"Exists" if credentials in system, otherwise function updates DB}
(See User_Register in Brainspell.php: 69-99)
Function User_login() Global: {$dbname, $connection} Parameters: {'username','password','row': mysqli_fetch_array($checklogin)} Returns: {"Yes" if logged in, else "No"}
(See User_login in Brainspell.php: 101-120
Function home() Global: {$dbname, $rootdir, $connection} Parameters: {$result: Count(*) from DB, $count: associative array of $result,