/// <summary> /// Rates a list of movies on trakt /// </summary> /// <param name="data">The object containing the list of movies to be rated</param> /// <returns>The response from trakt</returns> public static TraktSyncResponse AddMoviesToRatings(TraktMovieRatingSync data) { // check that we have everything we need if (data == null || data.movies == null || data.movies.Count == 0) return null; // serialize data to JSON and send to server string response = TraktWeb.PostToTrakt(TraktURIs.SyncRatings, data.ToJSON()); // return success or failure return response.FromJSON<TraktSyncResponse>(); }
/// <summary> /// Rates a list of movies on trakt /// </summary> /// <param name="data">The object containing the list of movies to be rated</param> /// <returns>The response from trakt</returns> public static TraktSyncResponse AddMoviesToRatings(TraktMovieRatingSync data) { // check that we have everything we need if (data == null || data.movies == null || data.movies.Count == 0) { return(null); } // serialize data to JSON and send to server string response = TraktWeb.PostToTrakt(TraktURIs.SyncRatings, data.ToJSON()); // return success or failure return(response.FromJSON <TraktSyncResponse>()); }