private static SenseUser CreateNewSenseUser(SenseUser newUser) { ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); }; var request = GenerateQsRequest("/qrs/user", "", newUser, Method.POST); newUser = JsonConvert.DeserializeObject <SenseUser>(ExecuteQsRequest(request)); return(newUser); }
private static SenseUser OnboardNewUser(string userId, string userDirectory, string name) { // Add user into user list SenseUser newUser = new SenseUser(); newUser.userId = userId; newUser.userDirectory = userDirectory; newUser.name = name; SenseUser addedUser = CreateNewSenseUser(newUser); // Reload the directory-specific user sync task string syncTaskName = userDirectory + "_usersynctask"; StartTask(syncTaskName); return(addedUser); }