Skip to content

Commit

Permalink
fix issue #12 - sorting watchlist and favourites list - udacity/ios-n…
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent Mifsud committed Jun 2, 2019
1 parent afc07aa commit 1e2bf1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TheMovieManager/Model/TMDB Client/TMDBClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class TMDBClient {
case .webAuth: return "https://www.themoviedb.org/authenticate/\(Auth.requestToken)?redirect_to=themoviemanager:authenticate"
case .deleteSession: return Endpoints.base + "/authentication/session" + Endpoints.apiKeyParam
case .getFavorites: return Endpoints.base + "/account/\(Auth.accountId)/favorite/movies" + Endpoints.apiKeyParam + "&session_id=\(Auth.sessionId)"
case .markWatchlist: return Endpoints.base + "/account/\(Auth.accountId)/watchlist" + Endpoints.apiKeyParam + "&session_id=\(Auth.sessionId)"
case .markFavorite: return Endpoints.base + "/account/\(Auth.accountId)/favorite" + Endpoints.apiKeyParam + "&session_id=\(Auth.sessionId)"
case .markWatchlist: return Endpoints.base + "/account/\(Auth.accountId)/watchlist" + Endpoints.apiKeyParam + "&session_id=\(Auth.sessionId)" + "&sort_by=created_at.desc"
case .markFavorite: return Endpoints.base + "/account/\(Auth.accountId)/favorite" + Endpoints.apiKeyParam + "&session_id=\(Auth.sessionId)" + "&sort_by=created_at.asc"
case .getPosterImage(let posterPath): return Endpoints.basePoster + posterPath
case .search(let movieQuery, let page): return Endpoints.base + "/search/movie" + Endpoints.apiKeyParam + "&query=\(movieQuery.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? "")" + "&page=\(page)"
}
Expand Down

0 comments on commit 1e2bf1f

Please sign in to comment.