diff options
| author | ars <asav1410@gmail.com> | 2020-10-28 19:27:49 +0000 | 
|---|---|---|
| committer | ars <asav1410@gmail.com> | 2020-10-28 19:27:49 +0000 | 
| commit | d31c1a3b3180f37c40585f870e830e3265cd3f1e (patch) | |
| tree | ed6e338b3e6198694b07e0c6652c9879c5d2757c /oedquery.sh | |
| parent | 556797400b94070f008ba003419622916ed10bda (diff) | |
Add check for exceeded API usage quota.
Diffstat (limited to 'oedquery.sh')
| -rwxr-xr-x | oedquery.sh | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/oedquery.sh b/oedquery.sh index 88a4aae..b01b201 100755 --- a/oedquery.sh +++ b/oedquery.sh @@ -23,6 +23,11 @@ _getdata() {    lemmasUrl=https://od-api.oxforddictionaries.com/api/v2/lemmas/$language/$word    # get lemmas to link an inflected form back to its headword (required to get definition)    result=$(eval curl $OPTS $lemmasUrl) +  if [[ "$result" == "Authentication failed" ]] +  then +    echo "Authentication failed, probably exceeded monthly usage." +    exit 0 +  fi    ret=$?    if [ "$ret" -ne 0 ]    then  | 
