This method lets users rate a TV show.

A valid session id or guest session id is required.

@param tvID tvID
@param rating rating
@param sessionID sessionID
@param guestSessionID guestSessionID
@return
@throws com.omertron.themoviedbapi.MovieDbException
776003
public StatusCode postTVRating(int tvID, int rating, String sessionID, String guestSessionID) throws MovieDbException {
        return tmdbTv.postTVRating(tvID, rating, sessionID, guestSessionID);
    }
250293
public ResultList<TVBasic> searchTV(String query, Integer page, String language, Integer firstAirDateYear, SearchType searchType) throws MovieDbException {
        return tmdbSearch.searchTV(query, page, language, firstAirDateYear, searchType);
    }
311983
public StatusCode addItem(String sessionId, String listId, int mediaId) throws MovieDbException {
        return modifyMovieList(sessionId, listId, mediaId, MethodSub.ADD_ITEM);
    }
1183536
public ResultList<MovieInfo> getRecommendations(int movieId, String language) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.ID, movieId);
        parameters.add(Param.LANGUAGE, language);

        URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.RECOMMENDATIONS).buildUrl(parameters);
        WrapperGenericList<MovieInfo> wrapper = processWrapper(getTypeReference(MovieInfo.class), url, "recommendations");
        return wrapper.getResultsList();
    }
96604
private function checkIfRatingExists($ratingId)
    {
        $ratingId = MySqlLegacySupport::getInstance()->real_escape_string($ratingId);

        $sQuery = "SELECT COUNT(*) AS item_count FROM pkg_shop_rating_service_rating WHERE remote_key = '".$ratingId."' ";
        $result = MySqlLegacySupport::getInstance()->query($sQuery);
        if ($result) {
            $row = MySqlLegacySupport::getInstance()->fetch_object($result);
            if ($row->item_count < 1) {
                return false;
            }
        }

        return true;
    }
73543
public ResultList<UserList> getUserLists(String sessionId, int accountId) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.SESSION_ID, sessionId);
        parameters.add(Param.ID, accountId);

        URL url = new ApiUrl(apiKey, MethodBase.ACCOUNT).subMethod(MethodSub.LISTS).buildUrl(parameters);
        WrapperGenericList<UserList> wrapper = processWrapper(getTypeReference(UserList.class), url, "user list");
        return wrapper.getResultsList();
    }
1346912
public function rate($rating, $userId = null)
    {
        return app(RatingServiceContract::class)->addRateTo($this, $rating, $userId);
    }
1202
public StatusCode removeFromWatchList(String sessionId, int accountId, MediaType mediaType, Integer mediaId) throws MovieDbException {
        return tmdbAccount.modifyWatchList(sessionId, accountId, mediaType, mediaId, false);
    }
567040
public StatusCode deleteList(String sessionId, String listId) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.ID, listId);
        parameters.add(Param.SESSION_ID, sessionId);

        URL url = new ApiUrl(apiKey, MethodBase.LIST).buildUrl(parameters);
        String webpage = httpTools.deleteRequest(url);

        try {
            return MAPPER.readValue(webpage, StatusCode.class);
        } catch (IOException ex) {
            throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to delete list", url, ex);
        }
    }
1088858
public void createSession(String sessionId) {
        boolean newSession = sessionId == null;
        sessionId = newSession ? newSessionId() : sessionId;
        SessionController controller = sessions.get(sessionId);
        
        if (controller == null) {
            controller = SessionController.create(sessionId, newSession);
            sessions.put(sessionId, controller);
        }
    }
1066456
public Episode getEpisodeById(String episodeId, String language) throws TvDbException {
        StringBuilder urlBuilder = new StringBuilder();

        urlBuilder.append(BASE_URL)
                  .append(apiKey)
                  .append("/episodes/")
                  .append(episodeId)
                  .append("/");
        if (StringUtils.isNotBlank(language)) {
            urlBuilder.append(language);
            urlBuilder.append(XML_EXTENSION);
        }

        LOG.trace(URL, urlBuilder.toString());
        return TvdbParser.getEpisode(urlBuilder.toString());
    }
452406
def update(postid, userid, rating):
        '''
        
        '''
        rating_recs = TabRating.select().where(
            (TabRating.post_id == postid) & (TabRating.user_id == userid)
        )
        if rating_recs.count() > 0:
            MRating.__update_rating(rating_recs.get().uid, rating)
        else:
            MRating.__insert_data(postid, userid, rating)
788911
public StatusCode removeItem(String sessionId, String listId, int mediaId) throws MovieDbException {
        return modifyMovieList(sessionId, listId, mediaId, MethodSub.REMOVE_ITEM);
    }
648394
public MediaCreditList getTVCredits(int tvID, String language) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.ID, tvID);
        parameters.add(Param.LANGUAGE, language);

        URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.CREDITS).buildUrl(parameters);
        String webpage = httpTools.getRequest(url);
        try {
            return MAPPER.readValue(webpage, MediaCreditList.class);
        } catch (IOException ex) {
            throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get credits", url, ex);
        }
    }
63402
public Account getAccount(String sessionId) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.SESSION_ID, sessionId);

        URL url = new ApiUrl(apiKey, MethodBase.ACCOUNT).buildUrl(parameters);
        String webpage = httpTools.getRequest(url);

        try {
            return MAPPER.readValue(webpage, Account.class);
        } catch (IOException ex) {
            throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get Account", url, ex);
        }
    }
1360797
@Nonnull
	public String createSessionId( @Nonnull final String sessionId ) {
		return isEncodeNodeIdInSessionId() ? _sessionIdFormat.createSessionId(sessionId,  _nodeIdService.getMemcachedNodeId() ) : sessionId;
	}
1186527
public ResultList<Artwork> getEpisodeImages(int tvID, int seasonNumber, int episodeNumber) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.ID, tvID);
        parameters.add(Param.SEASON_NUMBER, seasonNumber);
        parameters.add(Param.EPISODE_NUMBER, episodeNumber);

        URL url = new ApiUrl(apiKey, MethodBase.EPISODE).subMethod(MethodSub.IMAGES).buildUrl(parameters);
        String webpage = httpTools.getRequest(url);

        try {
            WrapperImages wrapper = MAPPER.readValue(webpage, WrapperImages.class);
            ResultList<Artwork> results = new ResultList<>(wrapper.getAll());
            wrapper.setResultProperties(results);
            return results;
        } catch (IOException ex) {
            throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get images", url, ex);
        }
    }