Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

ET_GetSupportRest does not support URLProps and MoreResults logic not working #161

Open
psycohomer opened this issue Sep 23, 2020 · 1 comment

Comments

@psycohomer
Copy link

In ET_GetSupportRest.php i have noticed several issues I have been able to resolve manually updating the file on my end.

  • There are 2 lines commented out preventing the set URLProps from actually being used. This prevents the use of the filter and prevents the use of setting the page # in order to get more results. Line 47 and 48

  • Line 63: The logic to determine MoreResults = true does not conform to the data being returned by the API call. The return is always a count and page size. The page size limits the results, therefore count will never be greater that page size (per my testing and results). The logic currently will never return a MoreResults = true. page 1 with a page size of 50 and count of 50 results in (50 > (1 * 50)) = false.

Proposed changes:

  • uncomment line 47 and 48 to allow for URL props like filter and page

  • Change line 63 to
    if ($count && $count == $pageSize){ $response->moreResults = true; }

Unresolved issue:

  • Due to nothing in the returned data set other than count == pagesize to know if there are possibly more results, if there is a total count that is a multiple of page size, there will be a final API call with a result set of zero.
@psycohomer
Copy link
Author

I should clarify that this is specific to using this with SFMC's transactional REST API

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant