/// <summary> /// Create a new Page object for a user based on the contents of the specified Page. Only modifiable fields that actually provide a value /// in the incoming entity are processed. /// </summary> /// <param name="personID">Authenticated user. Use @me or the ID of the authenticated user</param> /// <param name="page">the Page object containing the information on the page to be created</param> public void CreatePage(string personID, Page page) { string url = peopleUrl + "/" + personID.ToString() + "/pages"; string json = JsonConvert.SerializeObject(page, new JsonSerializerSettings { DefaultValueHandling = DefaultValueHandling.Ignore }); try { PostAbsolute(url, json); } catch (HttpException e) { switch (e.GetHttpCode()) { case 400: throw new HttpException(e.WebEventCode, "An input field was malformed", e); case 403: throw new HttpException(e.WebEventCode, "Specified user is not the authenticated user", e); case 404: throw new HttpException(e.WebEventCode, "Specified user does not exist", e) ; case 409: throw new HttpException(e.WebEventCode, "Requested change would cause business rules to be violated"); default: throw; } } return; }