Thanks artemisfili,
That is what I'm doing right now but the problem is that queryItems only returns web map item, then I have to get itemDataUrl and make another call (through esri.request or similar ajax call) to get actual web map data.
My question basically was that is there any utility function so I don't have to make two calls to get web map data.
Cheers