Blame view

addons/antis/library/wework/examples/batch.php 578 Bytes
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
  <?php

  

  $app = require __DIR__ . '/app.php';

  

  /** @var \WeWork\Api\Batch $batch */

  $batch = $app->get('batch');

  

  try {

      $batch->invite([

          'user' => ['UserID1', 'UserID2', 'UserID3']

      ]);

  } catch (Exception $e) {

  }

  

  try {

      $batch->syncUser(['media_id' => 'xxxxxx']);

  } catch (Exception $e) {

  }

  

  try {

      $batch->replaceUser(['media_id' => 'xxxxxx']);

  } catch (Exception $e) {

  }

  

  try {

      $batch->replaceParty(['media_id' => 'xxxxxx']);

  } catch (Exception $e) {

  }

  

  try {

      $batch->getResult('JOBID');

  } catch (Exception $e) {

  }