Skip to content

omnifund/opencollective API reference

Floor
Provider · Omnifund
Version
1.x
Conformance suite
not wired
Verified for real
Verified in part
Licence
MIT
composer require omnifund/opencollective:1.x-dev

Read from the package's own PHP files at the commit 70f4f8d8c334: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

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