Module: Octokit::Request

Included in:
Client
Defined in:
lib/octokit/request.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) delete(path, options = {})



6
7
8
# File 'lib/octokit/request.rb', line 6

def delete(path, options={})
  request(:delete, path, options).body
end

- (Object) get(path, options = {})



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/octokit/request.rb', line 10

def get(path, options={})
  response = request(:get, path, options)
  body = response.body

  if auto_traversal && body.is_a?(Array)
    while next_url = links(response)["next"]
      response = request(:get, next_url, options)
      body += response.body
    end
  end

  body
end

- (Object) patch(path, options = {})



24
25
26
# File 'lib/octokit/request.rb', line 24

def patch(path, options={})
  request(:patch, path, options).body
end

- (Object) post(path, options = {})



28
29
30
# File 'lib/octokit/request.rb', line 28

def post(path, options={})
  request(:post, path, options).body
end

- (Object) put(path, options = {})



32
33
34
# File 'lib/octokit/request.rb', line 32

def put(path, options={})
  request(:put, path, options).body
end