Skip to content

practical-python-org/Zorak-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZorAPI

Zorak's API

A simple flask application that communicates with a JSON based database. Designed to run in the localhost of the Zorak server.

Routes

GET - /

Grabs the homepage. Nothing to see here.

GET - /hc

Get's a healthcheck.

returns 'up' if online

{
    "status": "up"
}

GET - /settings/commands/all

returns a dict of all settings and their statuses

[
    { "command1":false
    , "command2":false
    , "command3":false
    , "command4":false
    , "command5":false
    }
, 200
] 

POST - /settings/commands/< command >

Toggles a command on and off. If on, return off. If off, return on

[
    "command1 : true"
, 200
]

POST - /settings/commands/toggle-all/< status >

Params: on/off

Toggles all commands to off or on.

[
    "Off",
    200
]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published