GameDownServiceInterface.php 842 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Yxy\Service;
  3. interface GameDownServiceInterface
  4. {
  5. /**
  6. * 获取游戏下载token 及密码
  7. * @param int $game_id 游戏ID
  8. * @param int $promote_id 渠道ID 渠道ID为空则返回官方链接
  9. * @return mixed
  10. */
  11. public function createGameDownToken(int $game_id, int $promote_id = 0);
  12. /**
  13. * 获取游戏下载地址
  14. * @param string $game_id 游戏ID
  15. * @param string|int $promote_id 渠道ID
  16. * @param int $time 有效期(秒)
  17. * @return mixed
  18. */
  19. public function downUrl(string $game_id, $promote_id = 0, int $time = 100);
  20. /**
  21. * 获取加密游戏下载地址
  22. * @param string $token 临时token
  23. * @param string $password 对应密码
  24. * @return mixed
  25. */
  26. public function createGameDownUrl(string $token, string $password);
  27. }