Skip to content
Szymon edited this page Aug 3, 2020 · 6 revisions

Golang server api:

  • viewHandler: /radio main page
  • playHandler: /radio/play set state "play" on engine, redirect to main page
  • stopHandler: /radio/stop set state "stop" on engine, redirect to main page
  • setHandler: /radio/set set station as checked, redirect to main page
  • submitHandler: /radio/submit play checked station, redirect to main page
  • deleteHandler: /radio/delete delete checked station, redirect to main page
  • addHandler: /radio/add add new station, redirect to main page

Server to engine command:

  • station get all -> reply: stations [name] divided with space
  • station get current -> reply: [name] [title] [uri]
  • station remove [name]
  • station set [name] -> marked as checked
  • station new [name] [uri]
  • engine state set [state] -> play, stop
Clone this wiki locally