Skip to main content

Crate github_rust

Crate github_rust 

Source
Expand description

§GitHub Rust - Core Library

A Rust library for GitHub API integration with dual GraphQL/REST support.

  • Repository metadata through GraphQL or REST, with configurable REST fallback.
  • Authenticated account discovery, repository inventories and open issues/PRs.
  • Owned page streams, borrowed page callbacks and complete collections.
  • Repository search, stargazers and resource-specific quota information.

Start with GitHubService, configure authentication with GitHubClient::builder, or process pages with GitHubService::get_open_issue_pages.

§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);

§Authentication

GitHubService::new() reads GITHUB_TOKEN; the explicit client builder does not. Collections and search require a token. Repository metadata also supports anonymous REST access. 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§

config
error
github

Functions§

parse_github_node_idDeprecated
Best-effort decoder for historical node ID formats. Returns 0 on failure.
parse_repository
Parse a repository string “owner/repo” into components.