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 #15

Closed Gummibeer closed 2 years ago

Gummibeer commented 2 years ago

resolves #13

This PR switches the current single method calls to a fluent builder style for easier readability and this also allows us to use different classes per context - as the GraphQL queries for viewer and user/organization are different and also allow different things. For example only a viewer can retrieve the tiers for a sponsorship.

I renamed and changed some more class names in that context as I think they match better now. But I'm open for discussion here and change things back.

Gummibeer commented 2 years ago