RepoCollaborator() публичный статический Метод

Returns the Uri to check user is collaborator
public static RepoCollaborator ( long repositoryId, string user ) : Uri
repositoryId long The id of the repository
user string The name of the user
Результат System.Uri
        /// <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)));
        }
Пример #4
0
        /// <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));
        }