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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7132dbe18c996f5b091ab6ae78c1280515118280dd895a278be33e04da8fc7a7 |
|
MD5 | d3f21f96e3ce2535a59d563ee6282a6d |
|
BLAKE2b-256 | 3aa43e2774b30a42ddabf075c92d1050ad0076697975cdab017d283aaa83bd45 |
Hashes for helloasso_to_discourse-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d4d5e09bec3d630e3c6390eafaf5c9a5e8b7cf764f670f81eaae8e1a8e88d4 |
|
MD5 | f3f75551a69dcb940a71177e319f95b0 |
|
BLAKE2b-256 | 687936d15c2ad74ad5642d9c1bf60f4c03c97287edd3df7a9303a97ae2ad5599 |