mcdonaldLottery
Easy to get the mcdonald lottery daily api.
Installation
git clone https://github.com/ngseke/mcdonaldLottery.git
cd mcdonaldLottery
cp .envExample .env
npm install
Usage (透過命令列手動執行)
單個帳號
npm run draw -- --user <帳號>,<密碼> # 以逗點分隔帳號和密碼
多組帳號
npm run draw -- \
--user \
<帳號1>,<密碼1> <帳號2>,<密碼2> # 以空格分隔多組帳號
Usage (Server)
Usage (Server)
npm run start
Use curl
Get token
Get the token witch call mcdonald api will need.
curl --request POST \
--url localhost:5000/api/users \
--header 'content-type: application/json' \
--data '{
"account": "<yourAccount>",
"password": "<password>"
}'
Get lottery
Get the lottery vai call mcdonald api and show today's lottery which you get.
curl --request POST \
--url localhost:5000/api/lottery \
--header 'content-type: application/json' \
--data '{
"accessToken": "<mcdonaldToken>"
}'
Get lottery status
Get the lottery list and stickers witch the date is not expired.
curl --request GET \
--url 'http://localhost:5000/api/lottery?accessToken=<mcdonaldToken>'
Auto get lottery
Get the lottery daily , cronFormat default is UTF+8 00:01:00
curl --request POST \
--url http://localhost:5000/api/subscription \
--header 'content-type: application/json' \
--data '{
"accessToken": "<mcdonaldToken>",
"lineNotifiyToken": "<yourLineNotifiyToken>",
"cronFormat": "<cronFormat>"
}'