Skip to content
This repository has been archived by the owner on Dec 20, 2017. It is now read-only.
Sharabesh edited this page Aug 13, 2016 · 11 revisions

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.

Example

/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,

Clone this wiki locally