driesvints / sponsors

A package for PHP to interact with GitHub Sponsors.
MIT License
104 stars 7 forks source link

Adopt fluent syntax for client calls #13

Closed driesvints closed 2 years ago

driesvints commented 2 years ago

Improve the API to work more like https://github.com/Astrotomic/laravel-github-sponsors

// Before...
$client->isSponsoredBy('driesvints', 'nunomaduro');
$client->isViewerSponsoring('driesvints');
$client->isViewerSponsoredBy('driesvints');

// After...
$client->login('driesvints')->isSponsoredBy('nunomaduro');
$client->viewer()->isSponsoring('driesvints');
$client->viewer()->isSponsoredBy('driesvints');