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, options = {}) ⇒ Object



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

def blob(repo, tree_sha, options={})
  get("repos/#{Repository.new(repo)}/git/blobs/#{tree_sha}", options)
end

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



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

def (repo, tree_sha, options={})
  warn 'DEPRECATED: Please use Octokit.blob instead.'
  get("/api/v2/json/blob/full/#{Repository.new(repo)}/#{tree_sha}", options, 2)['blobs']
end

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



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

def blobs(repo, tree_sha, options={})
  warn 'DEPRECATED: Please use Octokit.tree instead.'
  get("/api/v2/json/blob/all/#{Repository.new(repo)}/#{tree_sha}", options, 2)['blobs']
end

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



29
30
31
32
# File 'lib/octokit/client/objects.rb', line 29

def raw(repo, sha, options={})
  warn 'DEPRECATED: Please use Octokit.blob instead.'
  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("repos/#{Repository.new(repo)}/git/trees/#{tree_sha}", options)
end

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



23
24
25
26
# File 'lib/octokit/client/objects.rb', line 23

def (repo, tree_sha, options={})
  warn 'DEPRECATED: Please use Octokit.tree instead.'
  get("/api/v2/json/tree/full/#{Repository.new(repo)}/#{tree_sha}", options, 2)['tree']
end