PHP code example of squid / patreon
1. Go to this page and download the library: Download squid/patreon library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
squid / patreon example snippets
use Squid\Patreon\Patreon;
$patreon = new Patreon('access_token');
$campaign = $patreon->campaigns()->getMyCampaignWithPledges();
echo "Hello, {$campaign->creator->full_name}! You have {$campaign->patron_count} patrons.\n";
$campaign->pledges->each(function ($pledge) {
echo "{$pledge->patron->full_name} has been a patron since {$pledge->created_at}.\n";
});
bash
composer