Closed anthonyeden closed 4 years ago
I know this works:
for x in pco.people.people.list(where={'first_name': 'John Doe'}):
I think include would work too:
for x in pco.people.people.list(include={'some_stuff'}):
Might have to play with it. Try passing list, or dictionary formats and see what it does.
@billdeitrick probably has a better answer.
TL;DR: Pypco currently does not support includes.
You can get them with a kwarg, but Pypco doesn’t know what to do with them. My goal is to get functionality coverage and docs first, and then add things like includes that are more performance optimizations. There are only a few remaining functionality pieces, so it’s definitely a good time to get includes on the list.
This shouldn’t be too difficult of an addition. We’d need to add the ability to take a list of includes to the appropriate functions and change the RelationshipManager logic to check includes when pulling associated objects.
Sent with GitHawk
With 25b8daa67c9892ae809484a6e3ef08208565572 in forthcoming v1.0, this is now supported.
When getting a specific object, it would be helpful to be able to specify specific include properties (e.g. ?include=field_data). I cannot currently find a way to achieve this. Is this possible with the current version of the library?