示例#1
0
 /// <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));
 }
示例#2
0
 /// <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));
 }
示例#3
0
 /// <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)));
 }
示例#4
0
 /// <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)));
 }