Module: Octokit::Request
- Included in:
- Client
- Defined in:
- lib/octokit/request.rb
Instance Method Summary collapse
- #delete(path, options = {}) ⇒ Object
- #get(path, options = {}) ⇒ Object
- #patch(path, options = {}) ⇒ Object
- #post(path, options = {}) ⇒ Object
- #put(path, options = {}) ⇒ Object
Instance Method Details
#delete(path, options = {}) ⇒ Object
6 7 8 |
# File 'lib/octokit/request.rb', line 6 def delete(path, ={}) request(:delete, path, ).body end |
#get(path, options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/octokit/request.rb', line 10 def get(path, ={}) response = request(:get, path, ) body = response.body if auto_traversal && body.is_a?(Array) while next_url = links(response)["next"] response = request(:get, next_url, ) body += response.body end end body end |
#patch(path, options = {}) ⇒ Object
24 25 26 |
# File 'lib/octokit/request.rb', line 24 def patch(path, ={}) request(:patch, path, ).body end |
#post(path, options = {}) ⇒ Object
28 29 30 |
# File 'lib/octokit/request.rb', line 28 def post(path, ={}) request(:post, path, ).body end |
#put(path, options = {}) ⇒ Object
32 33 34 |
# File 'lib/octokit/request.rb', line 32 def put(path, ={}) request(:put, path, ).body end |