urlshortener 0.4.0

A very simple url shortener library
Documentation

urlshortener-rs

MIT licensed

A very simple urlshortener for Rust.

This library aims to implement only URL shortener services which do not require any authentication (ex: goo.gl, bit.ly) and to provide an interface as minimal and simple as possible.

The reason for this is that users of such a library might only need to get the shortened URL, rather than a service using authentication. This is also a reason that this library aims to use as few dependencies as possible.

Implementations

Currently the following URL shorteners are implemented:

  • bn.gy
  • is.gd
  • readability.com
  • v.gd
  • bam.bz
  • fifo.cc
  • tiny.ph
  • tny.im
  • s.coop
  • bmeo.org

The following services are supported, but are discouraged from use, due to restrictions such as rate limits:

  • tinyurl.com
  • psbe.co
  • rlu.ru
  • sirbz.com
  • hec.su
  • abv8.me
  • nowlinks.net

Usage

extern crate urlshortener;

use urlshortener::UrlShortener;

fn main() {
    let us = UrlShortener::new();
    let long_url = "https://google.com";
    println!("Short url for google: {:?}", us.try_generate(long_url));
}

License

This project is licensed under the MIT license.