Retrieves upcoming movies

@param country Provides localized data for the selected country
@return
@throws RottenTomatoesException
490600
public List<RTMovie> getUpcomingMovies(String country) throws RottenTomatoesException {
        return getUpcomingMovies(country, DEFAULT_PAGE, DEFAULT_PAGE_LIMIT);
    }
1191471
public List<RTCast> getCastInfo(int movieId) throws RottenTomatoesException {
        properties.clear();
        properties.put(ApiBuilder.PROPERTY_ID, String.valueOf(movieId));
        properties.put(ApiBuilder.PROPERTY_URL, URL_CAST_INFO);

        WrapperLists wrapper = response.getResponse(WrapperLists.class, properties);
        if (wrapper != null && wrapper.getCast() != null) {
            return wrapper.getCast();
        } else {
            return Collections.emptyList();
        }
    }
1085555
def __read_countries_file(self):
        """"""
        import csv
        import pkg_resources

        filename = pkg_resources.resource_filename('sortinghat', 'data/countries.csv')

        with open(filename, 'r') as f:
            reader = csv.DictReader(f, fieldnames=['name', 'code', 'alpha3'])
            countries = [Country(**c) for c in reader]

        return countries
617325
public static CountrySpec retrieve(String country) throws StripeException {
    return retrieve(country, (Map<String, Object>) null, (RequestOptions) null);
  }
443974
public ResultList<TVInfo> getTVOnTheAir(Integer page, String language) throws MovieDbException {
        return tmdbTv.getTVOnTheAir(page, language);
    }
1352955
def filter_country_locations(api_response, is_country=True):
    
    return [item for item in api_response if item[ISCOUNTRY]==is_country]
202398
function selectAllMovies() {
  var movie = db.getSchema().table('Movie');
  db.select(movie.id, movie.title, movie.year).
      from(movie).exec().then(
      function(results) {
        var elapsed = Date.now() - startTime;
        $('#load_time').text(elapsed.toString() + 'ms');
        $('#master').bootstrapTable('load', results).
            on('click-row.bs.table', function(e, row, $element) {
              startTime = Date.now();
              generateDetails(row.id);
            });
      });
}
497516
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return CountryInstance(self._version, payload, iso_code=self._solution['iso_code'], )
306913
public MediaCreditList getTVCredits(int tvID, String language) throws MovieDbException {
        return tmdbTv.getTVCredits(tvID, language);
    }
515613
private static String getUrlFromProps(Map<String, String> properties) throws RottenTomatoesException {
        if (properties.containsKey(PROPERTY_URL) && StringUtils.isNotBlank(properties.get(PROPERTY_URL))) {
            String url = properties.get(PROPERTY_URL);

            // If we have the ID, then we need to replace the "{movie-id}" in the URL
            if (properties.containsKey(PROPERTY_ID) && StringUtils.isNotBlank(properties.get(PROPERTY_ID))) {
                url = url.replace(MOVIE_ID, String.valueOf(properties.get(PROPERTY_ID)));
                // We don't need this property anymore
                properties.remove(PROPERTY_ID);
            }
            // We don't need this property anymore
            properties.remove(PROPERTY_URL);
            return url;
        } else {
            throw new RottenTomatoesException(ApiExceptionType.INVALID_URL, "No URL specified");
        }
    }
592265
def from_country(cls, country):
        """"""
        result = cls.list({'sort_by': 'id ASC'})
        dc_countries = {}
        for dc in result:
            if dc['country'] not in dc_countries:
                dc_countries[dc['country']] = dc['id']

        return dc_countries.get(country)
1086302
def get_film(film_id):
    '''  '''
    result = _get(film_id, settings.FILMS)
    return Film(result.content)
550460
@Override
    public CountryContract getCountryFromCode(String countryCode) {
        if(StringUtils.isBlank(countryCode)) return null;
        CountryContract country = getKcCountryService().getCountryByAlternateCode(countryCode);
        if(country==null){
            country = getKcCountryService().getCountry(countryCode);
        }
        return country;
    }
1183162
public void onCountryCodeSelected(String country, String dialCode) {
        if (passwordlessRequestCodeLayout != null) {
            passwordlessRequestCodeLayout.onCountryCodeSelected(country, dialCode);
        }
    }
185120
def countries_for_select
      ::I18nData.countries.map{|pair| pair.reverse}.sort{|x,y| x.first <=> y.first}
    end
941727
public List<RTMovie> getMoviesSimilar(int movieId, int limit) throws RottenTomatoesException {
        properties.clear();
        properties.put(ApiBuilder.PROPERTY_ID, String.valueOf(movieId));
        properties.put(ApiBuilder.PROPERTY_URL, URL_MOVIES_SIMILAR);
        properties.put(ApiBuilder.PROPERTY_LIMIT, ApiBuilder.validateLimit(limit));

        WrapperLists wrapper = response.getResponse(WrapperLists.class, properties);
        if (wrapper != null && wrapper.getMovies() != null) {
            return wrapper.getMovies();
        } else {
            return Collections.emptyList();
        }
    }
1177601
public ResultList<AlternativeTitle> getMovieAlternativeTitles(int movieId, String country) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.ID, movieId);
        parameters.add(Param.COUNTRY, country);

        URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.ALT_TITLES).buildUrl(parameters);
        String webpage = httpTools.getRequest(url);
        try {
            WrapperAlternativeTitles wrapper = MAPPER.readValue(webpage, WrapperAlternativeTitles.class);
            ResultList<AlternativeTitle> results = new ResultList<>(wrapper.getTitles());
            wrapper.setResultProperties(results);
            return results;
        } catch (IOException ex) {
            throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get alternative titles", url, ex);
        }
    }