All Projects → whats-this → Owo.java

whats-this / Owo.java

Licence: mit
Read-only mirror of https://owo.codes/whats-this/owo.java

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Owo.java

Kin Openapi
OpenAPI 3.0 implementation for Go (parsing, converting, validation, and more)
Stars: ✭ 776 (+12833.33%)
Mutual labels:  api
Yasumi
The easy PHP Library for calculating holidays
Stars: ✭ 788 (+13033.33%)
Mutual labels:  api
Goyave
🍐 Elegant Golang REST API Framework
Stars: ✭ 811 (+13416.67%)
Mutual labels:  api
Ftl
The Pi-hole FTL engine
Stars: ✭ 776 (+12833.33%)
Mutual labels:  api
Graphiti
Stylish Graph APIs
Stars: ✭ 783 (+12950%)
Mutual labels:  api
Pizzly
The simplest, fastest way to integrate your app with an OAuth API 😋
Stars: ✭ 796 (+13166.67%)
Mutual labels:  api
Telize
High performance JSON IP and GeoIP REST API (IP Geolocation)
Stars: ✭ 774 (+12800%)
Mutual labels:  api
Api Platform
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.
Stars: ✭ 7,144 (+118966.67%)
Mutual labels:  api
Ngx Restangular
Restangular for Angular 2 and higher versions
Stars: ✭ 787 (+13016.67%)
Mutual labels:  api
Notion Api Worker
Notion as CMS with easy API access
Stars: ✭ 806 (+13333.33%)
Mutual labels:  api
Pytradfri
IKEA Trådfri/Tradfri API. Control and observe your lights from Python. Examples available. On pypi. Sans-io.
Stars: ✭ 778 (+12866.67%)
Mutual labels:  api
Apidoc
RESTful API 文档生成工具,支持 Go、Java、Swift、JavaScript、Rust、PHP、Python、Typescript、Kotlin 和 Ruby 等大部分语言。
Stars: ✭ 785 (+12983.33%)
Mutual labels:  api
Deno Drash
A REST microframework for Deno's HTTP server with zero 3rd party dependencies.
Stars: ✭ 795 (+13150%)
Mutual labels:  api
Parallec
Fast Parallel Async HTTP/SSH/TCP/UDP/Ping Client Java Library. Aggregate 100,000 APIs & send anywhere in 20 lines of code. Ping/HTTP Calls 8000 servers in 12 seconds. (Akka) www.parallec.io
Stars: ✭ 777 (+12850%)
Mutual labels:  api
Themoviedb
A node.js module with support for both callbacks and promises to provide access to the TMDb API
Stars: ✭ 5 (-16.67%)
Mutual labels:  api
Kroki
Creates diagrams from textual descriptions!
Stars: ✭ 774 (+12800%)
Mutual labels:  api
Reality
Comprehensive data proxy to knowledge about real world
Stars: ✭ 795 (+13150%)
Mutual labels:  api
Blog
🤣本项目有不同开发版本,最新版底层基于 abp vNext 搭建和免费开源跨平台框架 .NET5 进行开发,使用 MongoDB 存储数据,Redis 缓存数据。项目采用前后端分离的模式进行开发,API 遵循 RESTful 接口规范,页面使用 Blazor 进行开发,可作为 .NET Core 入门项目进行学习。If you liked `Blog` project or if it helped you, please give a star ⭐️ for this repository. 👍👍👍
Stars: ✭ 827 (+13683.33%)
Mutual labels:  api
Api
📖「一个」、「Time 时光」、「开眼」、「一席」、「梨视频」、「微软必应词典」、「金山词典」、「豆瓣电影」、「中央天气」、「魅族天气」、「每日一文」、「12306」、「途牛」、「快递100」、「快递」应用 Api。仅供学习,禁止商业使用,侵权请联系删除。
Stars: ✭ 6,544 (+108966.67%)
Mutual labels:  api
Xxl Api
A api management platform.(API管理平台XXL-API)
Stars: ✭ 803 (+13283.33%)
Mutual labels:  api

owo.java

Download CircleCI

This is an API wrapper for https://whats-th.is/ written in Java. This wrapper requires Java 7 or above to function, it has also been confirmed working with Android (Minimum version is Marshmallow, because of Java 7).

Download

Replace VERSION with a specific version. The latest version can be found at the top of the readme Maven:

<dependencies>
    <dependency>
      <groupId>me.bramhaag</groupId>
      <artifactId>owo-java</artifactId>
      <version>VERSION</version>
    </dependency>
</dependencies>

Gradle:

repositories {
    jcenter()
}

dependencies {
    compile 'me.bramhaag:owo-java:VERSION'
}

Or you can build the jar yourself (see below)

Usage

To get started, create an OwO object using the Builder class.

REQUIRED TOKEN should be replaced with your own unique OwO API key
(OPTIONAL) You can set endpoint to use a custom endpoint, default endpoint is https://api.awau.moe/
(OPTIONAL) You can set uploadUrl to use a custom upload url, default upload URL is https://owo.whats-th.is/
(OPTIONAL) You can set shortenUrl to use a custom shorten url, default upload URL is https://awau.moe/

OwO owo = new OwO.Builder()
                .setKey("TOKEN")
                .setUploadUrl("https://owo.whats-th.is/")
                .setShortenUrl("https://thats-a.link/")
                .build();

Next, we can use our newly created owo object to upload files and shorten urls

OwO#upload and OwO#shorten both return OwoActions, these can be executed async using the execute method, but can also be executed sync using the executeSync method

owo.shorten("http://my_domain.com").execute(url -> System.out.println("Shortened link: " + url));
owo.upload(new File("my_image.png")).execute(file -> System.out.println("Image URL: " + file.getUrl()));

This code can throw an exception when something goes wrong, to handle this exception we can add an extra throwable argument to the execute method

owo.shorten("http://my_domain.com").execute(url -> System.out.println("Shortened link: " + url), throwable -> /* handle error */);
owo.upload(new File("my_image.png")).execute(file -> System.out.println("Image URL: " + file.getUrl()), throwable -> /* handle error */);

How to build

With dependencies
  1. Run gradlew shadowJar in project's root.
  2. The file is located in build/lib.
Without dependencies
  1. Run gradlew build in project's root.
  2. The file is located in build/lib.

Contributing

Pull requests are accepted, but please make sure your code actually works.

License

The contents of this repository are licensed under the MIT license. A copy of the MIT license can be found in LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].