File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,15 @@ This token must be provided to authenticate your requests to the API.
40
40
When you initialize the SDK, you can set the access token as follows as well as a few more variables:
41
41
42
42
``` ts
43
- const sdk = new TorboxApi ({ token: ' YOUR_TOKEN' });
43
+ const sdk = new TorboxApi ({ token: ' YOUR_TOKEN' , baseUrl: ' https://api.torbox.app ' });
44
44
```
45
45
46
46
If you need to set or update the access token after initializing the SDK, you can use:
47
47
48
48
``` ts
49
49
const sdk = new TorboxApi ();
50
50
sdk .token = ' YOUR_TOKEN' ;
51
+ sdk .baseUrl = ' https://api.torbox.app' ;
51
52
```
52
53
53
54
## Setting a Custom Timeout
@@ -68,6 +69,7 @@ import { TorboxApi } from 'torbox-api';
68
69
(async () => {
69
70
const torboxApi = new TorboxApi ({
70
71
token: ' YOUR_TOKEN' ,
72
+ baseUrl: ' https://api.torbox.app' ;
71
73
});
72
74
73
75
const { data } = await torboxApi .general .getUpStatus ();
You can’t perform that action at this time.
0 commit comments