From 392ab69eb45531303fdfadd0dd968bc0b095bb95 Mon Sep 17 00:00:00 2001 From: tringler Date: Fri, 21 Jun 2024 13:30:28 +0200 Subject: [PATCH] Update README.md --- README.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7c48381..b7dc28c 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,8 @@ var loginResponse = await client.LoginAsync(loginDetails, provider); Example implementation of ITwoFactorCodeProvider interface ```csharp - ... - ITwoFactorCodeProvider provider = new FutAuth(); - ... - + ITwoFactorCodeProvider provider = new FutAuth(); + public class FutAuth : ITwoFactorCodeProvider { public TaskCompletionSource taskResult = new TaskCompletionSource(); @@ -68,6 +66,11 @@ Example implementation of ITwoFactorCodeProvider interface } ``` +In order to avoid to enter OTP at each session you can overload it with a `CookieHandler` +```csharp +FutClient client = new FutClient(cookieContainer); +``` + ### Player search All the search parameters are optional. If none are specified, you will get the 1st page of results with no filters applied. @@ -91,6 +94,23 @@ foreach (var auctionInfo in searchResponse.AuctionInfo) } ``` +It is also possible to search for a definition (i.e. a Herocard of a player) + +```csharp +var searchParameters = new PlayerSearchParameters +{ + Page = 1, + ResourceId = , //see section Get Definitions + MaxBuy = 2500 +}; + +var searchResponse = await client.SearchAsync(searchParameters); +foreach (var auctionInfo in searchResponse.AuctionInfo) +{ + // Handle auction data +} +``` + ### Trade status Retrieves the trade status of the auctions of interest.