Class: PssUserHistory

Classes_API~PssUserHistory(collectionMetadata, user, alliance)

Represents a snapshot of a PSS PssUser (player) including information on the Collection and the PssUser's Alliance, if applicable.

Constructor

new PssUserHistory(collectionMetadata, user, alliance)

constructor - Creates an instance of UserHistory based on the given data.

Parameters:
Name Type Default Description
collectionMetadata CollectionMetadata

The metadata of the Collection.

user PssUser

The PssUser (player) recorded in this UserHistory.

alliance PssAlliance null

The PssAlliances (fleets) of the PssUser recorded in this UserHistory. May be null, if the PssUser doesn't belong to an Alliance.

Source:

Members

alliance :PssAlliance

alliance - The PssAlliances (fleets) of the PssUser recorded in this UserHistory. Might be null, if the PssUser doesn't belong to an Alliance.

Type:
  • PssAlliance
Source:

collection :CollectionMetadata

collection - The metadata of the Collection this PSS UserHistory is part of.

Type:
  • CollectionMetadata
Source:

user :PssUser

user - The PssUser (player) recorded in this UserHistory.

Type:
  • PssUser
Source:

Methods

(static) fromJson(json)

Creates an instance of UserHistory from an object parsed from the JSON returned by the PSS Fleet Data API.

Parameters:
Name Type Description
json object

A UserHistory as parsed from the response of the API.

Properties
Name Type Attributes Description
collection object

The metadata of the Collection.

user Array

The PssUser (player) recorded in this UserHistory.

fleet Array <optional>

The PssAlliances (fleets) of the PssUser recorded in this UserHistory. May be null, if the PssUser doesn't belong to an Alliance.

Source:
Returns:

PssUserHistory - An new instance of PssUserHistory.