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

User Lookup

Albie edited this page Aug 5, 2020 · 1 revision

Overview

Dragon6 can lookup a user from 3 different components:

Identifier Name Example LookupMethod Notes
Username PaPa.Curry LookupMethod.Name
Ubisoft Id 14c01250-ef26-4a32-92ba-e04aa557d619 LookupMethod.UserId Permanent id - if you plan on saving user info, save this one
Platform Id 7729747787525340203 LookupMethod.PlatformId On consoles this can return all ubisoft accounts linked to the user's xbox live/psn.

Notes

  • The Profile Id is for getting stats and won't help you reverse a user's profile info
  • If you lookup by PlatformId, use the GetUsers overload and check the results. there could be a chance the server returns the items in a different order and you get the wrong account
  • We support 3 platforms: PC, XB1 and PSN. While there are others (twitch is one) you can't play by logging into that platform so it's pointless
  • d6Client.GetUser() throws when it fails to find a user

Example

private AccountInfo LookupUserByName(Platform platform, string userName)
{
    //you could lookup the username in a cache and then preserve the result for 12 hours or something?
    return d6Client.GetUser(platform, LookupMethod.Name, userName);
}