https://github.com/jgwest/zenhub-api-java-client
Unofficial Java client for the public ZenHub API
https://github.com/jgwest/zenhub-api-java-client
zenhub zenhub-api
Last synced: about 2 months ago
JSON representation
Unofficial Java client for the public ZenHub API
- Host: GitHub
- URL: https://github.com/jgwest/zenhub-api-java-client
- Owner: jgwest
- License: apache-2.0
- Created: 2019-04-21T17:55:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-15T19:51:34.000Z (about 5 years ago)
- Last Synced: 2025-01-29T22:30:41.349Z (4 months ago)
- Topics: zenhub, zenhub-api
- Language: Java
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unofficial Java client for public ZenHub API
Implements the read-only API of the public [ZenHub API](https://github.com/ZenHubIO/API). Pull requests welcome!
## Installation
1) Clone the repository and add the artifacts to your local Maven cache:
```
git clone https://github.com/jgwest/zenhub-api-java-client
cd zenhub-api-java-client
mvn install -DskipTests
```2) Add the client dependency into your Maven pom.xml
```
zenhub-api-java-client
zenhub-api-java-client
1.0.0
( ... )```
## Usage
The exposed client services correspond to resources available through the [ZenHub API](https://github.com/ZenHubIO/API).
These are:
- Boards - See `BoardService.java`
- Dependencies - See `DependenciesService.java`
- Epic / Epics - See `EpicsService.java`
- Issue Data / Issue Events - See `IssuesService.java`Example usage:
```java
// Generate a token in the API Tokens section of your ZenHub Dashboard
// (https://app.zenhub.com/dashboard/tokens)
String yourZenHubApiKey = "/* your api token */";
ZenHubClient zhClient = new ZenHubClient("https://api.zenhub.io", yourZenHubApiKey);IssuesService issuesService = new IssuesService(zhClient);
long repositoryId = /* github repository id number*/;
int issueNumber = /* issue number */;ApiResponse response = issuesService.getIssueData(repositoryId, issueNumber);
GetIssueDataResponseJson json = response.getResponse();
```
See [ZHTest class](https://github.com/jgwest/zenhub-api-java-client/blob/master/tests/com/zhapi/tests/ZHTest.java) for sample API usage.