Module: Octokit::Client::Objects
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/objects.rb
Instance Method Summary collapse
- #blob(repo, tree_sha, options = {}) ⇒ Object
- #blob_metadata(repo, tree_sha, options = {}) ⇒ Object (also: #blob_meta)
- #blobs(repo, tree_sha, options = {}) ⇒ Object
- #raw(repo, sha, options = {}) ⇒ Object
- #tree(repo, tree_sha, options = {}) ⇒ Object
- #tree_metadata(repo, tree_sha, options = {}) ⇒ Object (also: #tree_meta)
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, ={}) get("repos/#{Repository.new(repo)}/git/blobs/#{tree_sha}", ) 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, ={}) warn 'DEPRECATED: Please use Octokit.blob instead.' get("/api/v2/json/blob/full/#{Repository.new(repo)}/#{tree_sha}", , 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, ={}) warn 'DEPRECATED: Please use Octokit.tree instead.' get("/api/v2/json/blob/all/#{Repository.new(repo)}/#{tree_sha}", , 2)['blobs'] end |
#raw(repo, sha, options = {}) ⇒ Object
29 30 31 32 |
# File 'lib/octokit/client/objects.rb', line 29 def raw(repo, sha, ={}) warn 'DEPRECATED: Please use Octokit.blob instead.' get("/api/v2/json/blob/show/#{Repository.new(repo)}/#{sha}", , 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, ={}) get("repos/#{Repository.new(repo)}/git/trees/#{tree_sha}", ) 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, ={}) warn 'DEPRECATED: Please use Octokit.tree instead.' get("/api/v2/json/tree/full/#{Repository.new(repo)}/#{tree_sha}", , 2)['tree'] end |