https://github.com/chunkhang/fyp-api
Mock API server for final year project
https://github.com/chunkhang/fyp-api
Last synced: 11 months ago
JSON representation
Mock API server for final year project
- Host: GitHub
- URL: https://github.com/chunkhang/fyp-api
- Owner: chunkhang
- Created: 2018-05-22T07:11:33.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-22T10:02:59.000Z (about 8 years ago)
- Last Synced: 2024-10-19T11:31:34.542Z (almost 2 years ago)
- Language: Python
- Size: 25.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FYP API
> Mock API server for final year project
## Dependencies
- [Python](https://www.python.org/)
- [pip](https://pypi.org/project/pip/)
## Running
```
$ pip install -r requirements.txt
$ flask run
$ open http://localhost:5000/
```
## Generating Data
```
$ python mocker.py
```
## Endpoint
Return list of active classes under a specific lecturer
### URL
`/classes`
### Method
`GET`
### Params
- `email`: String
### Example
#### Request
GET `http://localhost:5000/classes?email=teckminc@sunway.edu.my`
#### Response
```json
{
"email": "teckminc@sunway.edu.my",
"semester": "2018-03-26",
"subjects": [
{
"code": "NET3204",
"classes": [
{
"category": "Lecture",
"group": 1,
"students": [
"15011909",
"10023222",
"14099916"
]
},
{
"category": "Practical",
"group": 1,
"students": [
"15011909",
"10023222"
]
},
{
"category": "Practical",
"group": 2,
"students": [
"14099916"
]
}
]
}
]
}
```
### Data Types
- `email`: String
- `semester`: String
- `subjects`: Array of Object
- `code`: String
- `classes`: Array of Object
- `category`: String
- `group`: Integer
- `students`: Array of String