Sha256: b92632085173bc8974fad226500e9ac87cd3d31b79891b6fb495bbe6802d8cd8

Contents?: true

Size: 951 Bytes

Versions: 3

Compression:

Stored size: 951 Bytes

Contents

module Octokit
  class Client
    module Objects

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

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

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

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

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

      def raw(repo, sha, options={})
        get("blob/show/#{Repository.new(repo)}/#{sha}", options)
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
octokit-0.5.2 lib/octokit/client/objects.rb
octokit-0.5.1 lib/octokit/client/objects.rb
octokit-0.5.0 lib/octokit/client/objects.rb