I don't really know how to get the id out of the first one (what does it return?), and I think I'm missing something in the second one. How should this be done, and could it be done with a single request?
Get Associated Object Properties in Custom Code Action
SOLVE
The example code above is way more readable for just this question. It has the call to the deal, to get the id of the associated object, and then a call to the associated object to get it's properties. The questions is if there is a way to directly get the properties of the associated object, without having to do a separate call to first get the id of the associated object.
@GregP, I agree that we need to get more documentation on the various libraries. I can say that this is being worked on. Hoping we have more available sooner than later!