Module: DingBot
- Defined in:
- lib/dingbot.rb,
lib/dingbot/error.rb,
lib/dingbot/client.rb,
lib/dingbot/version.rb,
lib/dingbot/message/base.rb,
lib/dingbot/message/link.rb,
lib/dingbot/message/text.rb,
lib/dingbot/message/markdown.rb,
lib/dingbot/message/feed_card.rb,
lib/dingbot/message/action_card.rb
Defined Under Namespace
Modules: Error, Message Classes: Client
Constant Summary collapse
- ENDPOINT =
"https://oapi.dingtalk.com/robot/send"- VERSION =
"0.1.1"
Class Method Summary collapse
-
.actions ⇒ Array<Symbol>
Returns an unsorted array of available client methods.
-
.client(access_token = '') ⇒ DingBot::Client
Alias for DingBot::Client.new.
-
.http_proxy(address = nil, port = nil, username = nil, password = nil) ⇒ Object
Delegate to HTTParty.http_proxy.
-
.method_missing(method, *args, &block) ⇒ Object
Delegate to DingBot::Client.
Instance Method Summary collapse
-
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Delegate to DingBot::Client.
Class Method Details
.actions ⇒ Array<Symbol>
Returns an unsorted array of available client methods.
40 41 42 43 |
# File 'lib/dingbot.rb', line 40 def self.actions hidden = /access_token|post|validate|set_request_defaults|httparty/ (DingBot::Client.instance_methods - Object.methods).reject {|e| e[hidden]} end |
.client(access_token = '') ⇒ DingBot::Client
Alias for DingBot::Client.new
17 18 19 |
# File 'lib/dingbot.rb', line 17 def self.client(access_token='') DingBot::Client.new(access_token) end |
.http_proxy(address = nil, port = nil, username = nil, password = nil) ⇒ Object
Delegate to HTTParty.http_proxy
33 34 35 |
# File 'lib/dingbot.rb', line 33 def self.http_proxy(address=nil, port=nil, username=nil, password=nil) DingBot::Client.http_proxy(address, port, username, password) end |
.method_missing(method, *args, &block) ⇒ Object
Delegate to DingBot::Client
22 23 24 25 |
# File 'lib/dingbot.rb', line 22 def self.method_missing(method, *args, &block) return super unless client.respond_to?(method) client.send(method, *args, &block) end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Delegate to DingBot::Client
28 29 30 |
# File 'lib/dingbot.rb', line 28 def respond_to_missing?(method_name, include_private = false) client.respond_to?(method_name) || super end |