Skip to content

Elixir library for creating short URLs using Google's URL Shortener API.

License

Notifications You must be signed in to change notification settings

jonahoffline/link_shrinkex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkShrinkex (v1.0.0) Build Status

Create short URLs using Google's URL Shortener API. Written in Elixir.

Quickstart

Fetching dependencies and running on elixir console:

mix deps.get
iex -S mix

You can also run the tests:

mix test

Usage

iex> LinkShrinkex.shrink_url "http://www.elixir-lang.org"
{:ok, "http://goo.gl/Shz0u"}

iex> LinkShrinkex.shrink_url "http://www.elixir-lang.org", [:json]
{:ok,"{\"kind\":\"urlshortener#url\",\"id\":\"http://goo.gl/Shz0u\",\"longUrl\":\"http://www.elixir-lang.org/\"}"}

iex> LinkShrinkex.shrink_url "http://www.elixir-lang.org", [:list]  
{:ok,[kind: "urlshortener#url", id: "http://goo.gl/Shz0u", longUrl: "http://www.elixir-lang.org/"]}

iex> LinkShrinkex.shrink_url "http://www.elixir-lang.org", [:urls]  
{:ok,[id: "http://goo.gl/Shz0u", longUrl: "http://www.elixir-lang.org/"]}

Enjoy!

Author

Contributing

Fork this repo

Then run this command to fetch dependencies and run tests:

MIX_ENV=test mix do deps.get, test

Create a Pull Request :)

About

Elixir library for creating short URLs using Google's URL Shortener API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages