You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MyWaifuWrapper/README.md

110 lines
3.4 KiB
Markdown

3 years ago
[license]: https://img.shields.io/github/license/sgoudham/MyWaifuWrapper
[maven-central]: https://img.shields.io/maven-central/v/me.goudham/MyWaifuWrapper
[build-status]: https://goudham.me/jenkins/job/MyWaifuWrapper/job/release/badge/icon
[codecov]: https://codecov.io/gh/sgoudham/MyWaifuWrapper/branch/release/graph/badge.svg?token=RxUDnCWnF0
[issues]: https://img.shields.io/github/issues/sgoudham/MyWaifuWrapper?label=issues
[pull-requests]: https://img.shields.io/github/issues-pr/sgoudham/MyWaifuWrapper
3 years ago
[fossa]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsgoudham%2FMyWaifuWrapper.svg?type=shield
3 years ago
3 years ago
![fossa]
3 years ago
![license]
![maven-central]
![build-status]
![codecov]
![issues]
![pull-requests]
3 years ago
<h1 align="center">MyWaifuWrapper</h1>
<h2 align="center">An Asynchronous Java API Wrapper for MyWaifuList</h2>
3 years ago
3 years ago
# Summary
3 years ago
This is an Asynchronous API Wrapper for [MyWaifuList](https://mywaifulist.moe/dash)
3 years ago
3 years ago
# Disclaimer
3 years ago
3 years ago
Given that MyWaifuList is a primarily user-driven website and this API is currently in an Alpha state,
3 years ago
the data returned **may not be** fully complete and at its best quality
3 years ago
3 years ago
# Configuration
## Creating The MyWaifuClient
There are 2 ways to create the [MyWaifuClient](https://github.com/sgoudham/MyWaifuWrapper/blob/main/src/main/java/me/goudham/MyWaifuClient.java)
+ `createDefault(apiKey)`
+ `build()`
### createDefault()
3 years ago
`createDefault(apiKey)` will provide a default implementation and return a MyWaifuClient ready to be used. Only
the `apiKey` is required to instantiate MyWaifuClient.
3 years ago
```java
public class Main {
private static void main(String[] args) {
MyWaifuClient myWaifuClient = MyWaifuClient.createDefault("apiKey");
}
}
```
### build()
`build()` is used to build the object from the ground up, allowing for the fine-tuning of properties within the
3 years ago
MyWaifuClient. Not all the additional properties need to specified within the builder but the bare minimum would be
the `apiKey` within the Builder constructor and then `.build()`
3 years ago
```java
import me.goudham.MyWaifuClient;
import java.net.http.HttpClient;
import java.time.Duration;
public class Main {
private static void main(String[] args) {
3 years ago
// Bare Minimum (Would recommend using createDefault())
MyWaifuClient myWaifuClient = new MyWaifuClient.Builder("apiKey").build();
3 years ago
// Creating MyWaifuClient through Builder
MyWaifuClient myWaifuClient = new MyWaifuClient.Builder("apiKey")
.withVersion(HttpClient.Version.HTTP_2)
.withConnectTimeout(Duration.ofMinutes(10))
.build();
}
}
```
# Usage
TODO
3 years ago
# Download
3 years ago
Latest Stable Version: ![maven-central]
3 years ago
<p>Be sure to replace the **VERSION** key below with the one of the versions shown above!</p>
**Maven**
```xml
<!-- https://mvnrepository.com/artifact/me.goudham/MyWaifuWrapper -->
<dependency>
<groupId>me.goudham</groupId>
<artifactId>MyWaifuWrapper</artifactId>
<version>VERSION</version>
</dependency>
```
**Gradle**
```gradle
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/me.goudham/MyWaifuWrapper
implementation group: 'me.goudham', name: 'MyWaifuWrapper', version: 'VERSION'
}
```
3 years ago
## License
3 years ago
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsgoudham%2FMyWaifuWrapper.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsgoudham%2FMyWaifuWrapper?ref=badge_large)