def archive(*args)
      arguments(args, required: [:user, :repo])
      params         = arguments.params
      archive_format = params.delete('archive_format') || 'tarball'
      ref            = params.delete('ref') || 'master'

      disable_redirects do
        response = get_request("/repos/#{arguments.user}/#{arguments.repo}/#{archive_format}/#{ref}", params)
        response.headers.location
      end
    end
def archive(*args)
      arguments(args, required: [:user, :repo])
      params         = arguments.params
      archive_format = params.delete('archive_format') || 'tarball'
      ref            = params.delete('ref') || 'master'

      disable_redirects do
        response = get_request("/repos/#{arguments.user}/#{arguments.repo}/#{archive_format}/#{ref}", params)
        response.headers.location
      end
    end
Get archive link

 This method will return a 302 to a URL to download a tarball or zipball
 archive for a repository. Please make sure your HTTP framework is configured
 to follow redirects or you will need to use the Location header to make
 a second GET request.

 @note
   For private repositories, these links are temporary and expire quickly.

 @param [Hash] params
 @input params [String] :archive_format
   Required string. Either tarball or zipball. Default: tarball
 @input params [String] :ref
   Optional string. A valid Git reference.
   Default: the repository’s default branch (usually master)

 @example
  github = Github.new
  github.repos.contents.archive 'user-name', 'repo-name',
    archive_format: "tarball",
    ref: "master"

 @api public