Module: Octokit::Client::RepositoryInvitations
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/octokit/client/repository_invitations.rb |
Overview
Methods for the ::Octokit::Repository
Invitations API
Instance Method Summary
-
#accept_repo_invitation(invitation_id, options = {})
Alias for #accept_repository_invitation.
-
#accept_repository_invitation(invitation_id, options = {}) ⇒ Boolean
(also: #accept_repo_invitation)
Accept a repository invitation.
-
#decline_invitation(invitation_id, options = {})
Alias for #decline_repository_invitation.
-
#decline_repository_invitation(invitation_id, options = {}) ⇒ Boolean
(also: #decline_invitation)
Decline a repository invitation.
-
#delete_repo_invitation(repo, invitation_id, options = {})
Alias for #delete_repository_invitation.
-
#delete_repository_invitation(repo, invitation_id, options = {}) ⇒ Boolean
(also: #delete_repo_invitation)
Delete an invitation for a repository.
-
#invite_user_to_repo(repo, user, options = {})
Alias for #invite_user_to_repository.
-
#invite_user_to_repository(repo, user, options = {}) ⇒ Sawyer::Resource
(also: #invite_user_to_repo)
Invite a user to a repository.
-
#repo_invitations(repo, options = {})
Alias for #repository_invitations.
-
#repository_invitations(repo, options = {}) ⇒ Array<Sawyer::Resource>
(also: #repo_invitations)
List all invitations for a repository.
-
#update_repo_invitation(repo, invitation_id, options = {})
Alias for #update_repository_invitation.
-
#update_repository_invitation(repo, invitation_id, options = {}) ⇒ Sawyer::Resource
(also: #update_repo_invitation)
Update an invitation for a repository.
-
#user_repo_invitations(options = {})
Alias for #user_repository_invitations.
-
#user_repository_invitations(options = {}) ⇒ Array<Sawyer::Resource>
(also: #user_repo_invitations)
List all repository invitations for the user.
Instance Method Details
#accept_repo_invitation(invitation_id, options = {})
Alias for #accept_repository_invitation.
# File 'lib/octokit/client/repository_invitations.rb', line 81
alias accept_repo_invitation accept_repository_invitation
#accept_repository_invitation(invitation_id, options = {}) ⇒ Boolean
Also known as: #accept_repo_invitation
Accept a repository invitation
Requires authenticated client
# File 'lib/octokit/client/repository_invitations.rb', line 78
def accept_repository_invitation(invitation_id, = {}) patch "/user/repository_invitations/#{invitation_id}", end
#decline_invitation(invitation_id, options = {})
Alias for #decline_repository_invitation.
# File 'lib/octokit/client/repository_invitations.rb', line 93
alias decline_invitation decline_repository_invitation
#decline_repository_invitation(invitation_id, options = {}) ⇒ Boolean
Also known as: #decline_invitation
Decline a repository invitation
Requires authenticated client
# File 'lib/octokit/client/repository_invitations.rb', line 90
def decline_repository_invitation(invitation_id, = {}) boolean_from_response :delete, "/user/repository_invitations/#{invitation_id}", end
#delete_repo_invitation(repo, invitation_id, options = {})
Alias for #delete_repository_invitation.
# File 'lib/octokit/client/repository_invitations.rb', line 45
alias delete_repo_invitation delete_repository_invitation
#delete_repository_invitation(repo, invitation_id, options = {}) ⇒ Boolean
Also known as: #delete_repo_invitation
Delete an invitation for a repository
Requires authenticated client
# File 'lib/octokit/client/repository_invitations.rb', line 42
def delete_repository_invitation(repo, invitation_id, = {}) boolean_from_response :delete, "#{Repository.path repo}/invitations/#{invitation_id}", end
#invite_user_to_repo(repo, user, options = {})
Alias for #invite_user_to_repository.
# File 'lib/octokit/client/repository_invitations.rb', line 20
alias invite_user_to_repo invite_user_to_repository
#invite_user_to_repository(repo, user, options = {}) ⇒ Sawyer::Resource
Also known as: #invite_user_to_repo
Invite a user to a repository
Requires authenticated client
# File 'lib/octokit/client/repository_invitations.rb', line 17
def invite_user_to_repository(repo, user, = {}) put "#{Repository.path repo}/collaborators/#{user}", end
#repo_invitations(repo, options = {})
Alias for #repository_invitations.
# File 'lib/octokit/client/repository_invitations.rb', line 32
alias repo_invitations repository_invitations
#repository_invitations(repo, options = {}) ⇒ Array
<Sawyer::Resource
>
Also known as: #repo_invitations
List all invitations for a repository
Requires authenticated client
# File 'lib/octokit/client/repository_invitations.rb', line 29
def repository_invitations(repo, = {}) paginate "#{Repository.path repo}/invitations", end
#update_repo_invitation(repo, invitation_id, options = {})
Alias for #update_repository_invitation.
# File 'lib/octokit/client/repository_invitations.rb', line 58
alias update_repo_invitation update_repository_invitation
#update_repository_invitation(repo, invitation_id, options = {}) ⇒ Sawyer::Resource
Also known as: #update_repo_invitation
Update an invitation for a repository
Requires authenticated client
# File 'lib/octokit/client/repository_invitations.rb', line 55
def update_repository_invitation(repo, invitation_id, = {}) patch "#{Repository.path repo}/invitations/#{invitation_id}", end
#user_repo_invitations(options = {})
Alias for #user_repository_invitations.
# File 'lib/octokit/client/repository_invitations.rb', line 69
alias user_repo_invitations user_repository_invitations
#user_repository_invitations(options = {}) ⇒ Array
<Sawyer::Resource
>
Also known as: #user_repo_invitations
List all repository invitations for the user
Requires authenticated client
# File 'lib/octokit/client/repository_invitations.rb', line 66
def user_repository_invitations( = {}) paginate '/user/repository_invitations', end