/// <summary> /// Call the HV REST API to delete a goal in a user's HealthVault record. /// This deletes a goal of the user who is actively signed into the application ("online" scenario). /// </summary> private HealthServiceRestResponseData DeleteGoal(Guid id) { return(HealthServiceRestHelper.CallHeathServiceRestOnline( User.PersonInfo(), HttpMethod.Delete.ToString(), _baseRestUrl + id)); }
/// <summary> /// Call the HV REST API to get a list of goals in a user's HealthVault record. /// This gets goals of the user who is actively signed into the application ("online" scenario). /// </summary> private HealthServiceRestResponseData GetGoals() { return(HealthServiceRestHelper.CallHeathServiceRestOnline( User.PersonInfo(), HttpMethod.Get.ToString(), _baseRestUrl)); }
/// <summary> /// Call the HV REST API to update goals in a user's HealthVault record. /// This updates goals for the user who is actively signed into the application ("online" scenario). /// </summary> private HealthServiceRestResponseData UpdateGoals(GoalsWrapper goals) { return(HealthServiceRestHelper.CallHeathServiceRestOnline( User.PersonInfo(), "PATCH", _baseRestUrl, requestBody: JsonConvert.SerializeObject(goals))); }
/// <summary> /// Call the HV REST API to create goals in a user's HealthVault record. /// This creates goals for the user who is actively signed into the application ("online" scenario). /// </summary> private HealthServiceRestResponseData CreateGoals(GoalsWrapper goals) { return(HealthServiceRestHelper.CallHeathServiceRestOnline( User.PersonInfo(), HttpMethod.Post.ToString(), _baseRestUrl, requestBody: JsonConvert.SerializeObject(goals))); }