Module: DingBot
- Extended by:
- Configuration
- 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/configuration.rb,
lib/dingbot/message/markdown.rb,
lib/dingbot/message/feed_card.rb,
lib/dingbot/message/action_card.rb
Defined Under Namespace
Modules: Configuration, Error, Message Classes: Client
Constant Summary collapse
- VERSION =
"0.2.5"
Constants included from Configuration
Configuration::DEFAULT_ENDPOINT, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS
Class Method Summary collapse
-
.actions ⇒ Array<Symbol>
Returns an unsorted array of available client methods.
-
.client(options = {}) ⇒ 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.
Methods included from Configuration
configure, extended, options, reset
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|httparty|secret/ (DingBot::Client.instance_methods - Object.methods).reject {|e| e[hidden]} end |
.client(options = {}) ⇒ DingBot::Client
Alias for DingBot::Client.new
17 18 19 |
# File 'lib/dingbot.rb', line 17 def self.client(={}) DingBot::Client.new() 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 |