Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Latest commit

 

History

History
40 lines (31 loc) · 1002 Bytes

README.md

File metadata and controls

40 lines (31 loc) · 1002 Bytes

hitokoto4j

CodeFactor
A simple Java API for 一言 Hitokoto.

Usage

Add repository & dependence:

repositories {
    maven {
        url "https://raw.githubusercontent.com/GerryYuu/repository/master/"
    }
}

dependencies {
    implementation('xyz.yuu8583:hitokoto4j:1.0.1')
}

Some examples:

// Do some fast requests without any arguments.
FastHitokoto.request();
        FastHitokoto.requestAndGetJson();

// Do some requests with arguments.
        HitokotoBuilder hitokotoBuilder=new HitokotoBuilder()
        .addType(HitokotoType.LITERATURE)
        .addType(HitokotoType.ANIME)
        .setMinLength(1)
        .setMaxLength(15);
        Hitokoto hitokoto=hitokotoBuilder.build();
        HitokotoResponse hitokotoResponse=hitokoto.request();
        hitokotoResponse.getHitokoto();

// ...