Skip to content

Commit 6162e55

Browse files
committed
fix: adds base_url in readme
1 parent 290c8d4 commit 6162e55

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ This token must be provided to authenticate your requests to the API.
4040
When you initialize the SDK, you can set the access token as follows as well as a few more variables:
4141

4242
```ts
43-
const sdk = new TorboxApi({ token: 'YOUR_TOKEN' });
43+
const sdk = new TorboxApi({ token: 'YOUR_TOKEN', baseUrl: 'https://api.torbox.app' });
4444
```
4545

4646
If you need to set or update the access token after initializing the SDK, you can use:
4747

4848
```ts
4949
const sdk = new TorboxApi();
5050
sdk.token = 'YOUR_TOKEN';
51+
sdk.baseUrl = 'https://api.torbox.app';
5152
```
5253

5354
## Setting a Custom Timeout
@@ -68,6 +69,7 @@ import { TorboxApi } from 'torbox-api';
6869
(async () => {
6970
const torboxApi = new TorboxApi({
7071
token: 'YOUR_TOKEN',
72+
baseUrl: 'https://api.torbox.app';
7173
});
7274

7375
const { data } = await torboxApi.general.getUpStatus();

0 commit comments

Comments
 (0)