/// <summary> /// Demotes a site administrator to an ordinary user (must be Site Admin user). /// </summary> /// <remarks> /// See the <a href="https://developer.github.com/v3/users/administration/#demote-a-site-administrator-to-an-ordinary-user">API documentation</a> /// for more information. /// </remarks> /// <param name="login">The user to demote from administrator.</param> /// <returns></returns> public Task Demote(string login) { Ensure.ArgumentNotNullOrEmptyString(login, "login"); var endpoint = ApiUrls.UserAdministrationSiteAdmin(login); return(ApiConnection.Delete(endpoint)); }
/// <summary> /// Promotes ordinary user to a site administrator (must be Site Admin user). /// </summary> /// <remarks> /// See the <a href="https://developer.github.com/v3/users/administration/#promote-an-ordinary-user-to-a-site-administrator">API documentation</a> /// for more information. /// </remarks> /// <param name="login">The user to promote to administrator.</param> /// <returns></returns> public Task Promote(string login) { Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); var endpoint = ApiUrls.UserAdministrationSiteAdmin(login); return(ApiConnection.Put(endpoint)); }