ShopGetLotteries
Jump to navigation
Jump to search
Method returns all allowed games information.
Inputs:
- token (string) - betshop token.
Outputs (array of games):
- LotteryId (int)
- LotteryName (string)
- LotteryStart (string) - not needed.
- LotteryEnd (string) - not needed.
- LotteryFrequency (int) - not needed.
- LotteryStopVideoTime (dateTime) - not needed.
- LotteryOddsChangedTime (dateTime) - not needed.
- LotteryNextRunTime (dateTime) - nearest game start time, could be used for visualization.
- LotteryNextRunCode (string) - nearest game draw code, could be used for visualization.
- LotteryNextRunSecondsLeft (int) - seconds left till draw start, could be used for timer visualization.
- LotteryScreenUrl (string) - game screen url.
- LotteryIntensiveDelay - delay before next ShopGetLotteries method call after game start.
- LotteryCurrentRound (int) - more than zero only for poker currently. If changed, then ShopLotteryGetOdds method should be called.
Refresh lottery and odds algorithm.
1. Get and save in memory lottery list via soap method client.ShopGetLotteries(settingManager.Token);
2. Show information about the ottery in UI.
3. Get every lottery odds via ShopGetLotteryOdds (settingManager.Token, lottery.ID); and show in UI if needed.
4. Wait until next draw or next round will start.
5. Get lottery JSON from LotteriesCacheUrl (was saved after ShopGetSettings) and show lottery information in UI.
6. Get odds JSON from lottery.LotteryOddsCacheUrl (was saved after ShopGetLotteries) and show in UI if needed.
7. Steps from forth to six repeats all the time.