Skip to content

Commit

Permalink
Merge pull request #18 from rakhvalov/master
Browse files Browse the repository at this point in the history
fix: update dependencies version
  • Loading branch information
ZmoleCristian authored Aug 23, 2024
2 parents b4f6016 + 5c4df38 commit 97e0d0c
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 77 deletions.
44 changes: 14 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"


78 changes: 41 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div align="center" >
<h1>TikTok Live Rust</h1>

❤️❤️🎁 *Connect to TikTok live in 3 lines* 🎁❤️❤️
❤️❤️🎁 _Connect to TikTok live in 3 lines_ 🎁❤️❤️

<div align="center" >

Expand All @@ -22,20 +22,22 @@
</div>

# 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)
Expand All @@ -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"
Expand Down Expand Up @@ -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;
Expand All @@ -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 <a href="https://github.com/jwdeveloper/TikTok-Live-Java/issues">issue</a> or <a href="https://github.com/jwdeveloper/TikTok-Live-Java/pulls">pull request</a>.

## Contributors

[Zmole Cristian](https://github.com/ZmoleCristian)
2 changes: 1 addition & 1 deletion build-script/src/proto/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion build-script/src/proto/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion build-script/src/proto/webcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/generated/messages/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/generated/messages/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/generated/messages/webcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 97e0d0c

Please sign in to comment.