Aller au contenu

omnifund/opencollective Référence de l’API

Étage
Fournisseur · Omnifund
Version
1.x
Suite de conformité
non branchée
Vérifié en réel
Vérifié en partie
Licence
MIT
composer require omnifund/opencollective:1.x-dev

Lue dans les fichiers PHP du paquet au commit 70f4f8d8c334 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

Omnifund\OpenCollective

  • OpenCollectiveFactory class

    Open Collective, from its options:

    4 options · 1 method

  • OpenCollectiveProvider class

    A collective through Open Collective's GraphQL API v2: its profile (the backers counted, the yearly budget Open Collective estimates as its income), its tiers, its backers - public data, which the API gives without a key.

    7 methods · 1 constant

Omnifund\OpenCollective

OpenCollectiveFactory class

final class OpenCollectiveFactory extends ProviderFactory OpenCollectiveFactory.php:19

Open Collective, from its options:

account the collective's slug: "webpack" (required) token a personal token, optional: public data is read without one, at 10 calls a minute; a token (sent as Personal-Token) raises the limit endpoint https://api.opencollective.com/graphql/v2 user_agent sent with every call

Options

OptionDefault
token''
endpointOpenCollectiveProvider::ENDPOINT
user_agent'omnifund (+https://github.com/glitchr-omnisense/omnifund)'
accountrequired

OpenCollectiveFactory::__construct()

public function __construct(readonly HttpClientInterface $http)

OpenCollectiveProvider class

final class OpenCollectiveProvider implements ProfileInterface, SponsorsInterface, TiersInterface OpenCollectiveProvider.php:25

A collective through Open Collective's GraphQL API v2: its profile (the backers counted, the yearly budget Open Collective estimates as its income), its tiers, its backers - public data, which the API gives without a key.

const ENDPOINT = 'https://api.opencollective.com/graphql/v2'

OpenCollectiveProvider::__construct()

public function __construct(readonly HttpClientInterface $http, readonly string $account, readonly ?string $token = null, readonly string $endpoint = self::ENDPOINT, readonly string $userAgent = 'omnifund (+https://github.com/glitchr-omnisense/omnifund)')

OpenCollectiveProvider::getName()

public function getName(): string

OpenCollectiveProvider::getTitle()

public function getTitle(): string

OpenCollectiveProvider::capabilities()

public function capabilities(): Capabilities

OpenCollectiveProvider::profile()

public function profile(?string $account = null): Profile

OpenCollectiveProvider::sponsors()

public function sponsors(?string $account = null, ?int $limit = null): array

OpenCollectiveProvider::tiers()

public function tiers(?string $account = null): array