module Octokit::Client::Downloads
Methods for the Repo Downloads
API
Public Instance Methods
Delete a single download for a repository
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param id [Integer] ID of the download @deprecated As of December 11th, 2012: github.com/blog/1302-goodbye-uploads @see developer.github.com/v3/repos/downloads/#delete-a-download @return [Boolean] Status @example Get the “Robawt” download from Github/Hubot
Octokit.delete_download("github/hubot", 1234)
# File lib/octokit/client/downloads.rb, line 44 def delete_download(repo, id, options = {}) boolean_from_response :delete, "#{Repository.path repo}/downloads/#{id}", options end
Get single download for a repository
@param repo [Integer, String, Repository
, Hash] A GitHub repository @param id [Integer] ID of the download @return [Sawyer::Resource] A single download from the repository @deprecated As of December 11th, 2012: github.com/blog/1302-goodbye-uploads @see developer.github.com/v3/repos/downloads/#get-a-single-download @example Get the “Robawt” download from Github/Hubot
Octokit.download("github/hubot")
# File lib/octokit/client/downloads.rb, line 31 def download(repo, id, options={}) get "#{Repository.path repo}/downloads/#{id}", options end
List available downloads for a repository
@param repo [Integer, String, Repository
, Hash] A Github Repository
@return [Array] A list of available downloads @deprecated As of December 11th, 2012: github.com/blog/1302-goodbye-uploads @see developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository @example List all downloads for Github/Hubot
Octokit.downloads("github/hubot")
# File lib/octokit/client/downloads.rb, line 17 def downloads(repo, options={}) paginate "#{Repository.path repo}/downloads", options end