Skip to content

jabbalaci/UrlShortener-cs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener (C#)

An interactive URL shortener CLI app. for bit.ly. Implemented in C#, using bit.ly's API v4.

It was tested under Linux and Windows.

Usage

$ ./UrlShortener
Long URL: https://google.com

https://bit.ly/2R9zFOR

# expanded from shortened URL: https://google.com (matches)

Build

Compile and run:

$ dotnet run

Make a framework-dependent deployment:

$ dotnet publish -o dist -c Release

Pre-requisite

For this to work, you need an access token from bit.ly. Don't worry, it's free. After registration you can generate one for yourself. Then, add it as an environment variable called BITLY_ACCESS_TOKEN. For instance, under Linux add the following line to the end of your ~/.bashrc file:

export BITLY_ACCESS_TOKEN="..."

Related projects

I recommend the Rust version.

About

A URL shortener command-line app. using bit.ly

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors