Python - simplest way to get patron list with email?

Hey,

i dont understand anything to the chaotic documentation https://docs.patreon.com/?python#campaign

I need to get my patron list with emails and discard all the rest informations.

The Patreon API implements the JSON API specification, so while the responses may look a little confusing at first, they do follow a standard and you do not need to use regular expressions to extract data.

If you’re not married to a language (I notice you mentioned trying PHP in one of your comments) you can try my PHP library which makes it very easy to extract a list of email addresses, e.g:

use Squid\Patreon\Patreon;

$patreon = new Patreon('creator_access_token');

$campaign = $patreon->campaigns()->getMyCampaignWithPledges();

echo $campaign->pledges->map(function ($pledge) {
    return $pledge->patron->email;
})->implode(',');

That will output a comma separated list of your patron’s email addresses.

1 Like

Is there an equivalent Python method?