From 74a63ecaa9b54e069e17768f5b6e5b045f0baa8a Mon Sep 17 00:00:00 2001 From: nickcen Date: Tue, 14 Feb 2017 11:24:41 +0800 Subject: [PATCH] list specified department (#26) --- lib/qy_wechat_api/api/department.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/qy_wechat_api/api/department.rb b/lib/qy_wechat_api/api/department.rb index 987ad3f..9c10747 100644 --- a/lib/qy_wechat_api/api/department.rb +++ b/lib/qy_wechat_api/api/department.rb @@ -32,8 +32,12 @@ module QyWechatApi http_get("delete", id: id) end - def list - http_get("list") + def list(id = nil) + if id + http_get("list", id: id) + else + http_get("list") + end end private -- libgit2 0.21.0