Thank your Patreon Backers and Sponsors via Twitter
An automated thank-you for backers, patrons and sponsors via Twitter.
This is a Python OpenFaaS function that responds to webhooks from Patreon.
You can deploy this code to any OpenFaaS cluster.
faas-cli to deploy
USERNAME
variable we use later# USERNAME corresponds to your username on OpenFaaS Cloud
export USERNAME="openfaas"
# You get this after adding your Patreon webhook
export PATREON_WEBHOOK_SECRET=""
export CONSUMER_KEY=""
export CONSUMER_SECRET=""
export ACCESS_TOKEN=""
export ACCESS_TOKEN_SECRET=""
faas-cli cloud seal --name "$USERNAME"-backer-thankyou-secrets \
--literal patreon-webhook-secret="${PATREON_WEBHOOK_SECRET}" \
--literal consumer-key="${CONSUMER_KEY}" \
--literal consumer-secret="${CONSUMER_SECRET}" \
--literal access-token="${ACCESS_TOKEN}" \
--literal access-token-secret="${ACCESS_TOKEN_SECRET}"
Now install the OpenFaaS Cloud [Community Cluster] app to your repo and push your new changes.
If you run into any issues, please feel free to open a GitHub issue.
env-var | description | default |
---|---|---|
display_removed |
Tweet when someone removes their pledge | false |
consumer_key |
consumer_key from Twitter API | `` |
consumer_secret |
consumer_secret from Twitter API | `` |
access_token |
access_token from Twitter API | `` |
access_token_secret |
access_token_secret from Twitter API | `` |
webhook_secret |
configured in Patreon to verify webhooks | `` |
Contributions are welcome, but must be tested end-to-end.
Commits should also be signed-off with git commit -s
.
Roadmap: