Client.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /*
  3. * This file is part of the overtrue/wechat.
  4. *
  5. * (c) overtrue <i@overtrue.me>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace EasyWeChat\MiniProgram\RealtimeLog;
  11. use EasyWeChat\Kernel\BaseClient;
  12. /**
  13. * Class Client.
  14. *
  15. * @author her-cat <i@her-cat.com>
  16. */
  17. class Client extends BaseClient
  18. {
  19. /**
  20. * Real time log query.
  21. *
  22. * @param string $date
  23. * @param int $beginTime
  24. * @param int $endTime
  25. * @param array $options
  26. *
  27. * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
  28. *
  29. * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
  30. * @throws \GuzzleHttp\Exception\GuzzleException
  31. */
  32. public function search(string $date, int $beginTime, int $endTime, array $options = [])
  33. {
  34. $params = [
  35. 'date' => $date,
  36. 'begintime' => $beginTime,
  37. 'endtime' => $endTime,
  38. ];
  39. return $this->httpGet('wxaapi/userlog/userlog_search', $params + $options);
  40. }
  41. }