# GitHub Trending Repositories in Rust
[](https://crates.io/crates/github-trending-rs)
[](https://docs.rs/github-trending-rs)
A simple Rust crate to fetch trending repositories from GitHub.
## Usage
### Example: Get daily Rust trending repositories
```rust,no_run
use std::time::Duration;
use github_trending_rs::{Language, Since, TrendExt};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = reqwest::ClientBuilder::new()
.connect_timeout(Duration::from_secs(5))
.timeout(Duration::from_secs(10))
.build()?;
let repos = client
.github_trending()
.with_language(Language::Rust)
.since(Since::Daily)
.repositories()
.await?
.all();
for repo in repos {
println!("{:#?}", repo);
}
Ok(())
}
```
## Limitations
- This crate relies on GitHub's public API. Changes to GitHub's website or rate limiting policies may affect functionality.
- The HTML parsing is based on the current structure of GitHub's trending page, which could change over time.
## License
This project is licensed under the GLWTPL (Good Luck With That Public License). See the `LICENSE` file for more details.