Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DingTalk 钉钉接口服务

钉钉文档

Installation

Add this line to your application's Gemfile:

gem 'ding_talk', git: "https://gitee.com/bulexu/ding_talk"

And then execute:

$ bundle

Usage

初始化

DingTalk.configure do |config|
  config.redis = Redis.new(host: ENV['REDIS_HOST'], port: ENV['REDIS_PORT'], db: ENV['REDIS_CACHE_DB'])   # redis
  config.http_timeout_options = {write: 15, read: 15, connect: 10}                                        # 请求超时
  config.expired_shift_seconds = 180                                                                      # access token 有效期偏移量 (时间有效期 - 偏移量)
end

内部应用

初始化接口 DingTalk::Api::Agent

$agent_api = DingTalk::Api::Agent.new(
      corp_id: ENV['CORP_ID'],  # 企业ID
      agent_id: ENV['AGENT_ID'],  # 应用ID
      app_key: ENV['APP_KEY'],  # 应用app_key
      app_secret: ENV['APP_SECRET']  # 应用app_secret
    )

已实现接口列表

DingTalk::Api::Methods::User

DingTalk::Api::Methods::Department

DingTalk::Api::Methods::Chat

DingTalk::Api::Methods::Message

DingTalk::Api::Methods::Media

Development

  • Fork DingTalk on Gitee/GitHub
  • Make your changes
  • Ensure all tests pass (rake spec)
  • Send a pull request
  • If we like them we'll merge them
  • If we've accepted a patch, feel free to ask for commit access!

Contributing

Bug reports and pull requests are welcome on Gitee at https://gitee.com/bulexu/ding_talk.
Bug reports and pull requests are welcome on GitHub at https://github.com/bulexu/ding_talk.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages