123456789_123456789_123456789_123456789_123456789_

Module: Octokit::Client::RepositoryInvitations

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/octokit/client/repository_invitations.rb

Overview

Instance Method Summary

Instance Method Details

#accept_repo_invitation(invitation_id, options = {})

[ GitHub ]

  
# 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

Parameters:

  • invitation_id (Integer)

    The id of the invitation

Returns:

  • (Boolean)

    True if the acceptance of the invitation was successful

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/repository_invitations.rb', line 78

def accept_repository_invitation(invitation_id, options = {})
  patch "/user/repository_invitations/#{invitation_id}", options
end

#decline_invitation(invitation_id, options = {})

[ GitHub ]

  
# 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

Parameters:

  • invitation_id (Integer)

    The id of the invitation

Returns:

  • (Boolean)

    True if the acceptance of the invitation was successful

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/repository_invitations.rb', line 90

def decline_repository_invitation(invitation_id, options = {})
  boolean_from_response :delete, "/user/repository_invitations/#{invitation_id}", options
end

#delete_repo_invitation(repo, invitation_id, options = {})

[ GitHub ]

  
# 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

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

  • invitation_id (Integer)

    The id of the invitation

Returns:

  • (Boolean)

    True if the invitation was successfully deleted

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/repository_invitations.rb', line 42

def delete_repository_invitation(repo, invitation_id, options = {})
  boolean_from_response :delete, "#{Repository.path repo}/invitations/#{invitation_id}", options
end

#invite_user_to_repo(repo, user, options = {})

[ GitHub ]

  
# 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

Parameters:

Returns:

  • (Sawyer::Resource)

    The repository invitation

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/repository_invitations.rb', line 17

def invite_user_to_repository(repo, user, options = {})
  put "#{Repository.path repo}/collaborators/#{user}", options
end

#repo_invitations(repo, options = {})

[ GitHub ]

  
# 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

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

Returns:

  • (Array<Sawyer::Resource>)

    A list of invitations

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/repository_invitations.rb', line 29

def repository_invitations(repo, options = {})
  paginate "#{Repository.path repo}/invitations", options
end

#update_repo_invitation(repo, invitation_id, options = {})

[ GitHub ]

  
# 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

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

  • invitation_id (Integer)

    The id of the invitation

Returns:

  • (Sawyer::Resource)

    The updated repository invitation

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/repository_invitations.rb', line 55

def update_repository_invitation(repo, invitation_id, options = {})
  patch "#{Repository.path repo}/invitations/#{invitation_id}", options
end

#user_repo_invitations(options = {})

[ GitHub ]

  
# 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

Returns:

  • (Array<Sawyer::Resource>)

    The users repository invitations

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/repository_invitations.rb', line 66

def user_repository_invitations(options = {})
  paginate '/user/repository_invitations', options
end