Module: Github::Request::Verbs
- Included in:
- API
- Defined in:
- lib/github_api2/request/verbs.rb
Overview
Defines HTTP verbs
Instance Method Summary collapse
-
#delete_request(path, params = ParamsHash.empty) ⇒ Object
Make a delete request.
-
#get_request(path, params = ParamsHash.empty) ⇒ Object
Make a get request.
-
#head_request(path, params = ParamsHash.empty) ⇒ Object
Make a head request.
-
#options_request(path, params = ParamsHash.empty) ⇒ Object
Make a options request.
-
#patch_request(path, params = ParamsHash.empty) ⇒ Object
Make a patch request.
-
#post_request(path, params = ParamsHash.empty) ⇒ Object
Make a post request.
-
#put_request(path, params = ParamsHash.empty) ⇒ Object
Make a put request.
Instance Method Details
#delete_request(path, params = ParamsHash.empty) ⇒ Object
Make a delete request
51 52 53 |
# File 'lib/github_api2/request/verbs.rb', line 51 def delete_request(path, params = ParamsHash.empty) Request.new(:delete, path, self).call(, params) end |
#get_request(path, params = ParamsHash.empty) ⇒ Object
Make a get request
22 23 24 25 |
# File 'lib/github_api2/request/verbs.rb', line 22 def get_request(path, params = ParamsHash.empty) request = Request.new(:get, path, self).call(, params) request.auto_paginate end |
#head_request(path, params = ParamsHash.empty) ⇒ Object
Make a head request
15 16 17 |
# File 'lib/github_api2/request/verbs.rb', line 15 def head_request(path, params = ParamsHash.empty) Request.new(:head, path, self).call(, params) end |
#options_request(path, params = ParamsHash.empty) ⇒ Object
Make a options request
58 59 60 |
# File 'lib/github_api2/request/verbs.rb', line 58 def (path, params = ParamsHash.empty) Request.new(:options, path, self).call(, params) end |
#patch_request(path, params = ParamsHash.empty) ⇒ Object
Make a patch request
30 31 32 |
# File 'lib/github_api2/request/verbs.rb', line 30 def patch_request(path, params = ParamsHash.empty) Request.new(:patch, path, self).call(, params) end |
#post_request(path, params = ParamsHash.empty) ⇒ Object
Make a post request
37 38 39 |
# File 'lib/github_api2/request/verbs.rb', line 37 def post_request(path, params = ParamsHash.empty) Request.new(:post, path, self).call(, params) end |
#put_request(path, params = ParamsHash.empty) ⇒ Object
Make a put request
44 45 46 |
# File 'lib/github_api2/request/verbs.rb', line 44 def put_request(path, params = ParamsHash.empty) Request.new(:put, path, self).call(, params) end |