File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 <parent >
44 <groupId >org.kohsuke</groupId >
55 <artifactId >pom</artifactId >
6- <version >3 </version >
6+ <version >4 </version >
77 </parent >
88
99 <artifactId >github-api</artifactId >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ What is this?
2+ =====
3+
4+ This library defines an object oriented representation of the GitHub API. By "object oriented" we mean
5+ there are classes that correspond to the domain model of GitHub (such as ` GHUser ` and ` GHRepository ` ),
6+ operations that act on them as defined as methods (such as ` GHUser.follow() ` ), and those object references
7+ are used in favor of using string handle (such as ` GHUser.isMemberOf(GHOrganization) ` instead of
8+ ` GHUser.isMemberOf(String) ` )
9+
10+ There are some corners of the GitHub API that's not yet implemented, but
11+ the library is implemented with the right abstractions and libraries to make it very easy to improve the coverage.
12+
13+ Sample Usage
14+ -----
15+
16+ GitHub github = GitHub.connect();
17+ GHRepository repo = github.createRepository(
18+ "new-repository","this is my new repository",
19+ "http://www.kohsuke.org/",true/*public*/);
20+ repo.addCollaborators(github.getUser("abayer"),github.getUser("rtyler"));
21+ repo.delete();
22+
23+ Credential
24+ ----
25+
26+ This library allows the caller to supply the credential as parameters, but it also defines a common convention
27+ so that applications using this library will look at the consistent location. In this convention, the library
28+ looks at ` ~/.github ` property file, which should have the following two values:
29+
30+ login=kohsuke
31+ password=012345678
32+
33+ Alternatively, you can have just the OAuth token in this file:
34+
35+ oauth=4d98173f7c075527cb64878561d1fe70
36+
You can’t perform that action at this time.
0 commit comments