You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.
With this library it should be possible to check if users are sponsoring through specific tiers. This will allow for even more fine-graned ACL capabilities and perk-granting.
The API would look as something like below. The used token is that of the "driesvints" GitHub account.
// Check if nunomaduro is sponsoring driesvints on the "$5 a month" tier:$client->hasTier('nunomaduro', '$5 a month');
// Through the Sponsorable trait...$user->hasTier('$5 a month');
// If the Sponsorable has its own token set and wants to check if they are sponsoring on a specific account:$user->hasTierOn('$5 a month', 'nunomaduro');
These requests would always need to be made from the viewer's standpoint so the used token will need to be properly set. These API's probably need to be fleshed out some more.
GraphQL field of "tier":
tier {
closestLesserValueTier {
name
}
createdAtisCustomAmountisOneTimemonthlyPriceInCentsmonthlyPriceInDollarsnameupdatedAt
}
All tiers also have internal ID's on their node through their GraphQL field. But these aren't surfaced in the UI of GitHub Sponsors.
The text was updated successfully, but these errors were encountered:
With this library it should be possible to check if users are sponsoring through specific tiers. This will allow for even more fine-graned ACL capabilities and perk-granting.
The API would look as something like below. The used token is that of the "driesvints" GitHub account.
These requests would always need to be made from the viewer's standpoint so the used token will need to be properly set. These API's probably need to be fleshed out some more.
GraphQL field of "tier":
All tiers also have internal ID's on their node through their GraphQL field. But these aren't surfaced in the UI of GitHub Sponsors.
The text was updated successfully, but these errors were encountered: