tiktok-live-api 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +8 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -56,14 +56,14 @@ That's it. **No complex setup, no protobuf, no reverse engineering, no breakages
56
56
 
57
57
  ---
58
58
 
59
- ## šŸš€ Try It Now — 60-Second Live Demo
59
+ ## šŸš€ Try It Now — 5-Minute Live Demo
60
60
 
61
- Copy-paste this into a file and run it. Connects to a live TikTok stream, prints every event for 60 seconds, then exits. Works on the free Sandbox tier.
61
+ Copy-paste this into a file and run it. Connects to a live TikTok stream, prints every event for 5 minutes, then exits. Works on the free Sandbox tier.
62
62
 
63
63
  **Save as `demo.mjs` and run with `node demo.mjs`:**
64
64
 
65
65
  ```javascript
66
- // demo.mjs — TikTok LIVE in 60 seconds
66
+ // demo.mjs — TikTok LIVE in 5 minutes
67
67
  // npm install tiktok-live-api
68
68
  import { TikTokLive } from 'tiktok-live-api';
69
69
 
@@ -80,11 +80,11 @@ client.on('member', e => { events++; console.log(`šŸ‘‹ ${e.user.uniqueId} j
80
80
  client.on('follow', e => { events++; console.log(`āž• ${e.user.uniqueId} followed`); });
81
81
  client.on('roomUserSeq', e => { events++; console.log(`šŸ‘€ Viewers: ${e.viewerCount}`); });
82
82
 
83
- client.on('connected', () => console.log(`\nāœ… Connected to @${LIVE_USERNAME} — listening for 60s...\n`));
83
+ client.on('connected', () => console.log(`\nāœ… Connected to @${LIVE_USERNAME} — listening for 5 min...\n`));
84
84
  client.on('disconnected', () => console.log(`\nšŸ“Š Done! Received ${events} events.\n`));
85
85
 
86
86
  client.connect();
87
- setTimeout(() => { client.disconnect(); }, 60_000);
87
+ setTimeout(() => { client.disconnect(); }, 300_000);
88
88
  ```
89
89
 
90
90
  <details>
@@ -101,7 +101,7 @@ const LIVE_USERNAME = 'tv_asahi_news';
101
101
  const ws = new WebSocket(`wss://api.tik.tools?uniqueId=${LIVE_USERNAME}&apiKey=${API_KEY}`);
102
102
  let events = 0;
103
103
 
104
- ws.on('open', () => console.log(`\nāœ… Connected to @${LIVE_USERNAME} — listening for 60s...\n`));
104
+ ws.on('open', () => console.log(`\nāœ… Connected to @${LIVE_USERNAME} — listening for 5 min...\n`));
105
105
  ws.on('message', (raw) => {
106
106
  const msg = JSON.parse(raw);
107
107
  events++;
@@ -119,7 +119,7 @@ ws.on('message', (raw) => {
119
119
  });
120
120
  ws.on('close', () => console.log(`\nšŸ“Š Done! Received ${events} events.\n`));
121
121
 
122
- setTimeout(() => ws.close(), 60_000);
122
+ setTimeout(() => ws.close(), 300_000);
123
123
  ```
124
124
 
125
125
  </details>
@@ -339,7 +339,7 @@ client.on('gift', (event: GiftEvent) => {
339
339
 
340
340
  | Tier | Requests/Day | WebSocket Connections | Price |
341
341
  |------|-------------|----------------------|-------|
342
- | Sandbox | 50 | 1 (60s) | Free |
342
+ | Sandbox | 50 | 1 (5 min) | Free |
343
343
  | Basic | 10,000 | 3 (8h) | $7/week |
344
344
  | Pro | 75,000 | 50 (8h) | $15/week |
345
345
  | Ultra | 300,000 | 500 (8h) | $45/week |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiktok-live-api",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Unofficial TikTok LIVE API Client — Real-time chat, gifts, viewers, battles, and AI live captions from any TikTok livestream. Managed WebSocket API with 99.9% uptime.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",