Sha256: 2e720df1cc82e0d8e7b849deafe8e8a20c572e2b94cc47f6243c40d768d09500

Contents?: true

Size: 787 Bytes

Versions: 3

Compression:

Stored size: 787 Bytes

Contents

# encoding: utf-8

module BitBucket
  class Repos::Sources < API

    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

3 entries across 3 versions & 2 rubygems

Version Path
reenhanced_bitbucket_api-0.1.6 lib/bitbucket_rest_api/repos/sources.rb
bitbucket_rest_api-0.1.5 lib/bitbucket_rest_api/repos/sources.rb
bitbucket_rest_api-0.1.4 lib/bitbucket_rest_api/repos/sources.rb