Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #269 from aspriddell/add-operatordata-async
Browse files Browse the repository at this point in the history
add operatordata async method
  • Loading branch information
aspriddell authored Nov 29, 2021
2 parents d487071 + 73a200c commit d2dc94c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions DragonFruit.Six.Api/Utils/OperatorData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under Apache-2. Please refer to the LICENSE file for more info

using System.Collections.Generic;
using System.Threading.Tasks;
using DragonFruit.Common.Data;
using DragonFruit.Common.Data.Services;
using DragonFruit.Six.Api.Entities;
Expand All @@ -28,5 +29,15 @@ public static IEnumerable<OperatorStats> GetOperatorInfo(this ApiClient client)
var request = new OperatorDataRequest(null);
return client.Perform<IEnumerable<OperatorStats>>(request);
}

/// <summary>
/// Gets the <see cref="IEnumerable{T}"/> needed to use the <see cref="OperatorStatsRequest"/>
/// </summary>
/// <param name="client">The <see cref="ApiClient"/> to use</param>
public static Task<IEnumerable<OperatorStats>> GetOperatorInfoAsync(this ApiClient client)
{
var request = new OperatorDataRequest(null);
return client.PerformAsync<IEnumerable<OperatorStats>>(request);
}
}
}

0 comments on commit d2dc94c

Please sign in to comment.