2
0
Fork 0
mirror of https://github.com/alexanderepstein/Bash-Snippets synced 2018-11-08 02:59:35 +01:00

Changing api endpoint for short

This commit is contained in:
Alex Epstein 2017-08-26 21:30:34 -04:00
parent 51caa49c48
commit 566cf8c810
2 changed files with 2 additions and 2 deletions

View file

@ -346,7 +346,7 @@ Written by: [Linyos Torovoltos](http://github.com/linyostorovovoltos)
* To grab the latest exchange rate between currencies: [fixer](http://fixer.io)
* To grab information on movies: [omdbapi](http://www.omdbapi.com/)
* To grab recommendations based on an item: [tastedive](https://tastedive.com)
* To determine masked link behind url shortner: [x.datasig](http://x.datasig.io)
* To determine masked link behind url shortner: [ki.tc](http://ki.tc)
* To grab cheatsheets for commands and languages: [cheat](http://cheat.sh/)
* To encode text into a qr code: [qrenco](http://qrenco.de)
* To grab a list of a users repositories: [github](https://developer.github.com/v3/)

View file

@ -134,7 +134,7 @@ expandURL()
else
url=$1
fi
response=$(httpGet http://x.datasig.io/short?url=$url)
response=$(httpGet http://ki.tc/short?url=$url)
errorCheck=$(echo $response | python -c "import sys, json; print json.load(sys.stdin)['/short']['message']" 2> /dev/null )
if [[ $errorCheck == "Error in /short" ]]; then
echo "Error: 404 could not find the website"