Patreon / patreon-js

Use the Patreon API via OAuth.
MIT License
151 stars 30 forks source link

API Resources Documentation Error #39

Open Vilksian opened 3 years ago

Vilksian commented 3 years ago

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')
thooria commented 3 years ago

[]()

toppsdown commented 2 years ago

Also just ran into this

utkarsh-shrivastav77 commented 1 year ago

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