repology
Rust client for the Repology API.
Provides async and blocking interfaces with built-in rate limiting, auto-pagination, and strongly-typed models.
Usage
use ;
async
Blocking
use RepologyBlockingClient;
let client = new?;
let packages = client.project?;
Pagination
Methods like projects() and repository_problems() auto-paginate through all results. For manual control or lazy iteration:
// Lazy streaming (async)
use StreamExt;
let mut stream = client.projects_iter;
while let Some = stream.next.await
// Manual page-by-page
let page1 = client.projects_page.await?;
let cursor = page1.keys.max.unwrap;
let page2 = client.projects_page.await?;
Rate Limiting
The Repology API requires bulk clients to make no more than 1 request per second. This is enforced automatically by default. Configure via the builder:
use Duration;
let client = builder
.user_agent
.rate_limit
.build?;
License
MIT