You can do this by calling the get_data function directly and by passing that function the end point URL for the API with the parameters you want. This is all the other fetch_[thing] functions are doing is just parsing an input or two and manipulating a string to pass to the get_data function, which given it’s public declaration is callable directly.
For instance, the
$campaignInfo = $api_client->fetch_page_of_members_from_campaign($firstCampaign, 100, null)
call you’re doing, it’s really just calling
$campaignInfo = $api_client->get_data(“campaigns/{$firstCampaign}/members?page%5Bsize%5D=100”)
after it finishes parsing the campaign ID from $firstCampaign, the page size from the 100, and whether or not you want a particular page (cursor, as it is referred to in the code). To add includes to that you should just have to modify it to include the include field, which would look something like below:
$api_client->get_data(“campaigns/{$firstCampaign}/members?page%5Bsize%5D=100&include=address,campaign,user,currently_entitled_tiers”)
Edited for whatever includes you want. To delineate certain fields for those encodes, you expand it further to look something like below:
$api_client->get_data(“campaigns/{$firstCampaign}/members?page%5Bsize%5D=100&include=address,campaign,user,currently_entitled_tiers&fields”.urlencode(‘[address]’).“=city,state&fields”.urlencode(‘[user]’).“=full_name,email”)
Fair warning, I’ve not actually tested that string to see if it is perfectly formatted, but it should guide you in the right direction on how to do this.