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:
parent
51caa49c48
commit
566cf8c810
2 changed files with 2 additions and 2 deletions
|
@ -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/)
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue