class Github::Client::Repos::Downloads
Constants
- REQUIRED_PARAMS
- VALID_DOWNLOAD_PARAM_NAMES
Public Instance Methods
delete(*args)
click to toggle source
Delete download from a repository
@example
github = Github.new github.repos.downloads.delete 'user-name', 'repo-name', 'download-id'
@api public
# File lib/github_api/client/repos/downloads.rb, line 55 def delete(*args) arguments(args, required: [:user, :repo, :id]) delete_request("/repos/#{arguments.user}/#{arguments.repo}/downloads/#{arguments.id}", arguments.params) end
Also aliased as: remove
get(*args)
click to toggle source
Get a single download
@example
github = Github.new github.repos.downloads.get 'user-name', 'repo-name', 'download-id'
@api public
# File lib/github_api/client/repos/downloads.rb, line 41 def get(*args) arguments(args, required: [:user, :repo, :id]) get_request("/repos/#{arguments.user}/#{arguments.repo}/downloads/#{arguments.id}", arguments.params) end
Also aliased as: find
list(*args) { |el| ... }
click to toggle source
List downloads for a repository
@example
github = Github.new github.repos.downloads.list 'user-name', 'repo-name' github.repos.downloads.list 'user-name', 'repo-name' { |downl| ... }
@api public
# File lib/github_api/client/repos/downloads.rb, line 25 def list(*args) arguments(args, required: [:user, :repo]) response = get_request("/repos/#{arguments.user}/#{arguments.repo}/downloads", arguments.params) return response unless block_given? response.each { |el| yield el } end
Also aliased as: all