private static async Task RemoveAllActionPlansAsync(IMicrosoftHealthVaultRestApi api)
        {
            var plans = await api.ActionPlans.GetAsync();

            foreach (var plan in plans.Plans)
            {
                await api.ActionPlans.DeleteAsync(plan.Id);
            }
        }
Example #2
0
        private async void GetActionPlans_OnClicked(object sender, EventArgs e)
        {
            PersonInfo personInfo = await _connection.GetPersonInfoAsync();

            IMicrosoftHealthVaultRestApi restClient = _connection.CreateMicrosoftHealthVaultRestApi(personInfo.SelectedRecord.Id);

            var actionPlansResponse = await restClient.ActionPlans.GetAsync();

            OutputLabel.Text = $"There are {actionPlansResponse.Plans.Count} action plans";
        }
Example #3
0
        private static async Task RemoveAllActionPlansAsync(IMicrosoftHealthVaultRestApi api)
        {
            var plans = await api.ActionPlans.GetAsync();

            foreach (var plan in plans.Plans)
            {
                if (plan.Id != null)
                {
                    await api.ActionPlans.DeleteWithHttpMessagesAsync(plan.Id.Value);
                }
            }
        }
        public override async Task OnNavigateToAsync()
        {
            await LoadAsync(async() =>
            {
                PersonInfo personInfo = await _connection.GetPersonInfoAsync();

                IMicrosoftHealthVaultRestApi restApi = _connection.CreateMicrosoftHealthVaultRestApi(personInfo.SelectedRecord.Id);
                var response = await restApi.ActionPlans.GetAsync();

                Plans = response.Plans.Where(p => p.Status == "Recommended" || p.Status == "InProgress");

                await base.OnNavigateToAsync();
            });
        }