Sha256: 1da252a502c6dd498d7a613021f99b9e3ada3fe79cfd01922c897cf03e55ff51

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

module Octokit
  class Client
    module Objects
      def tree(repo, tree_sha, options={})
        get("repos/#{Repository.new(repo)}/git/trees/#{tree_sha}", options)
      end

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

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

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
octokit-1.0.1 lib/octokit/client/objects.rb
octokit-1.0.0 lib/octokit/client/objects.rb