This project serves as an API for my bingo game.
http://bingo-api-env.eba-zpgsctry.us-west-1.elasticbeanstalk.com/
returns list of all games
returns the game with the specified key param
gets a specific property of a specific game
creates a new game
admits the player into the game
starts game
sends a chat message
buys a ticket
calls bingo, returns result of the call or blank if call was incorrect
marks a number off on a ticket if enable-auto-mark is false
const API_URL = "http://bingo-api-env.eba-zpgsctry.us-west-1.elasticbeanstalk.com/";
const socket = require("socket.io-client" /* npm install socket.io-client */)(API_URL);
const gameRoom = // whatever the game room is
// when game is updated
socket.on(`game${gameRoom}-updated`, (game /* This is the updated game object */) => {
/* do something */
});
socket.on(`full-house-${gameRoom}`, (player /* player who scored full house */) => {
});
socket.on(`five-in-row-${gameRoom}`, (player) => {
});
socket.on(`false-bingo-${gameRoom}`, (player) => {
})