#
Class: Userindex.User
All user team related queries require userID API https://fantasy.premierleague.com/api/entry/3586135/
example
#
Hierarchy- User
#
Implements#
Constructors#
constructor+ new User(userId
: number): User
#
Parameters:Name | Type |
---|---|
userId | number |
Returns: User
Defined in: models/user.ts:33
#
Properties#
userId• userId: number
Implementation of: UserProperties.userId
Defined in: models/user.ts:33
#
Methods#
getActiveChipsâ–¸ getActiveChips(gw?
: number[]): Promise<ActiveChipsDelegate>
Returns an array containing the user’s active chip for each gw, or the active chip of the given gameweeks.
example
#
Parameters:Name | Type |
---|---|
gw? | number[] |
Returns: Promise<ActiveChipsDelegate>
Defined in: models/user.ts:203
#
getAutomaticSubsâ–¸ getAutomaticSubs(gw?
: number[]): Promise<AutomaticSubsDelegate>
Get Automatic Substitutions Returns an array containing the user’s active chip for each gameweek, or the active chip of the given gameweeks.
example
#
Parameters:Name | Type |
---|---|
gw? | number[] |
Returns: Promise<AutomaticSubsDelegate>
Defined in: models/user.ts:266
#
getChipsHistoryâ–¸ getChipsHistory(): Promise<ChipsHistoryDelegate[]>
Return user's chip history
example
Returns: Promise<ChipsHistoryDelegate[]>
Defined in: models/user.ts:186
#
getCupMatchesâ–¸ getCupMatches(gw?
: number[]): Promise<CupMatchesDelegate>
Returns an object of all the user’s cup matches, or of the cup match in the given gameweeks (gameweek 17 and onwards).
example
#
Parameters:Name | Type |
---|---|
gw? | number[] |
Returns: Promise<CupMatchesDelegate>
Defined in: models/user.ts:344
#
getCupStatusâ–¸ getCupStatus(): Promise<CupStatusDelegate>
Returns the user’s cup status.
example
Returns: Promise<CupStatusDelegate>
Defined in: models/user.ts:322
#
getDetailsâ–¸ getDetails(): Promise<UserDelegate[]>
Return user's team details
example
Returns: Promise<UserDelegate[]>
Defined in: models/user.ts:45
#
getPicksâ–¸ getPicks(gw?
: number[]): Promise<PickHistoryDelegate>
Return user's team player picks history
example
remark
Will return picks for the requested GWs. If empty, will return for all GWs
#
Parameters:Name | Type |
---|---|
gw? | number[] |
Returns: Promise<PickHistoryDelegate>
Defined in: models/user.ts:134
#
getSeasonsHistoryâ–¸ getSeasonsHistory(): Promise<SeasonsHistoryDelegate[]>
Return user's previous history
example
Returns: Promise<SeasonsHistoryDelegate[]>
Defined in: models/user.ts:384
#
getTransfersâ–¸ getTransfers(gw?
: number[]): Promise<TransferDelegate[]>
Return user's team transfer history
example
#
Parameters:Name | Type |
---|---|
gw? | number[] |
Returns: Promise<TransferDelegate[]>
Defined in: models/user.ts:97
#
gwHistoryâ–¸ gwHistory(gw?
: number[]): Promise<GWHistoryDelegate[]>
Returns array of requested Gameweek history, if not, returns all gw
example
#
Parameters:Name | Type |
---|---|
gw? | number[] |
Returns: Promise<GWHistoryDelegate[]>
Defined in: models/user.ts:62