Expand description
§GitHub Rust - Core Library
A Rust library for GitHub API integration with dual GraphQL/REST support.
§Features
- Dual API: GraphQL primary with REST fallback
- Search: Repository search with filters
- Performance: Connection pooling and async I/O
- Type Safety: Comprehensive error handling
§Quick Start
use github_rust::GitHubService;
let service = GitHubService::new()?;
// Get repository info
let repo = service.get_repository_info("microsoft", "vscode").await?;
println!("{}: {} stars", repo.name_with_owner, repo.stargazer_count);
// Search recent repositories (30 days back, limit 10, Rust language, min 100 stars)
let repos = service.search_repositories(30, 10, Some("rust"), 100).await?;§Authentication
Set GITHUB_TOKEN for authenticated requests. Quotas vary by API resource and token.
Re-exports§
pub use config::GITHUB_API_URL;pub use config::GITHUB_GRAPHQL_URL;pub use error::DecodeError;pub use error::ErrorKind;pub use error::GitHubError;pub use error::RateLimitDetails;pub use error::Result;pub use github::Account;pub use github::Actor;pub use github::FallbackPolicy;pub use github::FetchOptions;pub use github::GitHubClient;pub use github::GitHubClientBuilder;pub use github::GitHubService;pub use github::Issue;pub use github::Label;pub use github::LanguageUsage;pub use github::OwnedRepositories;pub use github::PullRequest;pub use github::RateLimit;pub use github::RateLimits;pub use github::Repository;pub use github::RepositoryCoordinates;pub use github::RepositoryPage;pub use github::RepositoryReference;pub use github::RepositorySummary;pub use github::ReviewDecision;pub use github::SearchRepository;pub use github::StargazerWithDate;pub use github::User;pub use github::UserProfile;pub use github::Viewer;pub use github::WorkItemPage;
Modules§
Functions§
- parse_
github_ node_ id Deprecated - Best-effort decoder for historical node ID formats. Returns 0 on failure.
- parse_
repository - Parse a repository string “owner/repo” into components.