javascript - About badly documented patreon-js -
i don't understand documentation, tried hard mentioned info below not quite sure "jsonapiurl" is. can tell me how achieve goal in quote.
response format
you can request specific related resources , or resource attributes want returned our api, per json:api specification. lists of valid includes , fields arguments provided in patreon/schemas. instance, if wanted request total amount patron has ever paid campaign, not included default, do:
const patreonapiclient = patreonapi(access_token) const url = jsonapiurl(`/current_user`, { fields: { pledge: [...pledge_schema.default_attributes, pledge_schema.attributes.total_historical_amount_cents] } }) patreonapiclient(url, callback)
more info below
Comments
Post a Comment