Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dipien/github-api

Java Connector for GitHub API
https://github.com/dipien/github-api

github github-api

Last synced: about 1 month ago
JSON representation

Java Connector for GitHub API

Awesome Lists containing this project

README

        

[![Dipien](https://raw.githubusercontent.com/dipien/dipien-component-builder/master/.github/dipien_logo.png)](http://www.dipien.com)

# GitHub API
Java Connector for GitHub API

## Setup

Add the following configuration to your `build.gradle`, replacing X.Y.Z by the [latest version](https://github.com/dipien/github-api/releases/latest)

```groovy
repositories {
mavenCentral()
}
dependencies {
classpath("com.dipien:github-api-java:X.Y.Z")
}
```

## Usage

### Create a Release

GitHubClient client = new GitHubClient();
client.setOAuth2Token("GITHUB_OATH_TOKEN");
IRepositoryIdProvider repositoryIdProvider = RepositoryId.create("REPOSITORY_OWNER", "REPOSITORY_NAME");

Release release = new Release();
release.setBody("RELEASE_NOTES");
release.setDraft(false);
release.setName("RELEASE_NAME");
release.setTagName("RELEASE_TAG_NAME");
release.setPrerelease(false);
release.setTargetCommitish("BRANCH_NAME");

ReleaseService releaseService = new ReleaseService(client);
releaseService.createRelease(repositoryIdProvider, release);

## Sponsor this project

Sponsor this open source project to help us get the funding we need to continue working on it.

* [Donate with Bitcoin Lightning](https://getalby.com/p/dipien) ⚡️ [[email protected]](https://getalby.com/p/dipien)
* [Donate cryptocurrency](http://coinbase.dipien.com/)
* [Donate with PayPal](http://paypal.dipien.com/)
* [Donate on Patreon](http://patreon.dipien.com/)
* [Become a member of Medium](https://maxirosson.medium.com/membership) [We will receive a portion of your membership fee]

You can donate BTC (lightning), using this QR:

![BTC](https://raw.githubusercontent.com/dipien/dipien-component-builder/master/.github/btc_lightning.png)

## Follow us
* [Twitter](http://twitter.dipien.com)
* [Medium](http://medium.dipien.com)
* [Instagram](http://instagram.dipien.com)
* [Pinterest](http://pinterest.dipien.com)
* [GitHub](http://github.dipien.com)