Class: OpenQq::Request
Constant Summary
Constants inherited from Gateway
Gateway::OPEN_HTTP_TRANSLATE_ERROR
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Gateway
Instance Method Summary collapse
- #get(params = {}, options = nil) ⇒ Object
-
#initialize(options) ⇒ Request
constructor
A new instance of Request.
- #post(params = {}, options = nil) ⇒ Object
Methods inherited from Gateway
Methods included from Signature
#each_pair_escape, #make_callback_source, #make_source, #parsed_params, #signature, #url_escape, #verify_sig
Constructor Details
#initialize(options) ⇒ Request
Returns a new instance of Request.
14 15 16 17 18 19 20 21 22 |
# File 'lib/open_qq/request.rb', line 14 def initialize() = .dup appid = .delete(:appid) appkey = .delete(:appkey) env = .delete(:env) @url = .delete(:url) @options = || {} super(appid, appkey, env) end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
12 13 14 |
# File 'lib/open_qq/request.rb', line 12 def @options end |
#url ⇒ Object
Returns the value of attribute url.
12 13 14 |
# File 'lib/open_qq/request.rb', line 12 def url @url end |
Instance Method Details
#get(params = {}, options = nil) ⇒ Object
25 26 27 28 |
# File 'lib/open_qq/request.rb', line 25 def get(params = {}, = nil) ||= @options super(@url, params, ) end |
#post(params = {}, options = nil) ⇒ Object
31 32 33 34 |
# File 'lib/open_qq/request.rb', line 31 def post(params = {}, = nil) ||= @options super(@url, params, ) end |