https://github.com/flytegg/hangar-wrapper
A Java/Kotlin wrapper for PaperMC's Hangar API.
https://github.com/flytegg/hangar-wrapper
api hangar papermc wrapper
Last synced: about 1 year ago
JSON representation
A Java/Kotlin wrapper for PaperMC's Hangar API.
- Host: GitHub
- URL: https://github.com/flytegg/hangar-wrapper
- Owner: flytegg
- License: mit
- Created: 2023-04-24T00:44:18.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-06T19:54:54.000Z (about 2 years ago)
- Last Synced: 2025-04-19T18:31:46.972Z (about 1 year ago)
- Topics: api, hangar, papermc, wrapper
- Language: Kotlin
- Homepage: https://flyte.gg
- Size: 157 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Hangar Wrapper
A Java/Kotlin wrapper for PaperMC's [Hangar API](https://hangar.papermc.io/api-docs).
## How to Use
All methods in the wrapper should be accessed through the ```HangarClient``` class.
It currently supports retrieving information about projects, versions and users.
The following methods are in the ```HangarClient``` class, and can be accessed statically:
### Projects
```kt
Projects getProjects(boolean orderWithRelevance, int limit, int offset)
Project getProject(String author, String slug)
int getTotalProjectCount()
```
### Versions
```kt
Versions getVersions(String author, String slug)
Version getVersion(String author, String slug, String version)
String getDownloadURL(String author, String slug, String version, Platform platform)
```
### Users
```kt
User getUser(String user)
```
## Installation
The latest version can be found in the releases tab on the right.
### Maven
```xml
flyte-repository
Flyte Repository
https://repo.flyte.gg/
```
```xml
gg.flyte
hangarwrapper
VERSION
```
#### Gradle
```kt
repositories {
maven ("https://repo.flyte.gg/releases")
}
dependencies {
implementation("gg.flyte:hangarwrapper:VERSION")
}
```
## Contributing
Contributions are always welcome. Please open a pull request and try to maintain a similar code quality and style. The team at [Flyte](https://flyte.gg) is working on supporting new endpoints and keeping up with Hangar's changing API.
If you have no coding knowledge you can contribute by raising an issue.
## Author
This framework was made as an open source tool for [Flyte](https://flyte.gg) and the wider community.
- Created by [Dawson (dawsson)](https://github.com/Dawsson)