def search_by_name(name, page_limit=1, page=1)
      if page_limit > 50
        page_limit = MAX_PAGE_LIMIT #current limitation of the rotten tomatos API
      end

      results_json = @badfruit.search_movies(name, page_limit, page)
      if results_json.nil?
        return []
      else
        return @badfruit.parse_movies_array(JSON.parse(results_json))
      end
    end
def search_by_name(name, page_limit=1, page=1)
      if page_limit > 50
        page_limit = MAX_PAGE_LIMIT #current limitation of the rotten tomatos API
      end

      results_json = @badfruit.search_movies(name, page_limit, page)
      if results_json.nil?
        return []
      else
        return @badfruit.parse_movies_array(JSON.parse(results_json))
      end
    end
Initialize a wrapper around the Rotten Tomatoes API specific to movies.


 Search for a movie by name.

 @param [String] name The name of the movie to search for.
 @param [Integer] page_limit The number of results to return for API response page. (Defaults to 1)
 @param [Integer] page The page offset to request from the API. (Defaults to 1)

 @return [Array<BadFruit::Movie>] An array of movie objects matching the name parameter.