Code Monkey home page Code Monkey logo

vocadb-openapi-client-java's Introduction

Auto-generated VocaDB OpenAPI Java Client

A sample VocaDB API Java Client that is auto-generated by OpenAPI and is auto-fixed by my VocaDB OpenAPI Java Client Autofixer

The original README file coming from this auto-generated client is in README Original.md

This client is generated by:

docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
  --api-package mikufan.cx.vocadbapiclient.api \
  --model-package mikufan.cx.vocadbapiclient.model \
  --invoker-package mikufan.cx.vocadbapiclient.client \
  -i /local/openapi.json \
  --group-id mikufan.cx \
  --artifact-id vocadb-api-client \
  --artifact-version 1.0.0 \
  --minimal-update \
  -g java  \
    -p java8=true \
    -p dateLibrary=java8-localdatetime \
    -p useRuntimeException=true \
    -p useJakartaEe=true \
    -p openApiNullable=false \
    -p serializationLibrary=jackson \
    -p licenseName=WTFPL \
    -p licenseUrl=http://www.wtfpl.net/ \
  --library resttemplate \
  -o /local/sample-unfixed-client

How to import

Refer to jitpack to see how to import

How to use

Please read VocaDB API Usage Rules before using this API client.

Refer to the generated documentation for how to use this client

Notes

  • Highly recommended to set your custom User-Agent in ApiClient for VocaDB to identity you
  • This client probably won't work well for any non-GET requests. Base on VocaDB document, you need to set some custom header to be able to use it. This probably can be done by tunning the RestTemplate instance inside ApiClient
  • Take a look of your client, understand the structure
    • api directory is where you use to call the VocaDB Rest API
    • ApiClient is the core class
  • By default, the base URL is always http://localhost, change it to https://vocadb.net by calling setBaseurl() on ApiClient class
    • for Java 11 native HTTP client, use setHostname("vocadb.net") and setScheme("https") (Java 11 native HTTP client doesn't have setBaseurl()). If you don't do setScheme("https"), you need to manually add builder.followRedirects(Redirect.NORMAL)
  • Because VocaDB and UtaiteDB use the same codebase, you could probably change the base URL to https://utaitedb.net to make your client an UtaiteDB Api Client.
    • be aware that some artist types are a bit different between VocaDB and UtaiteDB, as ycanardeau said
    • if having problems on UtaiteDB, you can always grab the swagger.json file from UtaiteDB API page and regernate your client just for UtaiteDB
  • Test cases are all @Ignored when generated by OpenAPI. To run some of them, explicitly remove the @Ignored and run it at your own risk (e.g. IP banned by VocaDB)

vocadb-openapi-client-java's People

Contributors

cxwudi avatar dependabot[bot] avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.