This repository has been archived by the owner on May 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 116
人员管理
张铭阳 edited this page Sep 30, 2017
·
4 revisions
use EasyDingTalk\Application;
$app = new Application(...);
$user = $app->user;
API:
array get(string $userId)
Example:
$user->get('manager1234');
API:
array create(array $params)
Example:
$user->create([
'name' => '张三',
'department' => [1, 2],
// ...
]);
API:
array update(array $params)
Example:
$user->update([
'userid' => 'zhangsan',
'name' => '张三',
// ...
]);
API:
array delete(string $userId)
Example:
$user->delete('zhangsan');
API:
array delete(array $userIds)
Example:
$user->delete(['zhangsan', 'lisi']);
API:
array simpleList(int $departmentId, array $params = [])
Example:
$user->simpleList(12562);
// 或传入其他非必填参数
$user->simpleList(12562, [
'size' => 50,
'offset' => 20,
]);
API:
array list(int $departmentId, int $size, int $offset, array $params = [])
Example:
$user->list(12562, 20, 10);
// 或传入其他非必填参数
$user->list(12562, 20, 10, [
'order' => 'entry_desc',
]);
API:
array admin()
Example:
$user->admin();
API:
array toUserId($unionId)
Example:
$user->toUserId('xxxxxx');
API:
array count(array $params)
Example:
// 获取未激活人员数量
$user->count([
'onlyActive' => 0,
]);
// 获取已经激活人员数量
$user->count([
'onlyActive' => 1,
]);
COPYRIGHT © MINGYOUNG