@wise-old-man/utils 2.1.19-rc1 → 2.2.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.
- package/dist/index.d.ts +8 -0
- package/dist/index.js +7 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2144,6 +2144,14 @@ declare class PlayersClient extends BaseAPIClient {
|
|
|
2144
2144
|
* @returns A list of snapshots.
|
|
2145
2145
|
*/
|
|
2146
2146
|
getPlayerSnapshots(username: string, options?: TimeRangeFilter): Promise<FormattedSnapshot[]>;
|
|
2147
|
+
/**
|
|
2148
|
+
* Fetches all of the player's past snapshots' timeline.
|
|
2149
|
+
* @returns A list of timeseries data (value, date)
|
|
2150
|
+
*/
|
|
2151
|
+
getPlayerSnapshotTimeline(username: string, metric: Metric, options?: TimeRangeFilter): Promise<{
|
|
2152
|
+
value: number;
|
|
2153
|
+
date: Date;
|
|
2154
|
+
}[]>;
|
|
2147
2155
|
/**
|
|
2148
2156
|
* Fetches all of the player's approved name changes.
|
|
2149
2157
|
* @returns A list of name changes.
|
package/dist/index.js
CHANGED
|
@@ -408,6 +408,13 @@ class PlayersClient extends BaseAPIClient {
|
|
|
408
408
|
getPlayerSnapshots(username, options) {
|
|
409
409
|
return this.getRequest(`/players/${username}/snapshots`, options);
|
|
410
410
|
}
|
|
411
|
+
/**
|
|
412
|
+
* Fetches all of the player's past snapshots' timeline.
|
|
413
|
+
* @returns A list of timeseries data (value, date)
|
|
414
|
+
*/
|
|
415
|
+
getPlayerSnapshotTimeline(username, metric, options) {
|
|
416
|
+
return this.getRequest(`/players/${username}/snapshots/timeline`, Object.assign(Object.assign({}, options), { metric }));
|
|
417
|
+
}
|
|
411
418
|
/**
|
|
412
419
|
* Fetches all of the player's approved name changes.
|
|
413
420
|
* @returns A list of name changes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise-old-man/utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A JavaScript/TypeScript client that interfaces and consumes the Wise Old Man API, an API that tracks and measures players' progress in Old School Runescape.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wiseoldman",
|