Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/winsdominoes/bma-video-backend
https://github.com/winsdominoes/bma-video-backend
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/winsdominoes/bma-video-backend
- Owner: WinsDominoes
- Created: 2022-10-08T03:27:21.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-08T04:05:50.000Z (about 2 years ago)
- Last Synced: 2023-08-20T16:36:20.543Z (about 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BMA Video Backend
BMA (Bangkok Metropolitan Administration) Video Backend is the backend project to improve BMA Traffic's website with a more real-time security camera footage and more intuitive user interface.## Usage
### Setup
Requirements:
- NodeJS V16 and aboveSteps:
1. `git clone https://github.com/WinsDominoes/bma-video-backend`
2. `npm install -y`
3. Copy `default.json.default` to `default.json`
4. Get your ASP.NET Token from http://www.bmatraffic.com (Documentation coming soon) and paste it in `aspToken`The default port is 1218
### Requesting Image
To request an image, send a `GET` request to the URL:
`localhost:1218/img?camId=&time=| **Parameters** | **Usage** | **Type** |
|----------------|----------------------------------------------------|----------|
| `camId` | The camera ID - Get it from https://bmatraffic.com | int |
| `time` | Time in UNIX time | int |### Response Breakdown
You will get a response in JSON
Example:
```
{
"error": 0,
"response": 200,
"image": ""
}
```
| **Key** | **Usage** | **Type** |
|------------|-------------------|----------|
| `error` | Error message | string |
| `response` | Response code | int |
| `camId` | The camera ID | int |
| `time` | Time in UNIX time | int |
| `image` | The actual image | base64 |# Credits
Data from https://bmatraffic.com