-
Notifications
You must be signed in to change notification settings - Fork 2
API List
Lee Seunghwa edited this page Jun 26, 2020
·
3 revisions
- Authentication
- Get Base Information
- Analysis
This is a login API that uses ID and password rather than UUID-based login.
Name: Login.php
Parameters:
Parameter | Type | Description |
---|---|---|
id |
string | Account ID to access(login) |
password |
string | password |
Example:
POST /#.php?id=banksemi&password=p123
Returns:
JSON 'success' code | Scenario |
---|---|
0 | ID or password is different |
1 | log-in succeed |
Log out the currently connected session.
Name: Logout.php
Example:
GET /Logout.php
Returns:
JSON 'success' code | Scenario |
---|---|
1 | log-out succeed |
This API returns the server's domain, name, and short description.
Name: GetServerInfo.php
Example:
GET /GetServerInfo.php
Returns:
Property | Type | Description |
---|---|---|
server_info/site_name |
string | Site name |
server_info/footer_message |
string | Description to enter at the bottom of the site |
server_info/api_uri |
string | Base address(url) for API requests |
This API returns the ID and nickname for the logged in session.
Name: GetUserInfo.php
Example:
GET /GetUserInfo.php
Returns:
Property | Type | Description |
---|---|---|
id |
string | Connected ID or UUID of the smartphone |
name |
string | Nickname or UUID of the smartphone |
This API receives data from the user. And it checks whether it is drinking and returns the result.
This process will follow the steps below.
- The client delivers the collected records through the HTTP stream in csv format.
- After receiving the information, the server is stored in
/upload/Y-m-d H-i-s.csv
. - This API server uses the server information hard coded in the php code to connect to the Python server as a socket.
- The API server delivers a unique address to access the csv file uploaded to the Python server.
- Python server downloads csv file and analyzes data through HTTP based on the address
- The Python server returns the result to the PHP server via socket communication.
- The PHP server returns the information to the client and stores it in the database.
Name: Test.php
Example:
POST /Test.php
Parameters:
Parameter | Type | Description |
---|---|---|
application_name |
string | Profile ID to save after analyzing the data |
type |
string | Data type (only health can be used) |
Returns:
Property | Type | Description |
---|---|---|
result |
string | Return current status (general, drinking, exercise) |