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 — 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 --ha-client-id="$(pass helloasso-clientid)" --ha-client-secret="$(pass helloasso-clientsecret)" --ha-org=afpy
Then let's discover which Discourse badges we can use:
$ helloasso-to-discourse list-badges --discourse-url=https://discuss.afpy.org --discourse-api-key="$(pass afpy/discuss.afpy.org-api-key)"
2 — 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 --ha-client-id="$(pass helloasso-clientid)" --ha-client-secret="$(pass helloasso-clientsecret)" --ha-org=afpy --discourse-url=https://discuss.afpy.org --discourse-api-key="$(pass afpy/discuss.afpy.org-api-key)" --ha-form adhesion-2024-a-l-afpy --discourse-badge adherant-afpy
And an example to assign Discourse badge pyconfr-2023
to members having registered for the pyconfr-2023
event on HelloAsso:
$ helloasso-to-discourse sync --ha-client-id="$(pass helloasso-clientid)" --ha-client-secret="$(pass helloasso-clientsecret)" --ha-org=afpy --discourse-url=https://discuss.afpy.org --discourse-api-key="$(pass afpy/discuss.afpy.org-api-key)" --ha-form pyconfr-2023 --discourse-badge pyconfr-2023
$ helloasso-to-discourse sync --ha-client-id="$(pass helloasso-clientid)" --ha-client-secret="$(pass helloasso-clientsecret)" --ha-org=afpy --discourse-url=https://discuss.afpy.org --discourse-api-key="$(pass afpy/discuss.afpy.org-api-key)" --ha-form pyconfr-2024 --discourse-badge pyconfr-2024
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
File details
Details for the file helloasso_to_discourse-0.4.tar.gz
.
File metadata
- Download URL: helloasso_to_discourse-0.4.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb5ab3e59e7fc3758ca19f2ca195b885a693036d3ef3fa7ee1aeb2ce261e1a5a |
|
MD5 | 2e67557419758b9265a22d4e17168a37 |
|
BLAKE2b-256 | a83c8dc6fd589e708497191a6fec0a043f7fb732f7baa3a0cbb427bf7f84d0a2 |
Provenance
File details
Details for the file helloasso_to_discourse-0.4-py3-none-any.whl
.
File metadata
- Download URL: helloasso_to_discourse-0.4-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4a7af71ba38386d44f13e0797ed6452a927118869a03182c094a3e1c3f82b56 |
|
MD5 | a1b4be3a07dc2976071a0dd063c9273b |
|
BLAKE2b-256 | 9cefe09f9434aa299649d0499372707636af0acb78d096a22ac64a63be967150 |