thanks dave. it is very interesting to see implementations of familiar code in other lanquages/libraries, kinda like a rosetta stone of sorts.
–
Sky SandersAug 18 '10 at 2:12

@code poet yeah, definitely. one of the design decisions i made w/ my wrapper is that a request only returns data of a single type. so even though requesting a question returns user information, i only return the question info itself. that means that i have to do the extra request at the end for all the user info, but also means i don't have partially created User objects floating around.
–
Dave DeLongAug 18 '10 at 14:20

sound decision. I took another approach: all api objects are 'stubs' by default. If the query in question returns full objects, i clear the IsStub flag, recursively. Subsequently, upon first access, if a stub and lazy loading is enabled on the context, the object is fetched. In some cases this can add up to a lot of requests, so the context has an eager loading option, wherein when a page of objects are retrieved, all of the stubs are fetched in a single batch, so a request for a page of 100 questions (w body/answers/comments) would result in 2 requests and return all the data.
–
Sky SandersAug 18 '10 at 15:01