Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit 4d30b63

Browse files
authored
Update README.md
1 parent 4507db1 commit 4d30b63

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,17 @@ The API depends on environment variables. **Make sure to configure the bold vari
3131
Using the included Dockerfile, it is also possible to run this API inside a container.
3232

3333
## Endpoints
34-
| Method | URL | Description | Example Request | Example Response |
35-
| -- | -- | -- | -- | -- |
36-
| GET | /api/test/session | Returns valid session key (Only necessary for testing) | | `{ "session": "string"` } |
37-
| GET | /api/test/communication | Returns status 200 when API can connect to Google to verify internet connectivity |
38-
| | | |
39-
| GET | /api/plug | Returns all registered plugs | | * |
40-
| GET | /api/smartplug | Returns info about your internet connected smartplug. (Tip: Use this to determine the ID of your smartplug. Use the `id` property.) | | * |
41-
| GET | /api/plug/:plugID | Returns `true` or `false` for is_active state of a plug specified by plugID | | `{ "is_active": false }` |
42-
| POST | /api/plug/:plugID | [DIMMER] Change dimmer state when request body contains `"type": "dimmer"` and `"value": number`. When value is below `MIN_DIMMING_VALUE`, the dimmer will switch off. Returns `is_active state`. | `{ "type": "dimmer", "value": 75 }` | `{ "is_active": true }` |
43-
| | | [SWITCH] Switches plug when request body contains `"type": "switch"` and `"value": "on/off"`. Returns `is_active` state |`{ "type": "switch", "value": "on" }` | `{ "is_active": true }` |
34+
| Method | URL | Description | Example Request | Example Response |
35+
| ------ | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------- |
36+
| GET | /api/test/session | Returns valid session key (Only necessary for testing) | | `{ "session": "string"` } |
37+
| GET | /api/test/communication | Returns status 200 when API can connect to Google to verify internet connectivity | | |
38+
| | | | | |
39+
| GET | /api/plug | Returns all registered plugs | | * |
40+
| GET | /api/smartplug | Returns info about your internet connected smartplug. (Tip: Use this to determine the ID of your smartplug. Use the `id` property.) | | * |
41+
| GET | /api/plug/:plugID | Returns `true` or `false` for is_active state of a plug specified by plugID | | `{ "is_active": false }` |
42+
| POST | /api/plug/:plugID | [DIMMER] Change dimmer state when request body contains `"type": "dimmer"` and `"value": number`. When value is below `MIN_DIMMING_VALUE`, the dimmer will switch off. Returns `is_active state`. | `{ "type": "dimmer", "value": 75 }` | `{ "is_active": true }` |
43+
| | | [SWITCH] Switches plug when request body contains `"type": "switch"` and `"value": "on/off"`. Returns `is_active` state | `{ "type": "switch", "value": "on" }` | `{ "is_active": true }` |
44+
| | | [CURTAIN] Switches a Brel type curtain to either `"type": "brel_ud_curtain"` and `"value": "up/down/stop"`. Returns `is_active` state | `{ "type": "brel_ud_curtain", "value": "down" }` | `{ "is_active": true }` |
4445

4546
`*` Try this yourself. Response contains a bunch of useful info and does not fit needly in this table.
4647
## Contribution

0 commit comments

Comments
 (0)