udacity / ios-nd-networking

Resources for Udacity's iOS Networking with Swift course.
MIT License
173 stars 89 forks source link

Sorting watchlist and favorites list #12

Open OwenLaRosa opened 5 years ago

OwenLaRosa commented 5 years ago

If you've added a lot of movies to the watchlist and favorites list, then you'll need to scroll down to see your most recently added movies. And if you use the app a lot, you probably don't want to see the movies you added to your watchlist years ago.

Instead, you can sort the lists returned from the Movie Database. According to the documentation there's an optional query parameter, sort_by, that will either sort the movies in ascending or descending order, based on when you added them to the list.

Play around with this query parameter and see if you can modify your endpoint for getting the watchlist/favorites list to sort movies in the correct order.

GET watchlist documentation: https://developers.themoviedb.org/3/account/get-movie-watchlist