Пример #1
0
 /// <summary>
 /// Exercise 2 - This will test your sorting endpoint.
 /// </summary>
 /// <remarks>
 /// This will call your api looking for a range of different sorting options at
 /// your base url /sort
 ///
 /// Your Api needs to call the "products" resource to get a list of available
 /// products
 ///
 /// This endpoint will need to accept a query string parameter called
 /// "sortOption" which will take in the following strings
 ///
 /// - "Low" - Low to High Price
 /// - "High" - High to Low Price
 /// - "Ascending" - A - Z sort on the Name
 /// - "Descending" - Z - A sort on the Name
 /// - "Recommended" - this will call the "shopperHistory" resource to get a
 /// list of customers orders and needs to return based on popularity,
 ///
 /// Your response will be in the same data structure as the "products" response
 /// (only sorted correctly)
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='request'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <DeveloperExerciseServicesExerciseResult> > ApiExerciseExercise2PostAsync(this IDevChallengeResourceClient operations, DeveloperExerciseApiModelsTrolleyExerciseRequest request = default(DeveloperExerciseApiModelsTrolleyExerciseRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiExerciseExercise2PostWithHttpMessagesAsync(request, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }