This repository was archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Albie edited this page Jul 30, 2020
·
12 revisions
Dragon6 API takes the complication of Ubisoft's stats system and strips it down into an easy to follow sequence of events:
- Create your own inheritance of
Dragon6Clientwith an override for getting the token (see StatsClient.cs) - this should be preserved as a single instance for the lifetime of the process (using it as aSingletonservice in dependency injection or as a static variable is the best way to do this) - Use said instance of your
Dragon6Clientto lookup a user (by name, platform id or user id) through the extension methodsGetUser()orGetUsers() - Use User's
AccountInfoto lookup stats (via the client instance and the extension methodsGetStats,GetOperatorStats,GetWeaponStats,GetSeasonStats)
The Get*() methods require a
using DragonFruit.Six.API.Data.Extensionsstatement added to each.csfile you use them in
When the token expires the Dragon6Client will auto-renew it when the next request after the token expired is made.
If the extension methods don't quite achieve what you want to do, you can create your own custom requests (see possible inheritances) and pass them through the Dragon6Client.Perform<Result>(reuqest)