hippich / Bitcoin-Poker-Room

Sources for Bitcoin Poker Room.
http://betco.in
Other
132 stars 90 forks source link

Issue #65: Add "Broadcast Message" feature to API #99

Closed gg closed 13 years ago

gg commented 13 years ago

Overview

To broadcast a message, the server sends a PacketPokerMessage packet to the client. The client then displays the message in a jpoker.dialog() window.

API resources that were added

Broadcast a message to all players

POST /broadcast

Parameters:

{"message": "Hello, players"}

Example request with apiclient:

python apiclient.py -k '<API_KEY>' -s '<SECRET>' -b '{"message": "Hello, players"}' https://localhost:8880/broadcast

Broadcast a message to a specific player

POST /broadcast/player/:serial

Parameters

{"message": "Hello, player"}

Example request with apiclient:

python apiclient.py -k '<API_KEY>' -s '<SECRET>' -b '{"message": "Hello, player"}' https://localhost:8880/broadcast/player/2

Other notable changes: