Esempio n. 1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="userId"></param>
    /// <param name="groupId"></param>
    private bool DeleteUserFromGroup(string userId, string groupId)
    {
        //ref: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#remove_user_to_group

        //Create a web request
        var urlDeleteUserFromGroup = _onlineUrls.Url_DeleteUserFromGroup(_onlineSession, userId, groupId);

        bool success = ResourceSafe_PerformWebRequestResponseLogErrors(
            urlDeleteUserFromGroup,
            "delete user from group",
            "DELETE");

        return(success);

        //var webRequest = this.CreateLoggedInWebRequest(urlDeleteUserFromGroup, "DELETE");
        //var response = GetWebReponseLogErrors(webRequest, "delete user from group");
        //response.Dispose();
        //return true; //If we did not get an error code, assume success
    }