Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tringler authored Jun 21, 2024
1 parent eeec0cf commit 392ab69
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> taskResult = new TaskCompletionSource<string>();
Expand All @@ -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.
Expand All @@ -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 = <AssetId>, //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.
Expand Down

0 comments on commit 392ab69

Please sign in to comment.