liberapay / liberapay.com

Source code of the recurrent donations platform Liberapay
https://liberapay.com/
1.64k stars 207 forks source link

Setting up donations in bulk by uploading a CSV #939

Open Changaco opened 6 years ago

Changaco commented 6 years ago

From https://twitter.com/thetrueenetheru/status/953850144897744896:

how hard would it be to allow us to upload a csv of people to donate to and how much.. i want to export my list of installed packages to the platform to give back... it could add donations or pledges etc. sort of a quick manage for all my intended recipients...

then i could create a script that exports info from my package manager each month and pushes it to librepay somehow.. to track my real world usage of open source.

trebmuh commented 6 years ago

nice idea

Changaco commented 6 years ago

We have an undocumented JSON endpoint for adding/modifying donations in bulk, https://github.com/liberapay/liberapay.com/blob/259/www/%25username/tips.json.spt (https://liberapay.com/about/me/tips.json).

enetheru commented 6 years ago

sweet! beans...time to do some learning to get my idea up and running.

enetheru commented 6 years ago

hola, i tried this: curl -u 11008 -H "Content-Type: application/json" -X POST -d '{"username":"davidrevoy","amount":5, "period":"monthly" }' https://liberapay.com/about/me/tips.json

and I didn't manage to change an existing tip for davidrevoy, then i did it too many times.. lol.. what would be the correct post command for an invidual pledge, then i can extrapolate to multiple pledges at a time.

enetheru commented 6 years ago

Also I had a big long streaming session with my mate regarding how we might implement our side of things and what we need from librepay. if you were inclined to waste time watching low signal to noise ratio videos of people talking shit: https://youtu.be/bmCegptzP3E?t=26m14s

i hope to have something to show soon( soon = within a week or two )