Commit c32545d4cc6629a5f6f2e8dd43e43816061e9ee1

Authored by Jeff Lai
1 parent a197f8e0
Exists in master

Add more department apis

Showing 1 changed file with 12 additions and 0 deletions   Show diff stats
lib/dingtalk/api/department.rb
... ... @@ -5,6 +5,18 @@ module Dingtalk
5 5 http_get("list?access_token=#{access_token}")
6 6 end
7 7  
  8 + def create(params)
  9 + http_post("create?access_token=#{access_token}", params)
  10 + end
  11 +
  12 + def update(params)
  13 + http_post("update?access_token=#{access_token}", params)
  14 + end
  15 +
  16 + def delete(id)
  17 + http_get("delete?access_token=#{access_token}&id=#{id}")
  18 + end
  19 +
8 20 private
9 21 def base_url
10 22 'department'
... ...