helpscout / helpscout-api-php

PHP Wrapper for the Help Scout API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to fetch all threads for specific conversation if threads are more than 25

arbind-ladybird opened this issue · comments

Thank you for taking the time to submit an issue with all the details shown below. Our engineering team monitors issues submitted and strives to respond with 1-2 business days.

  • PHP version: 7.*
  • SDK version: 3.*

Current behavior when trying to fetch all threads related to a specific conversation, we are getting only 25 threads by using $conversation->getThreads(). What about next threads if more than 25 threads are associated.

Expected behavior It should return all threads and on github document it should be mentioned

Steps to reproduce
1.
2.
..

Hey,

Thanks for reaching out. I apologize about the delayed response but we'll jump right in here! $conversation->getThreads() will only provide the first page of results and only if those threads are eager loaded and is not paginate-able. If you need to support pagination, I'd suggest using $conversation->threads()->list($conversation->getid()) as that will provide you a PagedCollection and access to be able to easily paginate results. There's some examples of working with pagination in this section of the docs.

We're happy to help if you run into any trouble!