Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #18 from localleon/openapi
Browse files Browse the repository at this point in the history
Adding Detailed OpenAPI Specification
  • Loading branch information
localleon authored Oct 5, 2019
2 parents b17e08d + a720a42 commit b97781c
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 229 deletions.
83 changes: 7 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,87 +55,18 @@ Default Universe is 1, but can be changed via Flag --universe.
- Set Channel 2 to 255 to open the Shutter.

## API
The Projects exposes a simple HTTP API under localhost:80/api/. Just send an HTTP Get to one of the following EndPoints.Caution, there's not authorization on the API. This Project is only intended to run in protected networks
The Projects exposes a simple HTTP API under localhost:80/api/. Just send an HTTP Get to one of the following EndPoints.Caution, there's **no authorization** on the API. This Project is only intended to run in protected networks.

This API is documented with the [OpenAPI v3.0.0 Specification](https://github.com/OAI/OpenAPI-Specification). The Specification file (YAML) can be found under `go/api/openapi.yaml`. To view the file use something like Postman or [Swagger Editor](https://editor.swagger.io/)

```
Generic Call:
` curl localhost:80/api/ENDPOINT/FUNCTION`
curl localhost:80/api/ENDPOINT/FUNCTION
Example Call:
` curl localhost:80/api/shutteropen/fast `


```
# Shutter Functions
shutterclose /
fast
slow
shutteropen /
fast
slow
# Backlight of LCD
lcdbacklight /
off
on
# Freezing
freezeoff
freezeon
# Focus of the Lens
lensfocus /
near
far
# Shift the Lens in multiple Directions
lensshift /
up
down
left
right
# Zoom of the Lens
lenszoom /
in
out
# Exit Menu on LCD
menuexit /
one
all
# Select Video Source
source /
1
2
3
4
# Multiple Sample Patterns are displayed
pattern /
convergence-g
convergence-rg
convergence-gb
hatch
chars
checkerboard
colorbars
multiburst
outline
# Every Button from the IR Remote
infrared /
7
0
1
2
arrowleft
4
8
arrowdown
6
standby
*
3
5
enter
exit
9
arrowup
arrowright
curl localhost:80/api/shutteropen/fast
```

## Dependencies

Infos about the Dependencies can be found in [go.mod](https://github.com/localleon/barco-slm-network/blob/master/go/go.mod) and [go.sum](https://github.com/localleon/barco-slm-network/blob/master/go/go.sum).
Expand Down
137 changes: 0 additions & 137 deletions go/api/openapi.json

This file was deleted.

Loading

0 comments on commit b97781c

Please sign in to comment.