driesvints / sponsors

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

Create new Sponsorships #5

Open driesvints opened 3 years ago

driesvints commented 3 years ago

With a newly added createSponsorship mutation to the GitHub GraphQL API it should be possible to integrate this into the library.

// Make the current authenticated user sponsor the target account...
$client->sponsor('driesvints');

It's only possible of course to start sponsorships from the authenticated account. So implementations of the Sponsorable trait should have their own token set.