using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace Octokit { /// /// A client for GitHub's Invitations on a Repository. /// /// /// See the Invitations API documentation for more details. /// public interface IRepositoryInvitationsClient { /// /// Accept a repository invitation. /// /// /// See the API documentation for more information. /// /// The id of the invitation /// Thrown when a general API error occurs. Task Accept(int invitationId); /// /// Decline a repository invitation. /// /// /// See the API documentation for more information. /// /// The id of the invitation /// Thrown when a general API error occurs. Task Decline(int invitationId); /// /// Deletes a repository invitation. /// /// /// See the API documentation for more information. /// /// The id of the repository /// The id of the invitation /// Thrown when a general API error occurs. Task Delete(long repositoryId, int invitationId); /// /// Gets all invitations for the current user. /// /// /// See the API documentation for more information. /// /// Thrown when a general API error occurs. [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] Task> GetAllForCurrent(); /// /// Gets all invitations for the current user. /// /// /// See the API documentation for more information. /// /// Options for changing the API response /// Thrown when a general API error occurs. [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] Task> GetAllForCurrent(ApiOptions options); /// /// Gets all the invitations on a repository. /// /// /// See the API documentation for more information. /// /// The id of the repository /// Thrown when a general API error occurs. Task> GetAllForRepository(long repositoryId); /// /// Gets all the invitations on a repository. /// /// /// See the API documentation for more information. /// /// The id of the repository /// Options for changing the API response /// Thrown when a general API error occurs. Task> GetAllForRepository(long repositoryId, ApiOptions options); /// /// Updates a repository invitation. /// /// /// See the API documentation for more information. /// /// The id of the repository /// The id of the invitation /// The permission for the collsborator /// Thrown when a general API error occurs. Task Edit(long repositoryId, int invitationId, InvitationUpdate permissions); } }