zendesk / zendesk_api_client_php

Official Zendesk API v2 client library for PHP
336 stars 259 forks source link

Incremental sideload comment_events #387

Closed aharrison7 closed 6 years ago

aharrison7 commented 6 years ago

I see in the main docs that sideload is supported

$tickets = $client->tickets()->sideload(['users', 'groups'])->findAll();

This format does not appear to work for the incremental endpoint to sideload comment_events. Is this supported for this API client? Putting the sideload here doesn't break the call, but doesn't provide the expected child_events.

$tickets = $client->incremental() ->sideload(['comment_events']) ->ticketEvents(['start_time' => $startTimestamp]) ;

The call is outlined here: https://developer.zendesk.com/rest_api/docs/core/incremental_export#incremental-ticket-event-export

Have also tried

$tickets = $client->incremental() ->ticketEvents(['start_time' => $startTimestamp]) ->sideload(['comment_events']);

with no success. Is there a different format for the incremental endpoint sideload?

aharrison7 commented 6 years ago

Edit: Found the syntax needed

$tickets = $client->incremental() ->ticketEvents(['start_time' => $startTimestamp, 'include' => 'comment_events']) ;