Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ const result = await strava.uploads.post({
});
```

### Large numeric IDs (BigInt support)

Strava activity IDs and other numeric identifiers can exceed JavaScript's `Number.MAX_SAFE_INTEGER` (2^53 - 1). To preserve precision, this library uses [json-bigint](https://www.npmjs.com/package/json-bigint) to parse API responses. Since `JSONbig.parse()` is called with default options, large integers are returned as [bignumber.js](https://www.npmjs.com/package/bignumber.js) `BigNumber` objects (not native JavaScript `BigInt`).

When working with these IDs, you may need to convert them to strings for display or storage:

```js
const activity = await strava.activities.get({ id: '12345678901234567' });
console.log(activity.id.toString()); // Use .toString() for display or JSON serialization
```

### Rate limits

According to Strava's API each response contains information about rate limits.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strava-v3",
"version": "4.0.0",
"version": "4.0.1",
"description": "Simple wrapper for Strava v3 API",
"main": "index.js",
"types": "index.d.ts",
Expand Down