spenserblack / github-stats-rs

A tool for using Github's API
Apache License 2.0
1 stars 5 forks source link

1:1 Github API to Structs #2

Closed spenserblack closed 4 years ago

spenserblack commented 4 years ago

Instead of making stats that I'm personally interested, get the raw data exactly as Github provides it. The user can decide how to interpret that data. Will probably fix #1, by making it an option.

Example Usage

enums can replace a lot of the following's &strs. See commit 09db1c8 for example on how to build query URL.

use github_stats::{Search, search::Query};

let query = Query::new()
    .repo("rust-lang", "rust")
    .type("pr")
    .is("open");
let results = Search::new("issues", query)
    .per_page(10)
    .page(1)
    .search();
let repo = Repo::new("rust-lang", "rust").unwrap();
let stars = repo.stars();
let release = Release::latest(&repo).unwrap();

Links