owocr

Build Status

A wrapper in Crystal for the OwO What's This? file sharing service.

Instructions (Developers)

  1. Add this as a dependency to your shards.yml:
dependencies:
  owocr:
    github: whats-this/owocr
    branch: master # as of now this requires 0.24.2 at the very least
  1. Run crystal deps or shards update
  2. Check the usage below

Usage

First a client is needed:

require "owocr"

client = OwO::WhatsThis.new "token", "optional user-agent for the requests", "optional api url"

You will then need to utilise one of the methods as listed:

  1. OwO::WhatsThis#shorten(url : String|URI) : String - Shortens the given URL or URI and returns the shortened ID.
  2. OwO::WhatsThis#upload(first : UploadData, second : UploadData?, third : UploadData? = nil) : Tuple(UploadedFileData?, UploadedFileData?, UploadedFileData?) - Uploads the file(s) and returns the uploaded file(s).

For more in-depth explanation of these, you can go to the OwO.codes API page.

Repository

owocr

Owner
Statistic
  • 2
  • 0
  • 0
  • 0
  • 1
  • over 5 years ago
  • March 15, 2018
License

MIT License

Links
Synced at

Wed, 17 Apr 2024 20:41:52 GMT

Languages