@yaelouuu/fortnite-api 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,6 +57,14 @@ export declare class EventsResource {
57
57
  * @returns Player's event performance data
58
58
  */
59
59
  getPlayerEventData(eventId: string, eventWindowId: string, accountId: string, fortniteToken?: string): Promise<PlayerEventData>;
60
+ /**
61
+ * Find a player's rank and surrounding entries in an event window leaderboard.
62
+ * Works for any placement including beyond top 10k. No user token required.
63
+ * @param eventId - Event ID
64
+ * @param eventWindowId - Event window ID
65
+ * @param accountId - Epic account ID of the player to look up
66
+ */
67
+ getPlayerLeaderboard(eventId: string, eventWindowId: string, accountId: string): Promise<EventLeaderboard>;
60
68
  /**
61
69
  * Get the raw token set for one or more players.
62
70
  * Tokens are eligibility flags earned by participating in tournaments
@@ -94,6 +94,16 @@ class EventsResource {
94
94
  }
95
95
  return this.client.request(`/events/${eventId}/windows/${eventWindowId}/players/${accountId}`, { headers }, "v2");
96
96
  }
97
+ /**
98
+ * Find a player's rank and surrounding entries in an event window leaderboard.
99
+ * Works for any placement including beyond top 10k. No user token required.
100
+ * @param eventId - Event ID
101
+ * @param eventWindowId - Event window ID
102
+ * @param accountId - Epic account ID of the player to look up
103
+ */
104
+ async getPlayerLeaderboard(eventId, eventWindowId, accountId) {
105
+ return this.client.request(`/events/${eventId}/windows/${eventWindowId}/leaderboard/player?accountId=${encodeURIComponent(accountId)}`, {}, "v2");
106
+ }
97
107
  /**
98
108
  * Get the raw token set for one or more players.
99
109
  * Tokens are eligibility flags earned by participating in tournaments
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaelouuu/fortnite-api",
3
- "version": "7.0.0",
3
+ "version": "7.1.0",
4
4
  "description": "SDK for Fortnite API - api-fortnite.com - Author : Yael Brinkert",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",