This repository has been archived on 2023-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
bog-bbot-archive/src/shell/helloasso.sh

26 lines
677 B
Bash
Executable File

#!/bin/bash
ids="axiom-team:tYrjD6rrfStJXBqHhzNET"
ha="https://api.helloasso.com/v3"
adherents() {
url="$ha/campaigns/000001053192/actions.json?type"
curl -m 5 --user $ids -s $url | jq -r '.resources[] | .date + " , " + .first_name + " " + .last_name + " - " + .email' | sed 's/T.*,//'
}
adherentsSoft() {
url="$ha/campaigns/000001053192/actions.json?type"
curl -m 5 --user $ids -s $url | jq -r '.resources[] | .date + " , " + .first_name + " " + .last_name' | sed 's/T.*,//'
}
cagnotte() {
url="$ha/campaigns/000001053192.json"
curl -m 5 --user $ids -s $url | jq -r '.name, {"Donnateurs": .supporters},{"Fonds":.funding},.url' | grep -vE '{|}'
}
$@
exit 0