Crates.io | use-github-api |
lib.rs | use-github-api |
version | 0.2.0 |
source | src |
created_at | 2021-05-17 03:08:18.079042 |
updated_at | 2021-05-18 03:14:18.654126 |
description | A Github API client for rust. |
homepage | |
repository | https://github.com/PythonCreator27/use-github-api-rs |
max_upload_size | |
id | 398438 |
size | 72,266 |
A GitHub API client for rust.
This crate is 100% unstable. Almost any useful features are missing at this time. As of now, this crate is mostly skeleton. Breaking changes can happen continuously. This crate does follow SemVer, though. But since this library is still at 0.x
, breaking changes happen in minor versions. If you find any bugs, report them. Please don't file endpoint-related feature requests, as there are plenty already on the list. Filing auth related or api usage related requests (add a new crate feature, expose a field, etc.) is perfectly fine.
use use_github_api::{GithubClient, schema::users::list};
let client = GithubClient::builder().auth(env!("GITHUB_TOKEN")).build().unwrap();
let data: Vec<list::User> = client.users().list(list::Params {
per_page: Some(50),
since: None,
});
println!("{:?}", data);
// Go to https://api.github.com/users and the response you see there will be the response you see here, minus all of the URL fields.
Authentication is recommended, and is turned on by default. To disable, use use-gitub-api = { version = "[version]", no-default-features = true }
in Cargo.toml
. There are a lot of things that you can't do without auth.
To get the auth token, you will need to go to GitHub settings and generate a token there. Then, set an environment variable there and use it to authenticate with the library.
auth
enterprise
auth
feature.node_ids
auth
signalizes that auth is required, and auth?
signalizes that auth will do something, but is optional.
users
module
repo
module