Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonahoffline/link_shrinkex
Elixir library for creating short URLs using Google's URL Shortener API.
https://github.com/jonahoffline/link_shrinkex
Last synced: about 1 month ago
JSON representation
Elixir library for creating short URLs using Google's URL Shortener API.
- Host: GitHub
- URL: https://github.com/jonahoffline/link_shrinkex
- Owner: jonahoffline
- License: mit
- Created: 2013-06-24T00:03:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-10-19T17:04:49.000Z (about 7 years ago)
- Last Synced: 2024-10-06T07:48:10.792Z (2 months ago)
- Language: Elixir
- Homepage:
- Size: 243 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Elixir library for creating short URLs using Google's URL Shortener API. (Third Party APIs)
- fucking-awesome-elixir - link_shrinkex - Elixir library for creating short URLs using Google's URL Shortener API. (Third Party APIs)
- awesome-elixir - link_shrinkex - Elixir library for creating short URLs using Google's URL Shortener API. (Third Party APIs)
README
# LinkShrinkex (v1.0.0) [![Build Status](https://travis-ci.org/jonahoffline/link_shrinkex.png?branch=master)](https://travis-ci.org/jonahoffline/link_shrinkex)
Create short URLs using Google's URL Shortener API.
Written in Elixir.## Quickstart ##
Fetching dependencies and running on elixir console:
```console
mix deps.get
iex -S mix
```You can also run the tests:
```console
mix test
```## Usage ##
```elixir
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
* [Jonah Ruiz](http://www.pixelhipsters.com)## Contributing
Fork this repo
Then run this command to fetch dependencies and run tests:
```console
MIX_ENV=test mix do deps.get, test
```Create a Pull Request :)