Videos Returned, But Not Sorted Properly

Avatar image for twixmix
TWIXMIX

12

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By TWIXMIX

Hi Everyone, 
 
I'm using the following api call to return videos, but it's not ordered the way I would like it to be: 
 
http://api.giantbomb.com/videos/?api_key=NoKeyForYou&sort=publish_date     
 
It's returning the XML fine, but it's ordered oldest to newest. Is there any way to return the videos from newest to oldest? 
 
Thanks

Avatar image for lordandrew
LordAndrew

14609

Forum Posts

98305

Wiki Points

0

Followers

Reviews: 0

User Lists: 36

#2  Edited By LordAndrew

Sort doesn't work. It's not a thing you can do.

Avatar image for twixmix
TWIXMIX

12

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#3  Edited By TWIXMIX

Darn. 
 
That's going to cause some issues with the App I want to make. I'd rather list the newest stuff first. 
 
Oh well... :(

Avatar image for lordandrew
LordAndrew

14609

Forum Posts

98305

Wiki Points

0

Followers

Reviews: 0

User Lists: 36

#4  Edited By LordAndrew
@TWIXMIX: Do an initial request to get the number of results, then use that number to go to the last page and get the newest stuff from that page. You can work backwards from there, and it has the advantage of not duplicating items as videos are added to the site.
Avatar image for twixmix
TWIXMIX

12

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#5  Edited By TWIXMIX
@LordAndrew: This is very true, I was thinking of doing that if it was required. Thanks for the heads up I'll give that a shot!
Avatar image for thefaxman
TheFaxman

70

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#6  Edited By TheFaxman
@TWIXMIX: I got this to work by using a sort specifier of  "-publish_date".  The - seems to indicate a descending sort order
Avatar image for twixmix
TWIXMIX

12

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#7  Edited By TWIXMIX
@TheFaxman: Hmm, everybody seems to think sort is broken but I'll give that a try when I get home. 
 
Thanks!
Avatar image for twixmix
TWIXMIX

12

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#8  Edited By TWIXMIX
@TheFaxman: Awesome! It seems to work perfectly. Thanks again!