public Profile GetProfile() { this.CheckLoggedIn(); var url = YifyAPI.GetUserProfileURI(this.userKey); string res = YifyAPI.SendGetRequest(url); return(_parser.ParseGetProfileRequest(res)); }
public List <BookmarkedMovie> BookmarkedMovies(bool withRtRatings) { this.CheckLoggedIn(); try { var req = YifyAPI.GetMovieBookmarksURI(this.userKey, withRtRatings); var res = YifyAPI.SendGetRequest(req); return(_parser.ParseGetBookmarkedMoviesResponse(res)); } catch (Exception ex) { throw new YifyException("An error occurred. See inner exception for more details", ex); } }
public User GetUserDetails(int userID) { try { var uri = YifyAPI.GetUserDetailsURI(userID, true); var res = YifyAPI.SendGetRequest(uri); return(_parser.ParseGetUserDetailsResponse(res)); } catch (Exception ex) { throw new YifyException("An error occurred. See inner exception for more details", ex); } }
public List <ParentalGuide> GetMovieParentalGuide(int movieID) { try { var uri = YifyAPI.GetMovieParentalGuideURI(movieID); var res = YifyAPI.SendGetRequest(uri); return(_parser.ParseGetMovieParentalGuideResponse(res)); } catch (Exception ex) { throw new YifyException("An error occurred. See inner exception for more details", ex); } }
/// <summary> /// Get movie details for a particular movie /// </summary> /// <param name="movieID">YTS movie id</param> /// <param name="includeCast">If true cast information will be included</param> /// <param name="includeImages">If true movie images will be included</param> /// <returns>Movie object containing the movie result</returns> public Movie GetMovie(int movieID, bool includeCast = true, bool includeImages = true) { try { var uri = YifyAPI.GetMovieURI(movieID, includeCast, includeImages); var res = YifyAPI.SendGetRequest(uri); return(_parser.ParseGetMovieResponse(res)); } catch (Exception ex) { throw new YifyException("An error occurred. See inner exception for more details", ex); } }
/// <summary> /// Search or list movies in YTS /// </summary> /// <param name="queryTerm">Term to search</param> /// <param name="quality">Quality of the release Ex: 720p, 1080p, 3D</param> /// <param name="genre">Genre of the movie (See http://www.imdb.com/genre/ for full list)</param> /// <param name="minimumRating">Minimum rating of the movie. Ex: 0 to 9</param> /// <param name="limit">The limit of results per page. Ex: 20</param> /// <param name="page">Page number to view the movies Ex: Limit 15 and Page 2 will show you movies 15 to 30</param> /// <param name="sortBy">Sorts the results by chosen field</param> /// <param name="orderBy">Order of the results in Ascending or Descending order</param> /// <returns>Collection of ListMovie class objects</returns> /// <exception cref="YifyLib.YifyException">If any errors occurred YTS process</exception> public List <ListMovie> ListMovies( string queryTerm = "", string quality = "All", string genre = "", uint minimumRating = 0, uint limit = 20, uint page = 1, SearchResultSort sortBy = SearchResultSort.DateAdded, SortOrder orderBy = SortOrder.Desc) { try { var uri = YifyAPI.GetListMovieURI(queryTerm, quality, genre, minimumRating, limit, page, sortBy, orderBy); var res = YifyAPI.SendGetRequest(uri); return(_parser.ParseListMovieResponse(res)); } catch (Exception ex) { throw new YifyException("An error occurred. See inner exception for more details", ex); } }