Assign Discourse Badges to participants of HelloAsso events
Project description
Helloasso to Discourse
This works in two distinct steps: first fetch HelloAsso data, then sync with Discourse.
Installing
pip install .
Using
1 — Fetch HelloAsso data
Use the fetch
subcommand, I use it as is:
$ helloasso-to-discourse fetch "$(pass helloasso-clientid)" "$(pass helloasso-clientsecret)" afpy
this fetches the data of the given organization, here named afpy
, it creates an ./afpy
file.
2 — Choose what to sync
The goal is to sync an HelloAsso event (they call it forms
) to a Discourse Badge.
First let's discover which HelloAsso 'forms' we can use:
$ helloasso-to-discourse list-forms ./afpy
Then let's discover which Discourse badges we can use:
$ helloasso-to-discourse list-badges https://discuss.afpy.org "$(pass discuss.afpy.org-api-key)"
3 — Sync
This step actually assigns badges to Discourse users:
As an example to assign badge "membre" to HelloAsso users having paid for the form named adhesion-2023-a-l-afpy
:
$ helloasso-to-discourse sync https://discuss.afpy.org "$(pass discuss.afpy.org-api-key)" ./afpy adhesion-2023-a-l-afpy membre
And an exemple to assign Discourse badge pyconfr-2023
to members having registered for the pyconfr-2023
event on HelloAsso:
$ helloasso-to-discourse sync https://discuss.afpy.org "$(pass discuss.afpy.org-api-key)" ./afpy pyconfr-2023 pyconfr-2023
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for helloasso-to-discourse-0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7686ff821c4bfa5eb7ce21bdd04b0ecf6d17eb9c57e290f04e94675a3720a8b |
|
MD5 | b68165c0506272897abad73062a07e15 |
|
BLAKE2b-256 | a3c85df6c9270ffd316aac79627c45c49ddf1ecb039f30f6d4cea5860de10ff4 |
Hashes for helloasso_to_discourse-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e046b24a6f0b1dbeb2a4b4107671b28440641ccd50b2abd34059e717937a31af |
|
MD5 | 7d602d89bdceb41d16d0d00e0a2cb695 |
|
BLAKE2b-256 | 552a0e6cc368855b3d0325d9261d35807110c88c6f9426c0b86af279504ca3af |