Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UserResource

Hierarchy

Index

Constructors

constructor

Properties

Protected basePath

basePath: string

Protected httpService

httpService: HTTPService

Protected resourcePath

resourcePath: string

Methods

getMembershipDataById

  • Returns a list of accounts associated with the supplied membership ID and membership type. This will include all linked accounts (even when hidden) if supplied credentials permit it.

    traveler.user
     .getMembershipDataById('membershipId', BungieMembershipType.TigerPsn, 'oauthAccessToken')
     .then(response => {
       console.log(response);
     })
     .catch(err => {
       console.log(err);
     });
    memberof

    UserResource

    Parameters

    Returns Promise<ServerResponse<UserMembershipData>>

getMembershipDataForCurrentUser

  • Returns a list of accounts associated with signed in user. This is useful for OAuth implementations that do not give you access to the token response.

    traveler.user
     .getMembershipDataForCurrentUser('oauthAccessToken')
     .then(response => {
       console.log(response);
     })
     .catch(err => {
       console.log(err);
     });
    memberof

    UserResource

    Parameters

    • oauthAccesstoken: string

    Returns Promise<ServerResponse<UserMembershipData>>