You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+71-19Lines changed: 71 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,13 @@ You can find this library in [maven central repository](https://mvnrepository.co
21
21
Include the latest version of github-client into your project:
22
22
23
23
In Maven:
24
+
24
25
```xml
26
+
25
27
<dependency>
26
-
<groupId>com.spotify</groupId>
27
-
<artifactId>github-client</artifactId>
28
-
<version>version</version>
28
+
<groupId>com.spotify</groupId>
29
+
<artifactId>github-client</artifactId>
30
+
<version>version</version>
29
31
</dependency>
30
32
```
31
33
@@ -43,10 +45,10 @@ To authenticate as a GitHub App, you must provide a private key and the App ID,
43
45
44
46
```java
45
47
finalGitHubClient githubClient =
46
-
GitHubClient.create(
47
-
URI.create("https://api.github.com/"),
48
-
newFile("/path-to-the/private-key.pem"),
49
-
APP_ID);
48
+
GitHubClient.create(
49
+
URI.create("https://api.github.com/"),
50
+
newFile("/path-to-the/private-key.pem"),
51
+
APP_ID);
50
52
```
51
53
52
54
Then, you can scope the client for a specific Installation ID, to do the operations at the installation level.
@@ -59,12 +61,16 @@ final GitHubClient scopedClient = GitHubClient.scopeForInstallationId(githubClie
59
61
60
62
It is also possible to provide the installation to the root client.
61
63
62
-
Refer to [GitHub App Authentication Guide](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/) for more information.
64
+
Refer
65
+
to [GitHub App Authentication Guide](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/)
66
+
for more information.
63
67
64
68
## Usage
65
69
66
-
This library attempts to mirror the structure of GitHub API endpoints. As an example, to get details of a Commit, there is
67
-
the `GET /repos/:owner/:repo/commits` API call, under the `repos` API. Therefore, the `getCommit` method lives in the RepositoryClient.
70
+
This library attempts to mirror the structure of GitHub API endpoints. As an example, to get details of a Commit, there
71
+
is
72
+
the `GET /repos/:owner/:repo/commits` API call, under the `repos` API. Therefore, the `getCommit` method lives in the
0 commit comments