Class: Gameweek#

index.Gameweek

API: https://fantasy.premierleague.com/api/bootstrap-static/

example

const gw = new Gameweek(1)

Hierarchy#

  • Gameweek

Constructors#

constructor#

+ new Gameweek(id: number | number[]): Gameweek

Parameters:#

NameType
idnumber | number[]

Returns: Gameweek

Defined in: models/gameweek.ts:18

Properties#

id#

• id: number | number[]

Defined in: models/gameweek.ts:18

Methods#

getDetails#

â–¸ getDetails(): Promise<GameweekDelegate | GameweekDelegate[]>

Returns object of requested gameweek or array of gameweeks.

example

const gameweek = await new Gameweek(1).getDetails()

example

const gameweeks = await new Gameweek([1, 2]).getDetails()

Returns: Promise<GameweekDelegate | GameweekDelegate[]>

Defined in: models/gameweek.ts:35


getFixtures#

â–¸ getFixtures(): Promise<FixtureDelegate[]>

Returns array of fixtures.

example

const fixtures = await new Gameweek(1).getFixtures()

Returns: Promise<FixtureDelegate[]>

Defined in: models/gameweek.ts:71