Skip to content

cocytus/Git.hub

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git.hub

A simple API in terms of querying github with C#, based on RestSharp.

Usage

Create a client instance

using Git.hub;
Client client = new Client();

login

OAuth token:

client.setOAuth2Token("0fd...");

Username and Password:

client.setCredentials("mabako", "super duper password");

Retrieve the currently logged in user:

User user = client.getUser();

fetch repositories

IList<Repository> repos = client.getRepositories("mabako");
IList<Repository> orgRepos = client.getOrganizationRepositories("github");

Repository pluginSource = client.getRepository("mabako", "Git.hub");

/* Requires login */
IList<Repository> ownRepos = client.getRepositories();

repository actions

Fork the repo:

Repository forked = pluginSource.CreateFork();

List branches:

IList<Branch> branches = pluginSource.GetBranches();

About

basic c# github api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%