Commit bb3cf887 by Francis Zhou

change corp_conversation payload

parent 32c43bc9
...@@ -8,40 +8,44 @@ module Dingtalk ...@@ -8,40 +8,44 @@ module Dingtalk
# 发送工作通知消息 # 发送工作通知消息
# {https://ding-doc.dingtalk.com/doc#/serverapi2/pgoxpy} # {https://ding-doc.dingtalk.com/doc#/serverapi2/pgoxpy}
add_request :send_corp_conversation, :post, Dingtalk::RequestUrl::SEND_CORP_CONVERSATION do |request| add_request :send_corp_conversation, :post, Dingtalk::RequestUrl::SEND_CORP_CONVERSATION do |request|
request.add_arg :agent_id, in: :body, required: true
request.add_arg :userid_list, in: :body request.add_arg :userid_list, in: :body
request.add_arg :dept_id_list, in: :body request.add_arg :dept_id_list, in: :body
request.add_arg :to_all_user, in: :body request.add_arg :to_all_user, in: :body
request.add_arg :msg, in: :body request.add_arg :msg, in: :body
request.add_arg :access_token, in: :query, required: true request.add_arg :access_token, in: :query, required: true
request.add_const :agent_id, ->(r) { r.agent_id }, in: :body
end end
# 查询工作通知消息的发送进度 # 查询工作通知消息的发送进度
# {https://ding-doc.dingtalk.com/doc#/serverapi2/pgoxpy/e2262dad} # {https://ding-doc.dingtalk.com/doc#/serverapi2/pgoxpy/e2262dad}
add_request :get_corp_conversation_progress, :post, Dingtalk::RequestUrl::CORP_CONVERSATION_SEND_PROGRESS do |request| add_request :get_corp_conversation_progress, :post, Dingtalk::RequestUrl::CORP_CONVERSATION_SEND_PROGRESS do |request|
request.add_arg :agent_id, in: :body, required: true
request.add_arg :task_id, in: :body, required: true request.add_arg :task_id, in: :body, required: true
request.add_arg :access_token, in: :query, required: true request.add_arg :access_token, in: :query, required: true
request.add_const :agent_id, ->(r) { r.agent_id }, in: :body
end end
# 查询工作通知消息的发送结果 # 查询工作通知消息的发送结果
# {https://ding-doc.dingtalk.com/doc#/serverapi2/pgoxpy/a5920210} # {https://ding-doc.dingtalk.com/doc#/serverapi2/pgoxpy/a5920210}
add_request :get_corp_conversation_result, :post, Dingtalk::RequestUrl::CORP_CONVERSATION_SEND_RESULT do |request| add_request :get_corp_conversation_result, :post, Dingtalk::RequestUrl::CORP_CONVERSATION_SEND_RESULT do |request|
request.add_arg :agent_id, in: :body, required: true
request.add_arg :task_id, in: :body, required: true request.add_arg :task_id, in: :body, required: true
request.add_arg :access_token, in: :query, required: true request.add_arg :access_token, in: :query, required: true
request.add_const :agent_id, ->(r) { r.agent_id }, in: :body
end end
# 工作通知消息撤回 # 工作通知消息撤回
# {https://ding-doc.dingtalk.com/doc#/serverapi2/pgoxpy/hYyV8} # {https://ding-doc.dingtalk.com/doc#/serverapi2/pgoxpy/hYyV8}
add_request :recall_corp_conversation, :post, Dingtalk::RequestUrl::RECALL_CORP_CONVERSATION do |request| add_request :recall_corp_conversation, :post, Dingtalk::RequestUrl::RECALL_CORP_CONVERSATION do |request|
request.add_arg :agent_id, in: :body, required: true
request.add_arg :msg_task_id, in: :body, required: true request.add_arg :msg_task_id, in: :body, required: true
request.add_arg :access_token, in: :query, required: true request.add_arg :access_token, in: :query, required: true
request.add_const :agent_id, ->(r) { r.agent_id }, in: :body
end end
end end
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment