/// <summary> /// Post a goal recommendation instance /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalRecommendation'> /// The instance of the goal recommendation to create. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> CreateAsync(this IGoalRecommendations operations, GoalRecommendation goalRecommendation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(goalRecommendation, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get a collection of all goal recommendations /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalTypes'> /// The goal types(e.g Steps, CaloriesBurned) filter. /// </param> /// <param name='goalWindowTypes'> /// The goal window types(e.g Daily, Weekly) filter. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GoalRecommendationsResponse> GetAsync(this IGoalRecommendations operations, string goalTypes = default(string), string goalWindowTypes = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(goalTypes, goalWindowTypes, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get an instance of a specific goal recommendation /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalRecommendationId'> /// The goal recommendation identifier. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GoalRecommendationInstance> GetByIdAsync(this IGoalRecommendations operations, string goalRecommendationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetByIdWithHttpMessagesAsync(goalRecommendationId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Post a goal recommendation instance /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalRecommendation'> /// The instance of the goal recommendation to create. /// </param> public static object Create(this IGoalRecommendations operations, GoalRecommendation goalRecommendation) { return(operations.CreateAsync(goalRecommendation).GetAwaiter().GetResult()); }
/// <summary> /// Get a collection of all goal recommendations /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalTypes'> /// The goal types(e.g Steps, CaloriesBurned) filter. /// </param> /// <param name='goalWindowTypes'> /// The goal window types(e.g Daily, Weekly) filter. /// </param> public static GoalRecommendationsResponse Get(this IGoalRecommendations operations, string goalTypes = default(string), string goalWindowTypes = default(string)) { return(operations.GetAsync(goalTypes, goalWindowTypes).GetAwaiter().GetResult()); }
/// <summary> /// Updates the goal recommendation to acknowledged state /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalRecommendationId'> /// The identifier of the goal recommendation to acknowledge. /// </param> public static object Acknowledge(this IGoalRecommendations operations, string goalRecommendationId) { return(operations.AcknowledgeAsync(goalRecommendationId).GetAwaiter().GetResult()); }
/// <summary> /// Get an instance of a specific goal recommendation /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalRecommendationId'> /// The goal recommendation identifier. /// </param> public static GoalRecommendationInstance GetById(this IGoalRecommendations operations, string goalRecommendationId) { return(operations.GetByIdAsync(goalRecommendationId).GetAwaiter().GetResult()); }
/// <summary> /// Delete a goal recommendation instance /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalRecommendationId'> /// The identifier of the goal recommendation to delete. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IGoalRecommendations operations, string goalRecommendationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(goalRecommendationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete a goal recommendation instance /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalRecommendationId'> /// The identifier of the goal recommendation to delete. /// </param> public static void Delete(this IGoalRecommendations operations, string goalRecommendationId) { operations.DeleteAsync(goalRecommendationId).GetAwaiter().GetResult(); }
/// <summary> /// Updates the goal recommendation to acknowledged state /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='goalRecommendationId'> /// The identifier of the goal recommendation to acknowledge. /// </param> public static void Acknowledge(this IGoalRecommendations operations, string goalRecommendationId) { operations.AcknowledgeAsync(goalRecommendationId).GetAwaiter().GetResult(); }