Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Typescript library for the Patreon V2 API

License

NotificationsYou must be signed in to change notification settings

ghostrider-05/patreon-api.ts

npmnpmGitHub issuesGitHub stars

Typescript oauth library for theV2 Patreon API with:

  • Support for Creator access tokens and oauth tokens
  • Client with methods for calling every endpoint, both resource and webhook endpoints
  • Methods to create a webhook server
  • Typescript types that strongly reflect your query for raw or simplified responses
constquery=QueryBuilder.campaign.setAttributes({campaign:['patron_count']})constpayload=awaitclient.fetchCampaign('campaign_id',query)// ^? { data: { attributes: { patron_count: number }}, ...}constcampaign=awaitclient.simplified.fetchCampaign('campaign_id',query)// ^? { patronCount: number, id: string, type: Type.Campaign }

Installation

npm install patreon-api.tspnpm add patreon-api.tsyarn add patreon-api.ts

Usage

Supported Patreon api: v2

The default API version for this package is2 and might change in major versions.

[!CAUTION]This package does not include v1 of the Patreon API and starts withAPI v2. The sections in the Patreon documentation are prefixed byAPIv2:. The Oauth flow, introduction andsections below sorting are related to all versions.

When the default API version is changed, old versions will still receive updates.You can not import this module by API version since it is unlikely that Patreon will release a new version any time soon.

To read more about how to use this library, go to thedocumentation. Still doubting if this library has everything you need related to the Patreon API?Compare all libraries yourself.

Compatibility

To check for compatibility with this package, look if your platform:

  • has the globals:AbortController,setTimeout,clearTimeout,setInterval,clearInterval,Request,fetch,URL andURLSearchParams
  • supportsES2020
  • supports thenode:crypto module:createHmac andrandomUUID

OpenAPI schema

This library is used to create the Patreon OpenAPI schemas for thepatreon-api-spec repository.

Examples

Changelog

Detailed changes are listed for each release inthe changelog.

For upcoming releases, seethe roadmap for planned changes.

Contributing

See thecode of conduct and thecontributing guide for how to contribute. You can also support the development by writing guides, posts and templates orby funding the maintainers.

Do you have a question about using this library?Open a Q&A discussion on GitHub.

License

MIT

Copyright (c) 2023-present, ghostrider-05

About

Typescript library for the Patreon V2 API

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

    Contributors6


    [8]ページ先頭

    ©2009-2025 Movatter.jp