def search(criteria)
      begin
        @api_options= {
          :part            => 'snippet',
          :type            => 'video',
          :order           => 'relevance',
          :safeSearch      => 'none',
         }
        @categories = []
        @count_filter = {}
        @criteria = Yourub::Validator.confirm(criteria)
        search_by_criteria do |result|
          yield result
        end
      rescue ArgumentError => e
        Yourub.logger.error "#{e}"
      end
    end
def search(criteria)
      begin
        @api_options= {
          :part            => 'snippet',
          :type            => 'video',
          :order           => 'relevance',
          :safeSearch      => 'none',
         }
        @categories = []
        @count_filter = {}
        @criteria = Yourub::Validator.confirm(criteria)
        search_by_criteria do |result|
          yield result
        end
      rescue ArgumentError => e
        Yourub.logger.error "#{e}"
      end
    end
Search through the youtube API, executing multiple queries where necessary
 @param criteria [Hash]
 @example
   client = Yourub::Client.new
   client.search(country: "DE", category: "sports", order: 'date')