Welcome Developers!

in

Welcome!

in

REST /friends list=xxx

Last post 04-10-2008 9:08 AM by Brock. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-09-2008 6:00 PM

    REST /friends list=xxx

    I'm trying to build a REST request for friends using some of the optional parameters for filtering the results. For some reason it seems that the list=xxx needs to be placed at the beginning of the query string and the rest placed at the end. Is there some logic to this? Here's an example generated using the OAuth tool:

    http://api.myspace.com/v1/users/175340702/friends.xml?list=online&oauth_consumer_key=http%3A%2F%2Fwww.myspace.com%2Ftempusdictum&oauth_nonce=633433851682951565&oauth_signature=ubIysB4SbkX48yxPrtLS%2BCTrNFY%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1207788368&oauth_token=&oauth_version=1.0&page=1&page_size=10&show=status%7Cmood

    Trying to put list=xxx at the end of the query string (or the rest in the beginning) causes an "invalid digital signtature" error. This seems kind of arbitrary and makes dynamically formating the request more complex. Guess maybe everything but list=xxx is post processing, it's just making the process I have in place break.

    ~Brock 

  • 04-09-2008 9:34 PM In reply to

    Re: REST /friends list=xxx

    Unfortunately, thats how it is. The "list" is a part of the resource URI, so if it's not there, it doesn't count, the same way as http://www.myspace.com/ and http://www,myspace.com/tom are two different requests for two different resources. It looks like a querystring parameter, but then /users/#####/friends.xml looks like a directory structure pointing to a file; in both cases, what it looks like isn't what it is.

    I'm not sure what you're trying to do or how you're doing it, but if you treat the "list" portion as a part of the resource URI instead of an extra parameter, maybe that would help. Of course, it might not.

  • 04-10-2008 9:08 AM In reply to

    Re: REST /friends list=xxx

    Yeah, so why isn't list=xxx part of the method url. It's not something I can't work around, it's just dumb that I have to organize query parameters this way. I'm building the base and request url around values and it's a pain in the ass to have to treat some query parameters different than others.  

Page 1 of 1 (3 items)