Bug in your php api

In v2, page[count] has been replaced with page[size] to adhere to the JSONAPI spec. But the PHP API doesn’t include this update.

So on this function:

fetch_page_of_members_from_campaign()

Replace:

$url = campaigns/{$campaign_id}/members?page%5Bcount%5D={$page_size};

With:

$url = campaigns/{$campaign_id}/members?page%5Bsize%5D={$page_size};

Can you please push this to the github package?

Does the function fail when you attempt to use it?

No, but the page parameter is incorrect and not working as I outlined above. Meaning, there is no way to fetch more than 20 members at a time in the current function.

The reason is because there is a bug in the function. You will need to adjust page%5Bcount to page%5Bsize and then the $page_size variable will work properly.

It is very easy for you to verify this. Set $page_size for example to 100 and you will see what I mean.

You really need to adjust the PHP API on github with this fix.

I believe it was not possible to get more than 20 listings from the api already, regardless of the parameter. Needs to be checked.

I just checked and yes, you can get more than 20 with the corrected code I provided you. Have you had a chance to test it yourself? And if you did, will you push this correction to the github package?

I just provided you a fix to the bug so not sure how much more I can help you. =)

Are you a third-party developer who is working for Patreon? Are you the maintainer of the github packages? If not, please let me know who I should connect with.

Do you have an outstanding pr at github?

I am not on github unfortunately (long story). Can you update it?

Updated.