コード例 #1
0
 /// <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);
     }
 }
コード例 #2
0
 /// <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);
     }
 }
コード例 #3
0
 /// <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);
     }
 }
コード例 #4
0
 /// <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());
 }
コード例 #5
0
 /// <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());
 }
コード例 #6
0
 /// <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());
 }
コード例 #7
0
 /// <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());
 }
コード例 #8
0
 /// <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();
 }
コード例 #9
0
 /// <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();
 }
コード例 #10
0
 /// <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();
 }