diff --git a/Cargo.lock b/Cargo.lock
index 95907b4..17b57bf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -322,19 +322,13 @@ dependencies = [
"futures-sink",
"futures-util",
"http",
- "indexmap 2.2.6",
+ "indexmap",
"slab",
"tokio",
"tokio-util",
"tracing",
]
-[[package]]
-name = "hashbrown"
-version = "0.12.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
-
[[package]]
name = "hashbrown"
version = "0.14.5"
@@ -398,9 +392,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "0.14.28"
+version = "0.14.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"
+checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9"
dependencies = [
"bytes",
"futures-channel",
@@ -443,16 +437,6 @@ dependencies = [
"unicode-normalization",
]
-[[package]]
-name = "indexmap"
-version = "1.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
-dependencies = [
- "autocfg",
- "hashbrown 0.12.3",
-]
-
[[package]]
name = "indexmap"
version = "2.2.6"
@@ -460,7 +444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
dependencies = [
"equivalent",
- "hashbrown 0.14.5",
+ "hashbrown",
]
[[package]]
@@ -711,9 +695,9 @@ dependencies = [
[[package]]
name = "protobuf"
-version = "3.4.0"
+version = "3.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58678a64de2fced2bdec6bca052a6716a0efe692d6e3f53d1bda6a1def64cfc0"
+checksum = "df67496db1a89596beaced1579212e9b7c53c22dca1d9745de00ead76573d514"
dependencies = [
"bytes",
"once_cell",
@@ -723,9 +707,9 @@ dependencies = [
[[package]]
name = "protobuf-codegen"
-version = "3.4.0"
+version = "3.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32777b0b3f6538d9d2e012b3fad85c7e4b9244b5958d04a6415f4333782b7a77"
+checksum = "eab09155fad2d39333d3796f67845d43e29b266eea74f7bc93f153f707f126dc"
dependencies = [
"anyhow",
"once_cell",
@@ -738,12 +722,12 @@ dependencies = [
[[package]]
name = "protobuf-parse"
-version = "3.4.0"
+version = "3.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96cb37955261126624a25b5e6bda40ae34cf3989d52a783087ca6091b29b5642"
+checksum = "1a16027030d4ec33e423385f73bb559821827e9ec18c50e7874e4d6de5a4e96f"
dependencies = [
"anyhow",
- "indexmap 1.9.3",
+ "indexmap",
"log",
"protobuf",
"protobuf-support",
@@ -754,9 +738,9 @@ dependencies = [
[[package]]
name = "protobuf-support"
-version = "3.4.0"
+version = "3.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1ed294a835b0f30810e13616b1cd34943c6d1e84a8f3b0dcfe466d256c3e7e7"
+checksum = "70e2d30ab1878b2e72d1e2fc23ff5517799c9929e2cf81a8516f9f4dcf2b9cf3"
dependencies = [
"thiserror",
]
@@ -1171,7 +1155,7 @@ dependencies = [
[[package]]
name = "tiktoklive"
-version = "0.0.14"
+version = "0.0.16"
dependencies = [
"bytes",
"env_logger",
diff --git a/Cargo.toml b/Cargo.toml
index f1ce92f..21009ab 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tiktoklive"
-version = "0.0.15"
+version = "0.0.16"
description = "A Rust library. Use it to receive live stream events such as comments and gifts in realtime from TikTok LIVE No credentials are required."
homepage = "https://github.com/jwdeveloper/TikTokLiveRust"
repository = "https://github.com/jwdeveloper/TikTokLiveRust"
@@ -24,16 +24,16 @@ tokio = { version = "1.35.1", features = ["full"] }
tokio-tungstenite = { version = "0.16.0", features = ["native-tls"] }
bytes = "1.5.0"
-protobuf-codegen = "3.4.0"
+protobuf-codegen = "3.5.0"
protoc-bin-vendored = "3.0.0"
-protobuf = { version = "3.4.0", features = ["bytes"] }
+protobuf = { version = "3.5.0", features = ["bytes"] }
url = "2.5.0"
tungstenite = "0.16.0"
futures-util = "0.3.30"
[build-dependencies]
-protobuf-codegen = "3.4.0"
+protobuf-codegen = "3.5.0"
protoc-bin-vendored = "3.0.0"
diff --git a/README.md b/README.md
index 23dfc1d..56ee540 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
TikTok Live Rust
-❤️❤️🎁 *Connect to TikTok live in 3 lines* 🎁❤️❤️
+❤️❤️🎁 _Connect to TikTok live in 3 lines_ 🎁❤️❤️
@@ -22,20 +22,22 @@
# Introduction
+
A Rust library. Use it to receive live stream events such as comments and gifts in realtime from [TikTok LIVE](https://www.tiktok.com/live) No credentials are required.
Join the support [discord](https://discord.gg/e2XwPNTBBr) and visit the `#rust-support` channel for questions, contributions and ideas. Feel free to make pull requests with missing/new features, fixes, etc
Do you prefer other programming languages?
-- **Java** [TikTokLiveJava](https://github.com/jwdeveloper/TikTokLiveJava)
-- **Node** [TikTok-Live-Connector](https://github.com/zerodytrash/TikTok-Live-Connector) by [@zerodytrash](https://github.com/zerodytrash)
+
+- **Java** [TikTokLiveJava](https://github.com/jwdeveloper/TikTokLiveJava)
+- **Node** [TikTok-Live-Connector](https://github.com/zerodytrash/TikTok-Live-Connector) by [@zerodytrash](https://github.com/zerodytrash)
- **Python** [TikTokLive](https://github.com/isaackogan/TikTokLive) by [@isaackogan](https://github.com/isaackogan)
-- **C#** [TikTokLiveSharp](https://github.com/frankvHoof93/TikTokLiveSharp) by [@frankvHoof93](https://github.com/frankvHoof93)
+- **C#** [TikTokLiveSharp](https://github.com/frankvHoof93/TikTokLiveSharp) by [@frankvHoof93](https://github.com/frankvHoof93)
**NOTE:** This is not an official API. It's a reverse engineering project.
-
#### Overview
+
- [Getting started](#getting-started)
- [Documentation](https://docs.rs/tiktoklive/latest/tiktoklive/)
- [Contributing](#contributing)
@@ -46,7 +48,7 @@ Do you prefer other programming languages?
```toml
[dependencies]
-tiktoklive = "0.0.15"
+tiktoklive = "0.0.16"
tokio = { version = "1.35.1", features = ["full"] }
serde_json = "1.0"
log = "0.4"
@@ -214,9 +216,9 @@ fn create_client_with_cookies(user_name: &str) -> TikTokLiveClient {
}
```
-## Library errors table
+## Library errors table
-You can catch errors on events with
+You can catch errors on events with
```rust
use tiktoklive::LibError;
@@ -233,38 +235,40 @@ if let Err(e) = client.connect().await {
}
```
-| Error type | Description |
-| --- | --- |
-| RoomIDFieldMissing | Room ID field is missing, contact developer |
-| UserFieldMissing | User field is missing |
-| UserDataFieldMissing | User data field is missing |
-| LiveDataFieldMissing | Live data field is missing |
-| JsonParseError | Error parsing JSON |
-| UserMessageFieldMissing | User message field is missing |
-| ParamsError | Params error |
-| UserStatusFieldMissing | User status field is missing |
-| LiveStatusFieldMissing | Live status field is missing |
-| TitleFieldMissing | Title field is missing |
-| UserCountFieldMissing | User count field is missing |
-| StatsFieldMissing | Stats field is missing |
-| LikeCountFieldMissing | Like count is missing |
-| TotalUserFieldMissing | Total user field is missing |
-| LiveRoomFieldMissing | Live room field is missing |
-| StartTimeFieldMissing | Start time field is missing |
-| UserNotFound | User not found |
-| HostNotOnline | Live stream for host is not online!, current status HostOffline |
-| InvalidHost | Invalid host in WebSocket URL |
-| WebSocketConnectFailed | Failed to connect to WebSocket |
-| PushFrameParseError | Unable to read push frame |
-| WebcastResponseParseError | Unable to read webcast response |
-| AckPacketSendError | Unable to send ack packet |
-| HttpRequestFailed | HTTP request failed |
-| UrlSigningFailed | URL signing failed |
-| HeaderNotReceived | Header was not received |
-| BytesParseError | Unable to parse bytes to Push Frame |
+| Error type | Description |
+| ------------------------- | --------------------------------------------------------------- |
+| RoomIDFieldMissing | Room ID field is missing, contact developer |
+| UserFieldMissing | User field is missing |
+| UserDataFieldMissing | User data field is missing |
+| LiveDataFieldMissing | Live data field is missing |
+| JsonParseError | Error parsing JSON |
+| UserMessageFieldMissing | User message field is missing |
+| ParamsError | Params error |
+| UserStatusFieldMissing | User status field is missing |
+| LiveStatusFieldMissing | Live status field is missing |
+| TitleFieldMissing | Title field is missing |
+| UserCountFieldMissing | User count field is missing |
+| StatsFieldMissing | Stats field is missing |
+| LikeCountFieldMissing | Like count is missing |
+| TotalUserFieldMissing | Total user field is missing |
+| LiveRoomFieldMissing | Live room field is missing |
+| StartTimeFieldMissing | Start time field is missing |
+| UserNotFound | User not found |
+| HostNotOnline | Live stream for host is not online!, current status HostOffline |
+| InvalidHost | Invalid host in WebSocket URL |
+| WebSocketConnectFailed | Failed to connect to WebSocket |
+| PushFrameParseError | Unable to read push frame |
+| WebcastResponseParseError | Unable to read webcast response |
+| AckPacketSendError | Unable to send ack packet |
+| HttpRequestFailed | HTTP request failed |
+| UrlSigningFailed | URL signing failed |
+| HeaderNotReceived | Header was not received |
+| BytesParseError | Unable to parse bytes to Push Frame |
## Contributing
+
Your improvements are welcome! Feel free to open an
issue or
pull request.
## Contributors
+
[Zmole Cristian](https://github.com/ZmoleCristian)
diff --git a/build-script/src/proto/data.rs b/build-script/src/proto/data.rs
index e31f771..aaa6a4f 100644
--- a/build-script/src/proto/data.rs
+++ b/build-script/src/proto/data.rs
@@ -23,7 +23,7 @@
/// Generated files are compatible only with the same version
/// of protobuf runtime.
-const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0;
+const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_5_0;
// @@protoc_insertion_point(message:TikTok.Common)
#[derive(PartialEq,Clone,Default,Debug)]
diff --git a/build-script/src/proto/enums.rs b/build-script/src/proto/enums.rs
index 5ed3c6f..2006183 100644
--- a/build-script/src/proto/enums.rs
+++ b/build-script/src/proto/enums.rs
@@ -23,7 +23,7 @@
/// Generated files are compatible only with the same version
/// of protobuf runtime.
-const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0;
+const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_5_0;
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:TikTok.AuditStatus)
diff --git a/build-script/src/proto/webcast.rs b/build-script/src/proto/webcast.rs
index bfa487f..ae29ef3 100644
--- a/build-script/src/proto/webcast.rs
+++ b/build-script/src/proto/webcast.rs
@@ -23,7 +23,7 @@
/// Generated files are compatible only with the same version
/// of protobuf runtime.
-const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0;
+const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_5_0;
// @@protoc_insertion_point(message:TikTok.WebcastPushFrame)
#[derive(PartialEq,Clone,Default,Debug)]
diff --git a/src/generated/messages/data.rs b/src/generated/messages/data.rs
index e31f771..aaa6a4f 100644
--- a/src/generated/messages/data.rs
+++ b/src/generated/messages/data.rs
@@ -23,7 +23,7 @@
/// Generated files are compatible only with the same version
/// of protobuf runtime.
-const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0;
+const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_5_0;
// @@protoc_insertion_point(message:TikTok.Common)
#[derive(PartialEq,Clone,Default,Debug)]
diff --git a/src/generated/messages/enums.rs b/src/generated/messages/enums.rs
index 4efa892..8ea19db 100644
--- a/src/generated/messages/enums.rs
+++ b/src/generated/messages/enums.rs
@@ -23,7 +23,7 @@
/// Generated files are compatible only with the same version
/// of protobuf runtime.
-const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0;
+const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_5_0;
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:TikTok.AuditStatus)
diff --git a/src/generated/messages/webcast.rs b/src/generated/messages/webcast.rs
index bfa487f..ae29ef3 100644
--- a/src/generated/messages/webcast.rs
+++ b/src/generated/messages/webcast.rs
@@ -23,7 +23,7 @@
/// Generated files are compatible only with the same version
/// of protobuf runtime.
-const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0;
+const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_5_0;
// @@protoc_insertion_point(message:TikTok.WebcastPushFrame)
#[derive(PartialEq,Clone,Default,Debug)]