Short answer is that you don't, actually. In fact, even though it's currently listed in the documentation, we're dropping access directly by Yahoo! ID because we don't want to encourage people being asked to enter their Yahoo! IDs into arbitrary sites. You would never have been able to get any data from anyone other than the logged in user anyway.
Long answer is that you need to get the user to explicitly grant you access to their information, which is achieved using OAuth. That authentication flow is described
here. Once you have the right tokens to represent the user, you can make requests to our services as that user, and the
Users collection along with the "use_login=1" parameter should let you get the information you need.
Does that answer your question?