Closed asherber closed 6 years ago
Whoops. I knew there was something I hadn’t finished doing. I started adding support for expansions in the branch at https://github.com/lildude/phpSmug/tree/add-support-for-expansions (diff: https://github.com/lildude/phpSmug/compare/master...add-support-for-expansions) but got distracted and completely forgot about it 😊
I’ll try find some time in the coming weeks to finish this off. Looks like it’s mostly there… just need to test multiple expansions and implement a solution if needed.
I'm having a couple of problems with expansions in v4.
Since
get()
returns only theResponse
part, adding an_expand
param doesn't seem to give any way of accessing theExpansions
element. Should there be a$client->getExpansions()
method? Or should any use of an_expand
parameter silently add_expandmethod=inline
?phpSmug doesn't seem to like multiple expansions. If I do
get('user/[username]!albums?_expandmethod=inline&_expand=Node')
I get the expected response, but if I doget('user/[username]!albums?_expandmethod=inline&_expand=Node,HighlightImage')
I don't get either URI expanded. (Same results either using $options or specifying the query string inget()
.) Making the request from Postman does give the multiple expansion.