From a55ce9e3cf7c00719f259edc2c1c53b42d093027 Mon Sep 17 00:00:00 2001 From: Creeperman007 Date: Sat, 30 Nov 2019 18:31:18 +0100 Subject: [PATCH] Update README.md --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 855d1fd..bb47d62 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,33 @@ # SEContestCommands Chat commands for StreamElements' Contests + +## Credentials +* Create file called `SEContestChatCommands.credentials.php` +* The file will contain three variables + * `$key` - random string, that is used in URL + * `$channel` SE Account ID that you can find [here](https://streamelements.com/dashboard/account/channels) + * `$bearer` SE JWT Token that you can find [here](https://streamelements.com/dashboard/account/channels) (After clicking "Show secrets") + + +## Request +This will explain all possible variables +* `key` - user generated string from +* `action` - action, that the API should do (start, close, draw bets) +* `name` - name of bets (used with action _"start"_) +* `duration` - duration of bets in minutes (used with action _"start"_) +* `options` - options to bet, separated by space (underscore used as space) (used with action _"start"_) +* `winner` winning option (used with action _"draw"_) + +## Chat commands +Examples are using base command `!bets` +``` +!bets start <1st_option> ... <10th_option> +!bets close +!bets draw +``` + +### Request on API +This will show example body of StreamElements command +``` +${customapi.example.com/SEContestChatCommands.php?key=my_key&action=${pathescape ${1}}&name=${pathescape ${2|${1}}}&duration=${pathescape ${3|${1}}}&options=${pathescape ${4:|${1}}}&winner=${pathescape ${2:|' '}}} +```