Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/torfsen/roux-stream
Streaming API for the Rust Reddit Client roux
https://github.com/torfsen/roux-stream
async reddit rust stream
Last synced: 6 days ago
JSON representation
Streaming API for the Rust Reddit Client roux
- Host: GitHub
- URL: https://github.com/torfsen/roux-stream
- Owner: torfsen
- License: mit
- Created: 2021-08-05T15:56:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-18T08:17:31.000Z (over 1 year ago)
- Last Synced: 2024-10-13T23:47:47.296Z (about 1 month ago)
- Topics: async, reddit, rust, stream
- Language: Rust
- Homepage:
- Size: 55.7 KB
- Stars: 8
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build](https://github.com/torfsen/roux-stream/actions/workflows/build.yml/badge.svg)](https://github.com/torfsen/roux-stream/actions/workflows/build.yml) [![Crates.io](https://img.shields.io/crates/v/roux-stream)](https://crates.io/crates/roux-stream) [![docs.rs](https://img.shields.io/docsrs/roux-stream)](https://docs.rs/roux-stream) [![Crates.io](https://img.shields.io/crates/l/roux-stream)](https://github.com/torfsen/roux-stream/blob/main/LICENSE)
# `roux-stream`
A streaming API for the Rust Reddit client
[`roux`](https://github.com/halcyonnouveau/roux).Reddit's API does not provide "firehose"-style streaming of new posts and
comments. Instead, the endpoints for retrieving the latest posts and comments
have to be polled regularly. This crate automates that task and provides streams
for a subreddit's posts (submissions) and comments.## Documentation
The documentation is available [on `docs.rs`](https://docs.rs/roux-stream) and
contains examples for [streaming submissions](https://docs.rs/roux-stream/latest/roux_stream/fn.stream_submissions.html#example)
and [streaming comments](https://docs.rs/roux-stream/latest/roux_stream/fn.stream_comments.html#example).An example for streaming both submissions and comments at the same time can be
found in the file [`examples/submissions-and-comments.rs`](https://github.com/torfsen/roux-stream/blob/main/examples/submissions-and-comments.rs).## License
Distributed under the MIT license. See the file [`LICENSE`](LICENSE) for
details.## Changelog
See the file [`CHANGELOG.md`](CHANGELOG.md).
## Contributors
* [@torfsen](https://github.com/torfsen)
* [@fourbytes](https://github.com/fourbytes)
* [@dark0dave](https://github.com/dark0dave)
* [@asad-awadia](https://github.com/asad-awadia)## Development
Clone the repository:
```bash
git clone https://github.com/torfsen/roux-stream.git
cd roux-stream
```Run the tests:
```bash
cargo test
```Run the example in `examples/submissions-and-comments.rs`:
```bash
cargo run --example submissions-and-comments
```