Exemplo n.º 1
0
        /// <summary>
        /// Rates a list of shows on trakt
        /// </summary>
        /// <param name="data">The object containing the list of shows to be rated</param>       
        /// <returns>The response from trakt</returns>
        public static TraktRatingsResponse RateShows(TraktShows data)
        {
            // check that we have everything we need
            if (data == null || data.Shows.Count == 0)
                return null;

            // serialize data to JSON and send to server
            string response = TraktWeb.Transmit(TraktURIs.RateShows, data.ToJSON());

            // return success or failure
            return response.FromJSON<TraktRatingsResponse>();
        }