Sha256: d6d2d8172ec33e069e293d521d06407a11a273643143a93c3642c884eefdd1af
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
# encoding: utf-8 require_relative '../../api' module Github class Client::Repos::Invitations < API # List repo invitations # # @example # github = Github.new # github.repos.invitations.list 'user-name', 'repo-name' # # @example # github.repos.invitations.list 'user-name', 'repo-name' { |cbr| .. } # # @return [Array] # # @api public def list(*args) arguments(args, required: [:user, :repo]) response = get_request("/repos/#{arguments.user}/#{arguments.repo}/invitations", arguments.params) return response unless block_given? response.each { |el| yield el } end alias :all :list # Deletes a repo invitation # # @example # github = Github.new # github.repos.invitations.delete 'user-name', 'repo-name', 'invitation-id' # # @api public def delete(*args) arguments(args, required: [:user, :repo, :id]) delete_request("/repos/#{arguments.user}/#{arguments.repo}/invitations/#{arguments.id}", arguments.params) end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
github_api2-1.0.1 | lib/github_api2/client/repos/invitations.rb |
github_api2-1.0.0 | lib/github_api2/client/repos/invitations.rb |
github_api-0.19.0 | lib/github_api/client/repos/invitations.rb |