Update riley gender api endpoints

This commit is contained in:
MaeIsBad 2022-10-11 10:02:26 +02:00
parent 0db4f6a3e8
commit f3406f1ae9

View file

@ -67,8 +67,9 @@ in
exec = pkgs.writeShellScript "riley-gender" ''
set -euo pipefail
until ping -c1 google.com >/dev/null 2>&1; do :; done
gender="$(${pkgs.curl}/bin/curl 'https://rly.cx/api/gender')"
pronouns="$(${pkgs.curl}/bin/curl 'https://rly.cx/api/pronouns')"
summary="$(${pkgs.curl}/bin/curl 'https://riley.lgbt/api/summary')"
pronouns="$(echo $summary | jq -r '.pronouns')"
gender="$(echo $summary | jq -r '.gender')"
echo -n "Riley: $gender ($pronouns)"
'';
};