Sha256: 7d7b21f8f30032ddecb6625cd144b6f19f1666c48d7105425e0ce70272da163d

Contents?: true

Size: 816 Bytes

Versions: 5

Compression:

Stored size: 816 Bytes

Contents

# encoding: utf-8

module BitBucket
  class Client::Repos::Sources < API
    @version = '1.0'

    REQUIRED_COMMENT_PARAMS = %w[
        body
        changeset_id
        line
        path
        position
      ].freeze

    # Gets a source of repo 
    #
    # = Examples
    #  @bitbucket = BitBucket.new
    #  @bitbucket.repos.sources.get 'user-name', 'repo-name', '6dcb09b5b57875f334f61aebed6', 'app/contorllers/')
    #
    def get(user_name, repo_name, sha, path, params={})
      _update_user_repo_params(user_name, repo_name)
      _validate_user_repo_params(user, repo) unless user? && repo?
      _validate_presence_of sha
      normalize! params

      get_request("/repositories/#{user}/#{repo.downcase}/src/#{sha}/#{path}", params)
    end
    alias :find :get

  end # Repos::Sources
end # BitBucket

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
codenamev_bitbucket_api-0.4.1 lib/bitbucket_rest_api/client/repos/sources.rb
codenamev_bitbucket_api-0.4.0 lib/bitbucket_rest_api/client/repos/sources.rb
reenhanced_bitbucket_api-0.3.2 lib/bitbucket_rest_api/client/repos/sources.rb
reenhanced_bitbucket_api-0.3.1 lib/bitbucket_rest_api/client/repos/sources.rb
reenhanced_bitbucket_api-0.3.0 lib/bitbucket_rest_api/client/repos/sources.rb