Module: Octokit::Client::Objects

Included in:
Octokit::Client
Defined in:
lib/octokit/client/objects.rb

Instance Method Summary collapse

Instance Method Details

#blob(repo, tree_sha, path, options = {}) ⇒ Object



8
9
10
# File 'lib/octokit/client/objects.rb', line 8

def blob(repo, tree_sha, path, options={})
  get("/api/v2/json/blob/show/#{Repository.new(repo)}/#{tree_sha}/#{path}", options)['blob']
end

#blob_metadata(repo, tree_sha, options = {}) ⇒ Object Also known as: blob_meta



16
17
18
# File 'lib/octokit/client/objects.rb', line 16

def (repo, tree_sha, options={})
  get("/api/v2/json/blob/full/#{Repository.new(repo)}/#{tree_sha}", options)['blobs']
end

#blobs(repo, tree_sha, options = {}) ⇒ Object



12
13
14
# File 'lib/octokit/client/objects.rb', line 12

def blobs(repo, tree_sha, options={})
  get("/api/v2/json/blob/all/#{Repository.new(repo)}/#{tree_sha}", options)['blobs']
end

#raw(repo, sha, options = {}) ⇒ Object



26
27
28
# File 'lib/octokit/client/objects.rb', line 26

def raw(repo, sha, options={})
  get("/api/v2/json/blob/show/#{Repository.new(repo)}/#{sha}", options, 2, true, true).body
end

#tree(repo, tree_sha, options = {}) ⇒ Object



4
5
6
# File 'lib/octokit/client/objects.rb', line 4

def tree(repo, tree_sha, options={})
  get("/api/v2/json/tree/show/#{Repository.new(repo)}/#{tree_sha}", options)['tree']
end

#tree_metadata(repo, tree_sha, options = {}) ⇒ Object Also known as: tree_meta



21
22
23
# File 'lib/octokit/client/objects.rb', line 21

def (repo, tree_sha, options={})
  get("/api/v2/json/tree/full/#{Repository.new(repo)}/#{tree_sha}", options)['tree']
end