All Projects → github-rs → Github Rs

github-rs / Github Rs

Licence: other
Pure Rust bindings to the Github API

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Github Rs

vue-blog
使用 Vue 和 Github Issues 搭建的 SPA Blog
Stars: ✭ 18 (-93.96%)
Mutual labels:  github-api
Github cli
GitHub on your command line. Use your terminal, not the browser.
Stars: ✭ 263 (-11.74%)
Mutual labels:  github-api
Repository Dispatch
A GitHub action to create a repository dispatch event
Stars: ✭ 280 (-6.04%)
Mutual labels:  github-api
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (-91.61%)
Mutual labels:  github-api
Forkhub
GitHub client for Android based on the abandoned official app
Stars: ✭ 2,756 (+824.83%)
Mutual labels:  github-api
Raylib Rs
Rust bindings for raylib
Stars: ✭ 263 (-11.74%)
Mutual labels:  rust-bindings
github-trending-plus
✨ Experimental Github trending UI
Stars: ✭ 61 (-79.53%)
Mutual labels:  github-api
Shhgit
Ah shhgit! Find secrets in your code. Secrets detection for your GitHub, GitLab and Bitbucket repositories: www.shhgit.com
Stars: ✭ 3,316 (+1012.75%)
Mutual labels:  github-api
Node Github Profile Summary
[Temporarily unavailable]The node version of github-profile-summary with GraphQL
Stars: ✭ 261 (-12.42%)
Mutual labels:  github-api
Repository Hunter
🌹 Making GitHub more socially engaging 🎮 and fun 🍥 for all
Stars: ✭ 273 (-8.39%)
Mutual labels:  github-api
github-vacations
Automagically ignore all notifications related to work when you are on vacations
Stars: ✭ 20 (-93.29%)
Mutual labels:  github-api
git-server
A GitHub Protocol & API emulation
Stars: ✭ 68 (-77.18%)
Mutual labels:  github-api
Githubfollows
A demo project based on MVVM architecture and material design & animations.
Stars: ✭ 272 (-8.72%)
Mutual labels:  github-api
mighty-watcher
Open source made easier
Stars: ✭ 44 (-85.23%)
Mutual labels:  github-api
Hacker Tab Extension
Browser extension to view GitHub trending projects on new tab 📈
Stars: ✭ 287 (-3.69%)
Mutual labels:  github-api
Track-Stargazers
Have fun tracking your project's stargazers
Stars: ✭ 38 (-87.25%)
Mutual labels:  github-api
Gitlit
Platform to connect contributors and projects based on skill level and shared interests.
Stars: ✭ 265 (-11.07%)
Mutual labels:  github-api
Simonw
https://simonwillison.net/2020/Jul/10/self-updating-profile-readme/
Stars: ✭ 297 (-0.34%)
Mutual labels:  github-api
Ghcrawler
Crawl GitHub APIs and store the discovered orgs, repos, commits, ...
Stars: ✭ 293 (-1.68%)
Mutual labels:  github-api
Buildapks
Really quickly build APKs on handheld device (smartphone and tablet) in Amazon, Android, Chromebook, PRoot and Windows📲 See https://buildapks.github.io/docsBuildAPKs/setup to start building APKs.
Stars: ✭ 272 (-8.72%)
Mutual labels:  github-api

github-rs

Service Status
TravisCI Build Status
DependencyCI DependencyStatus
AppveyorCI Build status
CodeCov codecov
crates.io crates.io

Pure Rust bindings to the Github V3 API. If you want bindings to the V4 library see the github-graphql-rs library.

Incomplete Bindings

Please look at the endpoints docs to see which endpoints are currently covered in the API. This is for the Github V3 API.

Dependencies and Support

github-rs is intended to work on all tier 1 supported Rust systems:

  • Windows
  • Linux
  • MacOSX

github-rs supports rustls and rust-native-tls for TLS connectivity. rustls is used by default, but one can toggle support with Cargo features:

[dependencies.github-rs]
version = "0.7"
default-features = false
features = ["rust-native-tls"]

Since rustls depends on ring for cryptography, hardware support is limited to what ring supports, currently ARM and x86 (both 32- and 64-bit). If you're compiling for other architectures then you may use the rust-native-tls feature for maximum portability.

Minimum Compiler Version

Due to the use of certain features github-rs requires rustc version 1.18 or higher.

Project Aims

  • Have a robust API where everything is error handled properly to avoid panics of any kind. A library is the base of an application and should be a solid foundation to be built upon
  • Cover all Github stable endpoints. Anything that's deprecated and beta should be obtained only through configuration for those features. As deprecated endpoints are removed from Github so too should they be removed from this library.
  • Having stability as part of the API. As such effort will be taken to make sure this code compiles on stable Rust, rather than nightly.
  • Ease of use. The complexity should be hidden from those not hacking on the code itself.
  • Documentation of everything so not only is it easy to hack on but finding out how to use the library should be easy to find.

Getting Started

Add the following to your Cargo.toml

[dependencies]
github-rs = "0.7"
serde_json = "1.0"

Then in your lib.rs or main.rs file add:

use github_rs::client::{Executor, Github};
use serde_json::Value;

Now you can start making queries. Here's a small example to get your user information:

use github_rs::client::{Executor, Github};
use serde_json::Value;

fn main() {
    let client = Github::new("API TOKEN").unwrap();
    let me = client.get()
                   .user()
                   .execute::<Value>();
    match me {
        Ok((headers, status, json)) => {
            println!("{:#?}", headers);
            println!("{}", status);
            if let Some(json) = json{
                println!("{}", json);
            }
        },
        Err(e) => println!("{}", e)
    }
}

Hacking on the Library

Contributing

See CONTRIBUTING.md for more information.

License

Licensed under either of

at your option.

Licensing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].