public static RepoCollaborator ( long repositoryId, string user ) : |
||
repositoryId | long | The id of the repository |
user | string | The name of the user |
Результат |
/// <summary> /// Adds a new collaborator to the repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/collaborators/#add-collaborator">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The id of the repository</param> /// <param name="user">Username of the new collaborator</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task Add(long repositoryId, string user) { Ensure.ArgumentNotNullOrEmptyString(user, "user"); return(ApiConnection.Put(ApiUrls.RepoCollaborator(repositoryId, user))); }
public Task <RepositoryInvitation> Invite(long repositoryId, string user) { Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); return(ApiConnection.Put <RepositoryInvitation>(ApiUrls.RepoCollaborator(repositoryId, user), new object())); }
public Task Delete(long repositoryId, string user) { Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); return(ApiConnection.Delete(ApiUrls.RepoCollaborator(repositoryId, user))); }
/// <summary> /// Invites a new collaborator to the repo /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/collaborators/#add-collaborator">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The id of the repository.</param> /// <param name="user">The name of the user to invite.</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> public Task <RepositoryInvitation> Invite(long repositoryId, string user) { Ensure.ArgumentNotNullOrEmptyString(user, "user"); return(ApiConnection.Put <RepositoryInvitation>(ApiUrls.RepoCollaborator(repositoryId, user), new object(), null, AcceptHeaders.InvitationsApiPreview)); }