MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Support for idSpec (Multiple Ids) in JS and REST

Last post 05-30-2008 1:25 PM by Toy Sisters. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 02-18-2008 8:55 AM

    Support for idSpec (Multiple Ids) in JS and REST

    What is the plan to support idSpec, for retrieving multiple users by ID? Both in REST and JS? Is that planned prior to launch?

    The OpenSocial spec defines:

    newFetchPeopleRequest(idSpec, opt_params), where idSpec can be:
    "String idSpec - An ID, array of IDs, or a group reference to fetch activities for"

    src: http://code.google.com/apis/opensocial/docs/0.6/reference/opensocial.DataRequest.html#newFetchActivitiesRequest


    It seems that the current MySpace Spec supports only a single ID:

    JS: "MyOpenSpace.MySpaceContainer.newFetchPersonRequest(id, opt_params)"
    REST: /users/{userID}


    Followup question: Is there a issue tracker (rather than these forums) where we can submit & track bugs/feature requests?
    Filed under: ,
  • 02-18-2008 9:52 AM In reply to

    Re: Support for idSpec (Multiple Ids) in JS and REST

    It supports retrieving multiple users - the idSpecs that MySpace currently supports are 'VIEWER_FRIENDS' and 'OWNER_FRIENDS'.

    "newFetchPeopleRequest(opensocial.DataRequest.Group.VIEWER_FRIENDS, opt_params)"

    Which will return a list of 'opensocial.Person's, as implemented by MySpace (shown here: http://developer.myspace.com/community/opensocial/myspace_extensions.aspx ).

     

     

  • 02-18-2008 10:39 AM In reply to

    Re: Support for idSpec (Multiple Ids) in JS and REST

    That is correct, but I'd like to pass in a list of id's of people, to support a leaderboard, for example... which could contain anyone who's installed your application, not just the current owner/viewer's friends... and importantly, from both JS and REST api's.
  • 02-18-2008 1:01 PM In reply to

    Re: Support for idSpec (Multiple Ids) in JS and REST

    That's not supported by OpenSocial in general (not just the MySpace implementation). OpenSocial specifies that Fetch calls can only retrieve information concerning the Owner, the Viewer, and their friends.

    But for what you want to do, a Fetch call wouldn't help anyway. I assume that your Leaderboard is most likely based on a scoring system of some sort, in which case you'd be using some sort of data-storage to hold those scores, associated with MySpace users. Since there isn't a field in MyOpenSpace for 'GameScore', to populate your leaderboard, you'd just query that data-store.

  • 02-18-2008 5:44 PM In reply to

    Re: Support for idSpec (Multiple Ids) in JS and REST

    MySpace ALREADY supports getting any user by ID (who has added your app).

    REST FORMAT: /users/{userID}

    What I'm asking for is a simple performance optimization, that appears to be in the OpenSocial docs, re: idSpec.

  • 02-19-2008 12:32 AM In reply to

    Re: Support for idSpec (Multiple Ids) in JS and REST

    The OpenSocial's idSpec is defined (from Google's OpenSocial specs):

    Array.<String>, String idSpec - An ID, array of IDs, or a group reference used to specify which people to fetch; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS, OWNER_FRIENDS, or a single ID within one of those groups.

    What you're asking for is beyond that definition. I realize that this isn't clearly stated in the .6 specification docs, but it is in code library, and also the .7 docs, which we can assume MySpace is moving to soon (which would break what your asking for and render your code useless - something I'd think it's preferable to avoid), I agree with you; an 'APP_OWNERS' group key would be a nice addition, since it would allow for socialization across apps beyond already-existing Friend connections (similar to the way MySpace Groups allow easy communication between people who aren't 'Friends'). I'm just not sure how feasible it is, given that to get a list of Friends who have the app installed requires doing what amounts to a complete Friends list request, then filtering the results with HAS_APP; to do this in general would require the code to sort through the 250+ million profiles on MySpace, filtering for HAS_APP.

    As far as the RESTful APIs - they're always allowed to do a bit more, because of it's position (that is, it falls outside any official specs since even under OpenSocial, they're under revision). If you really want access to that kind of data, use the RESTful API (and retrieve the data with a makeRequest({url}) call).

  • 02-19-2008 10:58 AM In reply to

    Re: Support for idSpec (Multiple Ids) in JS and REST

    Can anyone else chime in? Someone from MySpace Dev team?

    I believe the spec states...


    1) An ID,

    2) array of IDs,

    3) OR a group reference used to specify which people to fetch; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS, OWNER_FRIENDS, or a single ID within one of those groups.


    I never suggested a group called APP_USERS (at least non-paginated) as that would be silly. I want #2 above.
  • 02-19-2008 1:17 PM In reply to

    Re: Support for idSpec (Multiple Ids) in JS and REST

    Filed under:
  • 05-30-2008 1:25 PM In reply to

    Re: Support for idSpec (Multiple Ids) in JS and REST

    im now curious about this. Does this work (passing multiple ids)?

     Will i be able to make, say, 100000 restcalls in a row without myspace hanging up?

    how far away is restcall batching? 

     

Page 1 of 1 (9 items)