Project

owo

0.0
No commit activity in last 3 years
No release in over 3 years
A gem that utilizes the OwO API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

OwO.rb

Gem Version Gem Downloads Travis Inline docs Docs

A wrapper gem for the OwO API.

Dependencies

Installation

It's simple as running:

gem install owo

Examples

require 'owo'
owo = OwO::WhatsThis.new('TOKEN', url: 'owo.whats-th.is')
# You don't have to set the upload URL and the download URL as they are optional.

Shortening URLs

owo.shorten('https://whats-th.is') # "http://owo.whats-th.is/d263a4"
owo.shorten(['https://google.com', 'https://youtube.com']) # ["http://owo.whats-th.is/13xd1", "http://owo.whats-th.is/cqwec"]

Uploading Files

# Due note that when not using the absolute path, the path set will be where the process started, NOT where the ruby gem path.
owo.upload('./test/example.png') # "https://owo.whats-th.is/4463fc.png"
owo.upload(File.new(File.apsolute_path('./test/example.png'))) # "https://owo.whats-th.is/aa1nsa.png"
owo.upload([File.new(File.apsolute_path('./test/example2.png')), './test/example2.png']) # ["http://owo.whats-th.is/n1nsua.png", "http://owo.whats-th.is/nd91ka.png"]

Contributing

Pull requests are accepted. Make sure you add test suites for new features and make sure the code passes the spec (so the build doesn't break) and also pass rubocop. Tests are automatically run when commits are made in a pull request.

License

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