Script that can be used to create a bitlink or to get conversion statistics for an already existing bitlink.
It is recommended to use virtualenv/venv to isolate the project.
You can get Access Token here at official Bitly site. Put him to your .env file in root folder.
Your .env will looks like TOKEN=05f23348110207rto750a678ca56a98ad3227fd9
Python3 should be already installed. Then use pip (or pip3, if there is a conflict with Python2) to install dependencies:
pip install -r requirements.txt
# Get new bitlink
$ python main.py <put here link you want to short>
Your bitlink: <your bitlink>
# Get conversion statistics
$ python main.py <your bitlink>
Total clicks: <all time total clicks>
The code is written for educational purposes on online-course for web-developers dvmn.org.