We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I use this pledge_schema thing to achieve this:
For instance, if you wanted to request the total amount a patron has ever paid to your campaign, which is not included by default, you could 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)
I required jsonApiURL from here https://github.com/Patreon/patreon-js/blob/master/src/jsonapi-url.js but then what? I get Uncaught error: pledge_schema is not defined
The text was updated successfully, but these errors were encountered:
Hey @FiatPax ! Try import pledge_schema from 'src/schemas/pledge'
import pledge_schema from 'src/schemas/pledge'
Sorry, something went wrong.
Alright I tried and now I get this error: Cannot read property 'Symbol(Symbol.iterator)' of undefined
Just in case you need to see my code
var patreonAPI = patreon.default var patreonOAuth = patreon.oauth test(request, reply) { var patreonAPIClient = patreonAPI(access_tkn) const url = jsonApiURL(`/current_user`, { fields: { pledge: [...pledge_schema.default_attributes, pledge_schema.attributes.total_historical_amount_cents] } }) patreonAPIClient(url, function (err, res) { reply(res) }) }
Struggled with trying to inlude the total_historical_amount_cents field in the json return. Found the schemas in the 'dist' folder of the npm install:
import pledge_schema from 'patreon/dist/schemas/pledge';
But not working, just get a 500 error following the docs.
No branches or pull requests
How do I use this pledge_schema thing to achieve this:
I required jsonApiURL from here https://github.com/Patreon/patreon-js/blob/master/src/jsonapi-url.js but then what? I get Uncaught error: pledge_schema is not defined
The text was updated successfully, but these errors were encountered: