Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fpl-api-node

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fpl-api-node - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

226

lib/index.d.ts

@@ -6,3 +6,3 @@ /**

*/
export declare function getEntry(entryId: number): Promise<Entry>;
export declare function getEntry(entryId: number): Promise<IApiEntry>;
/**

@@ -14,3 +14,3 @@ * Entry event. Details of a particular event (or gameweek): A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/entry/${id}/event/${eventNumber}

*/
export declare function getEntryEvent(entryId: number, eventNumber: number): Promise<EntryEvent>;
export declare function getEntryEvent(entryId: number, eventNumber: number): Promise<IApiEntryEvent>;
/**

@@ -21,3 +21,3 @@ * Entry transfers: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/entry/${id}/transfers

*/
export declare function getEntryTransfers(entryId: number): Promise<EntryTransfers>;
export declare function getEntryTransfers(entryId: number): Promise<IApiEntryTransfers>;
/**

@@ -27,3 +27,3 @@ * All static game data: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/bootstrap-static

*/
export declare function getAllStaticData(): Promise<AllStaticData>;
export declare function getAllStaticData(): Promise<IApiAllStaticData>;
/**

@@ -33,3 +33,3 @@ * Teams (Premier Leaugue clubs): A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/teams

*/
export declare function getTeams(): Promise<Team[]>;
export declare function getTeams(): Promise<IApiTeam[]>;
/**

@@ -39,3 +39,3 @@ * Elements (players): A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/elements

*/
export declare function getElements(): Promise<Element[]>;
export declare function getElements(): Promise<IApiElement[]>;
/**

@@ -45,3 +45,3 @@ * Element types: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/elements-types

*/
export declare function getElementTypes(): Promise<ElementType[]>;
export declare function getElementTypes(): Promise<IApiElementType[]>;
/**

@@ -51,3 +51,3 @@ * Game settings: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/game-settings

*/
export declare function getGameSettings(): Promise<GameSettings>;
export declare function getGameSettings(): Promise<IApiGameSettings>;
/**

@@ -57,3 +57,15 @@ * Event /gameweek details: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/event/${eventNumber}/live

*/
export declare function getEvent(eventNumber: number): Promise<Event>;
export declare function getEvent(eventNumber: number): Promise<IApiEvent>;
declare var _default: {
getEntry: (entryId: number) => Promise<IApiEntry>;
getEntryEvent: (entryId: number, eventNumber: number) => Promise<IApiEntryEvent>;
getEntryTransfers: (entryId: number) => Promise<IApiEntryTransfers>;
getAllStaticData: () => Promise<IApiAllStaticData>;
getTeams: () => Promise<IApiTeam[]>;
getElements: () => Promise<IApiElement[]>;
getElementTypes: () => Promise<IApiElementType[]>;
getGameSettings: () => Promise<IApiGameSettings>;
getEvent: (eventNumber: number) => Promise<IApiEvent>;
};
export default _default;
/**

@@ -64,17 +76,17 @@ * Classic league standings: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/leagues-classic-standings/${id}

*/
export declare function getClassicLeagueStandings(leagueId: number): Promise<League>;
export interface AllStaticData {
phases: GamePhase[];
elements: Element[];
'game-settings': Game;
export declare function getClassicLeagueStandings(leagueId: number): Promise<IApiLeague>;
export interface IApiAllStaticData {
phases: IApiGamePhase[];
elements: IApiElement[];
'game-settings': IApiGame;
'total-players': number;
teams: Team[];
element_types: ElementType[];
events: GameEvent[];
teams: IApiTeam[];
element_types: IApiElementType[];
events: IApiGameEvent[];
}
export interface GameSettings {
game: Game;
element_type: GameElement;
export interface IApiGameSettings {
game: IApiGame;
element_type: IApiGameElement;
}
export interface GameEvent {
export interface IApiGameEvent {
id: number;

@@ -95,3 +107,3 @@ name: string;

}
export interface Game {
export interface IApiGame {
scoring_ea_index: number;

@@ -169,3 +181,3 @@ league_prefix_public: string;

league_join_public_max: number;
formations: GameFormations;
formations: IApiGameFormations;
league_points_h2h_lose: number;

@@ -191,3 +203,3 @@ currency_decimal_places: number;

}
export interface GameElement {
export interface IApiGameElement {
scoring_clean_sheets: number;

@@ -202,3 +214,3 @@ squad_min_play: number;

}
export interface GamePhase {
export interface IApiGamePhase {
id: number;

@@ -209,3 +221,3 @@ name: string;

}
export interface GameFormations {
export interface IApiGameFormations {
'1-5-2-3': number[][];

@@ -221,3 +233,3 @@ '1-5-3-2': number[][];

}
export interface Element {
export interface IApiElement {
id: number;

@@ -281,3 +293,3 @@ photo: string;

}
export interface ElementType {
export interface IApiElementType {
id: number;

@@ -289,6 +301,6 @@ singular_name: string;

}
export interface Team {
export interface IApiTeam {
id: number;
current_event_fixture: TeamFixture[];
next_event_fixture: TeamFixture[];
current_event_fixture: IApiTeamFixture[];
next_event_fixture: IApiTeamFixture[];
name: string;

@@ -315,3 +327,3 @@ code: number;

}
export interface TeamFixture {
export interface IApiTeamFixture {
is_home: boolean;

@@ -324,9 +336,9 @@ month: number;

}
export interface League {
new_entries: LeagueStandings;
league: LeagueDetails;
standings: LeagueStandings;
export interface IApiLeague {
new_entries: IApiLeagueStandings;
league: IApiLeagueDetails;
standings: IApiLeagueStandings;
update_status: number;
}
export interface LeagueDetails {
export interface IApiLeagueDetails {
id: number;

@@ -348,8 +360,8 @@ leagueban_set: any[];

}
export interface LeagueStandings {
export interface IApiLeagueStandings {
has_next: boolean;
number: number;
results: LeaguePositions[];
results: IApiLeaguePositions[];
}
export interface LeaguePositions {
export interface IApiLeaguePositions {
id: number;

@@ -370,25 +382,25 @@ entry_name: string;

}
export interface Entry {
chips: EntryChip[];
entry: EntryDetails;
leagues: EntryLeagues;
season: EntrySeason[];
history: EntryHistory[];
export interface IApiEntry {
chips: IApiEntryChip[];
entry: IApiEntryDetails;
leagues: IApiEntryLeagues;
season: IApiEntrySeason[];
history: IApiEntryHistory[];
}
export interface EntryEvent {
leagues: EntryLeagues;
entry_history: EntryHistory;
export interface IApiEntryEvent {
leagues: IApiEntryLeagues;
entry_history: IApiEntryHistory;
ce: number;
automatic_subs: EntryAutomaticSub[];
fixtures: Fixture[];
automatic_subs: IApiEntryAutomaticSub[];
fixtures: IApiFixture[];
can_change_captain: boolean;
manager_subs: any[];
picks: EntryPick[];
picks: IApiEntryPick[];
own_entry: boolean;
state: EntryState;
state: IApiEntryState;
points: number;
entry: Entry;
entry: IApiEntry;
active_chip: string;
}
export interface EntryState {
export interface IApiEntryState {
event: number;

@@ -400,3 +412,3 @@ sub_state: string;

}
export interface EntryPick {
export interface IApiEntryPick {
element: number;

@@ -413,6 +425,6 @@ position: number;

element_type: number;
stats: Stats;
stats: IApiStats;
multiplier: number;
}
export interface EntryAutomaticSub {
export interface IApiEntryAutomaticSub {
id: number;

@@ -424,3 +436,3 @@ element_in: number;

}
export interface EntryDetails {
export interface IApiEntryDetails {
id: number;

@@ -457,3 +469,3 @@ player_first_name: string;

}
export interface EntryLeague {
export interface IApiEntryLeague {
id: number;

@@ -483,8 +495,8 @@ entry_rank: number;

}
export interface EntryLeagues {
cup: EntryLeague[];
h2h: EntryLeague[];
classic: EntryLeague[];
export interface IApiEntryLeagues {
cup: IApiEntryLeague[];
h2h: IApiEntryLeague[];
classic: IApiEntryLeague[];
}
export interface EntryChip {
export interface IApiEntryChip {
played_time_formatted: string;

@@ -498,3 +510,3 @@ status: string;

}
export interface EntrySeason {
export interface IApiEntrySeason {
id: number;

@@ -507,3 +519,3 @@ season_name: string;

}
export interface EntryHistory {
export interface IApiEntryHistory {
id: number;

@@ -525,9 +537,9 @@ movement: string;

}
export interface EntryTransfers {
wildcards: EntryWildcard[];
entry: Entry;
leagues: EntryLeagues;
history: EntryTransferHistory[];
export interface IApiEntryTransfers {
wildcards: IApiEntryWildcard[];
entry: IApiEntry;
leagues: IApiEntryLeagues;
history: IApiEntryTransferHistory[];
}
export interface EntryWildcard {
export interface IApiEntryWildcard {
played_time_formatted: string;

@@ -541,3 +553,3 @@ status: string;

}
export interface EntryTransferHistory {
export interface IApiEntryTransferHistory {
id: number;

@@ -553,3 +565,3 @@ time_formatted: string;

}
export interface Stats {
export interface IApiStats {
yellow_cards: number;

@@ -575,3 +587,3 @@ own_goals: number;

}
export interface Fixture {
export interface IApiFixture {
id: number;

@@ -583,3 +595,3 @@ kickoff_time_formatted: string;

deadline_time_formatted: string;
stats: FixtureStats;
stats: IApiFixtureStats;
code: number;

@@ -597,40 +609,38 @@ kickoff_time: Date;

}
export interface FixtureStats {
goals_scored: FixtureStatHomeAndAway;
assists: FixtureStatHomeAndAway;
own_goals: FixtureStatHomeAndAway;
penalties_saved: FixtureStatHomeAndAway;
penalties_missed: FixtureStatHomeAndAway;
yellow_cards: FixtureStatHomeAndAway;
red_cards: FixtureStatHomeAndAway;
saves: FixtureStatHomeAndAway;
bonus: FixtureStatHomeAndAway;
bps: FixtureStatHomeAndAway;
export interface IApiFixtureStats {
goals_scored: IApiFixtureStatHomeAndAway;
assists: IApiFixtureStatHomeAndAway;
own_goals: IApiFixtureStatHomeAndAway;
penalties_saved: IApiFixtureStatHomeAndAway;
penalties_missed: IApiFixtureStatHomeAndAway;
yellow_cards: IApiFixtureStatHomeAndAway;
red_cards: IApiFixtureStatHomeAndAway;
saves: IApiFixtureStatHomeAndAway;
bonus: IApiFixtureStatHomeAndAway;
bps: IApiFixtureStatHomeAndAway;
}
export interface FixtureStatHomeAndAway {
a: FixtureStatValue[];
h: FixtureStatValue[];
export interface IApiFixtureStatHomeAndAway {
a: IApiFixtureStatValue[];
h: IApiFixtureStatValue[];
}
export interface FixtureStatValue {
export interface IApiFixtureStatValue {
value: number;
element: number;
}
export interface Event {
fixtures: Fixture[];
elements: EventElements;
export interface IApiEvent {
fixtures: IApiFixture[];
elements: IApiEventElements;
}
export interface EventElements {
[key: number]: EventElementDetails;
export interface IApiEventElements {
[key: number]: {
explain: IApiEventElementsExplain[];
stats: IApiStats;
};
}
export interface EventElementDetails {
explain: EventElementDetailsExplanation[];
stats: Stats;
export interface IApiEventElementsExplain {
[key: string]: {
points: number;
name: string;
value: number;
};
}
export interface EventElementDetailsExplanation {
[key: string]: EventElementDetailsExplanationDetails;
}
export interface EventElementDetailsExplanationDetails {
points: number;
name: string;
value: number;
}

@@ -100,2 +100,14 @@ 'use strict';

exports.getEvent = getEvent;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
getEntry,
getEntryEvent,
getEntryTransfers,
getAllStaticData,
getTeams,
getElements,
getElementTypes,
getGameSettings,
getEvent
};
/**

@@ -102,0 +114,0 @@ * Classic league standings: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/leagues-classic-standings/${id}

{
"name": "fpl-api-node",
"version": "1.0.4",
"description": "A simple node wrapper for the fantasy.premierleague.com restful web api",
"version": "1.0.5",
"description": "A simple node wrapper for the Fantasy Premier League (fantasy.premierleague.com) restful web api",
"main": "lib/index.js",

@@ -33,6 +33,3 @@ "typings": "lib/index",

},
"devDependencies": {
"tslint": "^4.0.2",
"typescript": "^2.1.4"
}
"devDependencies": {}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc