I am currently trying to include the total_historical_amount_cents in the endpoint
however I’m not having any luck. I tried
but it doesn’t get me the total historical amount.
https://www.patreon.com/api/oauth2/api/current_user?fields%5Buser%5B=like_count,comment_count works, taken directly from https://docs.patreon.com/#resources so I assume it would follow the same format for a pledge resource but something doesn’t seem to be right.
Any help would be appreciated, thank you.
You’ve encoded the square brackets incorrectly, it’s
B look similar, so it’s easy to get them confused. I recommend using a url encoder tool instead of manually encoding the characters, to avoid mistakes like that.
Also, worth noting, when you specify any fields, you must specify all fields, meaning if you request an optional value like
total_historical_amount_cents then you must also specify any others you wish to access, e.g:
If you’re using a library (such as the official Patreon Java library, or the official Patreon Ruby library, or my unofficial Patreon PHP Library) the process of including default values alongside optional values will be handled for you.
Aha I see. It works perfectly now, thank you for the speedy and concise reply!