helpscout / helpscout-api-php

PHP Wrapper for the Help Scout API
MIT License
98 stars 62 forks source link

Returning threads with initial response: embed=threads #204

Closed cesutherland closed 8 months ago

cesutherland commented 4 years ago

Hi folks!

I took it for granted that withThreads requested conversations with threads, but I see now that it makes a request for conversations, and then a separate request for each conversations threads. There's a handy API option for requesting conversations together with threads: embed=threads which I saw in the docs.

Does this SDK support requesting embedded threads up front? I don't see an option for that.

bkuhl commented 4 years ago

Hey,

The SDK's perspective on eager loading actually predates that API functionality and we don't yet support the full initial embedding up front. Instead it makes additional API requests to ensure all the data is loaded. We're tracking requests for this and very much appreciate your feedback. We'll update this thread if we implement this eager loading in the SDK.

cesutherland commented 4 years ago

Thanks!

cesutherland commented 4 years ago

@bkuhl this is what I had in mind ­— https://github.com/helpscout/helpscout-api-php/pull/208

I tried not to make assumptions about future "embeddable" entities.

JonLaliberte commented 4 years ago

Just wanted to add that I'd love to see this added, cheers :)

miguelrs commented 8 months ago

We're closing this issue due to inactivity. We've moved your request to our backlog of tickets, although we can't tell when we will be able to act on it. Please feel free to reopen if needed. Thank you!