Module: Github::Request::Verbs

Included in:
API
Defined in:
lib/github_api/request/verbs.rb

Overview

Defines HTTP verbs

Instance Method Summary collapse

Instance Method Details

#delete_request(path, params = ParamsHash.empty) ⇒ Object

Make a delete request


48
49
50
# File 'lib/github_api/request/verbs.rb', line 48

def delete_request(path, params = ParamsHash.empty)
  Request.new(:delete, path, self).call(current_options, params)
end

#get_request(path, params = ParamsHash.empty) ⇒ Object

Make a get request


19
20
21
22
# File 'lib/github_api/request/verbs.rb', line 19

def get_request(path, params = ParamsHash.empty)
  request = Request.new(:get, path, self).call(current_options, params)
  request.auto_paginate
end

#head_request(path, params = ParamsHash.empty) ⇒ Object

Make a head request


12
13
14
# File 'lib/github_api/request/verbs.rb', line 12

def head_request(path, params = ParamsHash.empty)
  Request.new(:head, path, self).call(current_options, params)
end

#options_request(path, params = ParamsHash.empty) ⇒ Object

Make a options request


55
56
57
# File 'lib/github_api/request/verbs.rb', line 55

def options_request(path, params = ParamsHash.empty)
  Request.new(:options, path, self).call(current_options, params)
end

#patch_request(path, params = ParamsHash.empty) ⇒ Object

Make a patch request


27
28
29
# File 'lib/github_api/request/verbs.rb', line 27

def patch_request(path, params = ParamsHash.empty)
  Request.new(:patch, path, self).call(current_options, params)
end

#post_request(path, params = ParamsHash.empty) ⇒ Object

Make a post request


34
35
36
# File 'lib/github_api/request/verbs.rb', line 34

def post_request(path, params = ParamsHash.empty)
  Request.new(:post, path, self).call(current_options, params)
end

#put_request(path, params = ParamsHash.empty) ⇒ Object

Make a put request


41
42
43
# File 'lib/github_api/request/verbs.rb', line 41

def put_request(path, params = ParamsHash.empty)
  Request.new(:put, path, self).call(current_options, params)
end