patreon-js icon indicating copy to clipboard operation
patreon-js copied to clipboard

API Resources Documentation Error

Open Vilksian opened this issue 3 years ago • 3 comments

An error in the API Resources section of the documentation https://www.npmjs.com/package/patreon#api-resources

const { patreon, jsonApiURL } = require('patreon')
const pledge_schema = require('patreon/schemas/pledge')
 
const patreonAPIClient = patreon(access_token)
const url = jsonApiURL(`/current_user`, {
  fields: {
    pledge: [...pledge_schema.default_attributes, pledge_schema.attributes.total_historical_amount_cents]
  }
})
patreonAPIClient(url, callback)

On the second line, it should be

const pledge_schema = require('patreon/dist/schemas/pledge')

Vilksian avatar Aug 26 '20 18:08 Vilksian

thooria avatar Sep 19 '20 18:09 thooria

Also just ran into this

toppsdown avatar Sep 18 '21 00:09 toppsdown

Hi is this issue this open if not can assign me other issue

utkarsh-shrivastav77 avatar May 15 '23 11:05 utkarsh-shrivastav77