Work in progress. Raspberry Pi Scoreboard US BYD and IOT solution.
This API is currently developed for a standard baseball scoreboard, but will be expanded to support other standard sport configurations. Since the API is based on REST principles, it conforms to some standard resource-oriented practices for naming conventions and data manipulation. You can use your browser to access URLs, and you can use any HTTP client in any programming language to interact with the API. Basic, but Not supported yet.
If you are new to REST, here’s a few resources to get you started:
Understanding Resources
A Million APIs
RESTful Design
HTTP Method: GET
Recieve: JSON
Request:
http://XXX.XXX.XXX.XXX:3001/status/score
Reply:
HTTP/1.1 200 OK
Date: Wed, 29 Aug 2018 16:20:12 GMT
Etag: W/"5b-pbuDJZbxdBbkWtGY/kuskWGKeEM"
Content-Type: application/json; charset=utf-8
Connection: keep-alive
X-Powered-By: Express
Content-Length: 91
{
"message": "Success",
"homeScore": 0,
"awayScore": 0,
"inning": 0,
"balls": 0,
"strikes": 0,
"outs": 0
}
URL:
/setDigit/resetScore
/setDigit/home/add
/setDigit/home/subtract
/setDigit/away/add
/setDigit/away/subtract
/setDigit/inning/add
/setDigit/inning/subtract
/setDigit/balls/add
/setDigit/balls/subtract
/setDigit/strikes/add
/setDigit/strikes/subtract
/setDigit/outs/add
/setDigit/outs/subtract
/setDigit/home/"Set numerical value"
/setDigit/away/"Set numerical value"
/setDigit/inning/"Set numerical value"
URL:
/status/score"
/status/serialport
/status/serialport/open
/status/serialport/close