An open API service indexing awesome lists of open source software.

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

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