Blame view

addons/antis/library/wework/Api/Batch.php 1.3 KB
2db47680   hexiaodong   chore: 初始提交 php 遗...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
  <?php

  

  namespace WeWork\Api;

  

  use WeWork\Traits\HttpClientTrait;

  

  class Batch

  {

      use HttpClientTrait;

  

      /**

       * 邀请成员

       *

       * @param array $json

       * @return array

       */

      public function invite(array $json): array

      {

          return $this->httpClient->postJson('batch/invite', $json);

      }

  

      /**

       * 增量更新成员

       *

       * @param array $json

       * @return array

       */

      public function syncUser(array $json): array

      {

          return $this->httpClient->postJson('batch/syncuser', $json);

      }

  

      /**

       * 全量覆盖成员

       *

       * @param array $json

       * @return array

       */

      public function replaceUser(array $json): array

      {

          return $this->httpClient->postJson('batch/replaceuser', $json);

      }

  

      /**

       * 全量覆盖部门

       *

       * @param array $json

       * @return array

       */

      public function replaceParty(array $json): array

      {

          return $this->httpClient->postJson('batch/replaceparty', $json);

      }

  

      /**

       * 获取异步任务结果

       *

       * @param string $jobId

       * @return array

       */

      public function getResult(string $jobId): array

      {

          return $this->httpClient->get('batch/getresult', ['jobid' => $jobId]);

      }

  }