Crates.io | tinyurl |
lib.rs | tinyurl |
version | 0.1.1 |
source | src |
created_at | 2021-03-22 19:33:43.344674 |
updated_at | 2021-03-22 19:41:34.94432 |
description | An abstraction on top the tinyurl API in rust for quickly generating short urls. |
homepage | |
repository | https://github.com/collinsmuriuki/tinyurl |
max_upload_size | |
id | 372265 |
size | 34,993 |
An abstraction on top the tinyurl API in rust for quickly generating short urls.
use tinyurl::TinyURL;
// without alias
let short = TinyURL::new("https://example.com").build();
assert!(short.is_ok());
// with alias
let aliased = TinyURL::new("https://example.com")
.alias("some-random-nickname")
.build();
assert!(aliased.is_ok());
use tinyurl::tiny;
// without alias
let short = tiny!("https://github.com");
assert!(short.is_ok());
// with alias
let short = tiny!("https://github.com", alias = "random-random-alias");
assert!(short.is_ok());
cargo install tinyurl
tinyurl 0.1.0
Collins Muriuki <murerwacollins@gmail.com>
An abstraction on top the tinyurl API in rust for quickly generating short urls.
USAGE:
tinyurl [OPTIONS] <uri>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-a, --alias <alias> Optional unique url alias
ARGS:
<uri> The uri to be shortened