@tiktool/live 2.11.0 → 2.11.1
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/README.md +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -349,10 +349,29 @@ live.on('battle', (e) => {
|
|
|
349
349
|
| `connect()` | `Promise<void>` | Connect to livestream |
|
|
350
350
|
| `disconnect()` | `void` | Disconnect |
|
|
351
351
|
| `getStreamUrl()` | `Promise<StreamInfo>` | Get FLV/HLS playback URLs for the live video |
|
|
352
|
+
| `getUserProfile(uniqueId?)` | `Promise<UserProfile>` | Resolve any TikTok username → numeric `id`, `secUid`, nickname, bio, avatars, follower stats |
|
|
352
353
|
| `connected` | `boolean` | Connection status |
|
|
353
354
|
| `eventCount` | `number` | Total events received |
|
|
354
355
|
| `roomId` | `string` | Current room ID |
|
|
355
356
|
|
|
357
|
+
### Static methods (no connection required)
|
|
358
|
+
|
|
359
|
+
```typescript
|
|
360
|
+
// Get numeric TikTok user ID + full profile for any @username (Pro tier+)
|
|
361
|
+
const profile = await TikTokLive.getUserProfile({
|
|
362
|
+
uniqueId: 'dalga.ahmedov',
|
|
363
|
+
apiKey: 'YOUR_KEY',
|
|
364
|
+
});
|
|
365
|
+
profile.id; // "7355610677036581896" ← numeric streamer ID
|
|
366
|
+
profile.nickname; // "🤍DENIZ🖤🌊"
|
|
367
|
+
profile.secUid; // signed TikTok user identifier
|
|
368
|
+
profile.stats.followerCount; // 7945
|
|
369
|
+
profile.avatarLarger; // CDN URL
|
|
370
|
+
|
|
371
|
+
// Get FLV/HLS playback URLs for any creator
|
|
372
|
+
const stream = await TikTokLive.getStreamUrl({ uniqueId, apiKey });
|
|
373
|
+
```
|
|
374
|
+
|
|
356
375
|
### REST endpoints (companion to the WS SDK)
|
|
357
376
|
|
|
358
377
|
For lookups outside the live event stream, hit the sign server directly with your API key:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiktool/live",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"description": "TikTok LIVE API Client — Real-time chat, gifts, viewers, PK battles with MVP breakdown, x2/x3 boosters, gloves, mist, match-guide & 20+ event types from any TikTok livestream. Direct WebSocket connection.",
|
|
5
5
|
"author": "tiktool",
|
|
6
6
|
"license": "MIT",
|