Commit 7d070d4dc69c86c53abec919992a49565e506bbc

Authored by Jeff Lai
1 parent 09051010
Exists in master

Add user create api

Showing 1 changed file with 9 additions and 0 deletions   Show diff stats
lib/dingtalk/api/user.rb
... ... @@ -13,6 +13,15 @@ module Dingtalk
13 13 http_get("get_by_mobile?access_token=#{access_token}&mobile=#{mobile}")
14 14 end
15 15  
  16 + def create(name, mobile, department = [1])
  17 + parmas = {
  18 + name: name,
  19 + mobile: mobile,
  20 + department: department
  21 + }
  22 + http_post("create?access_token=#{access_token}", params)
  23 + end
  24 +
16 25 private
17 26 def base_url
18 27 'user'
... ...