Client.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * +----------------------------------------------------------------------
  4. * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  5. * +----------------------------------------------------------------------
  6. * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  7. * +----------------------------------------------------------------------
  8. * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  9. * +----------------------------------------------------------------------
  10. * | Author: CRMEB Team <admin@crmeb.com>
  11. * +----------------------------------------------------------------------
  12. */
  13. namespace crmeb\services\wechat\department;
  14. use EasyWeChat\Work\Department\Client as WorkClient;
  15. class Client extends WorkClient
  16. {
  17. /**
  18. * @author 等风来
  19. * @email 136327134@qq.com
  20. * @date 2022/10/9
  21. * @param int $limit
  22. * @param string $cursor
  23. * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
  24. * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
  25. * @throws \GuzzleHttp\Exception\GuzzleException
  26. */
  27. public function getUserListIds(int $limit = 0, string $cursor = '')
  28. {
  29. $data = [];
  30. if ($limit) {
  31. $data['limit'] = $limit;
  32. }
  33. if ($cursor) {
  34. $data['cursor'] = $cursor;
  35. }
  36. return $this->httpPostJson('cgi-bin/user/list_id', $data);
  37. }
  38. }