Skip to content

A project to learn working with both Rust and the Github API

License

Notifications You must be signed in to change notification settings

learnrust/rust-github

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Github

Rust based library for interacting with the Github API. This is just a practice library while I learn how to write Rust libraries / applications.

Examples

Get a user

This request will return a single github::users::User struct.

extern crate "rust-github" as github;

use github::Github;


fn main() {
    let github = Github::new();
    let user = github.users.get("octocat");
    println!("Name: {:?}", user.name);
    println!("Email: {:?}", user.email);
    println!("Location: {:?}", user.location);
}

Get all repositories by user

Get a list of repositories by user, exposes a Vec<github::repositories::Repository>.

let github = Github::new();
let repositories = github.repositories.by_user("octocat");
for repo in repositories.iter() {
    println!("{:?}", repo.name);
}

About

A project to learn working with both Rust and the Github API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%