SW Combine SDK
    Preparing search index...

    Character privileges resource

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Get a specific privilege @requires_auth Yes @requires_scope CHARACTER_PRIVILEGES

      Parameters

      • options: { faction_id?: number; privilege: string; privilegeGroup: string; uid: string }
        • Optionalfaction_id?: number

          Optional faction ID to view privileges for (defaults to token owner's primary faction)

        • privilege: string

          Privilege name

        • privilegeGroup: string

          Privilege group name

        • uid: string

          Character UID

      Returns Promise<PrivilegeDetail>

    • Get character's privileges organized by group @requires_auth Yes @requires_scope CHARACTER_PRIVILEGES

      Parameters

      • options: GetCharacterPrivilegesOptions & { faction_id?: number }
        • uid: string
        • Optionalfaction_id?: number

          Optional faction ID (defaults to token owner's primary faction)

      Returns Promise<PrivilegesResponse>

      Privileges response with groups and metadata

      const privs = await client.character.privileges.list({ uid: '1:12345' });
      privs.privilegegroup.forEach(g => {
      console.log(`${g.attributes.name}: ${g.attributes.count} privileges`);
      });
    • Update a specific privilege (grant or revoke)

      Parameters

      • options: {
            faction_id?: number;
            privilege: string;
            privilegeGroup: string;
            revoke?: boolean;
            uid: string;
        }
        • Optionalfaction_id?: number

          Optional faction ID to view privileges for (defaults to token owner's primary faction)

        • privilege: string

          Privilege name

        • privilegeGroup: string

          Privilege group name

        • Optionalrevoke?: boolean

          Set to true to revoke the privilege, false/undefined to grant it

        • uid: string

          Character UID

      Returns Promise<unknown>