From c32545d4cc6629a5f6f2e8dd43e43816061e9ee1 Mon Sep 17 00:00:00 2001 From: Jeff Lai Date: Mon, 13 Jun 2016 16:57:37 +0800 Subject: [PATCH] Add more department apis --- lib/dingtalk/api/department.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+), 0 deletions(-) diff --git a/lib/dingtalk/api/department.rb b/lib/dingtalk/api/department.rb index 460922d..803479d 100644 --- a/lib/dingtalk/api/department.rb +++ b/lib/dingtalk/api/department.rb @@ -5,6 +5,18 @@ module Dingtalk http_get("list?access_token=#{access_token}") end + def create(params) + http_post("create?access_token=#{access_token}", params) + end + + def update(params) + http_post("update?access_token=#{access_token}", params) + end + + def delete(id) + http_get("delete?access_token=#{access_token}&id=#{id}") + end + private def base_url 'department' -- libgit2 0.21.0