Commit d4199e029e004be4af099f3e44986c5b83a23da7
Committed by
GitHub
Exists in
master
Merge pull request #2 from mycolorway/optimize-dingtalk-user-create
CHG: more options support to user#create
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
lib/dingtalk/api/user.rb
... | ... | @@ -13,12 +13,12 @@ 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 | - params = { | |
16 | + def create(name, mobile, department=[1], options={}) | |
17 | + params = options.merge( | |
18 | 18 | name: name, |
19 | 19 | mobile: mobile, |
20 | 20 | department: department |
21 | - } | |
21 | + ) | |
22 | 22 | http_post("create?access_token=#{access_token}", params) |
23 | 23 | end |
24 | 24 | ... | ... |