UserAdministrationSuspension() public static method

Creates the relative Uri for altering suspension status of a user.
public static UserAdministrationSuspension ( string login ) : Uri
login string The login for the intended user.
return Uri
Esempio n. 1
0
        /// <summary>
        /// Unsuspends a user (must be Site Admin user).
        /// </summary>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/users/administration/#unsuspend-a-user">API documentation</a>
        /// for more information.
        /// </remarks>
        /// <param name="login">The user to unsuspend.</param>
        /// <returns></returns>
        public Task Unsuspend(string login)
        {
            Ensure.ArgumentNotNullOrEmptyString(login, "login");
            var endpoint = ApiUrls.UserAdministrationSuspension(login);

            return(ApiConnection.Delete(endpoint));
        }
Esempio n. 2
0
        /// <summary>
        /// Suspends a user (must be Site Admin user).
        /// </summary>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/users/administration/#suspend-a-user">API documentation</a>
        /// for more information.
        /// </remarks>
        /// <param name="login">The user to suspend.</param>
        /// <returns></returns>
        public Task Suspend(string login)
        {
            Ensure.ArgumentNotNullOrEmptyString(login, nameof(login));
            var endpoint = ApiUrls.UserAdministrationSuspension(login);

            return(ApiConnection.Put(endpoint));
        }