def _fetch(self,
      api_path,
      query_params={},
      post_params={},
      authenticated=True):
    url = 'https://www.google.com/reader/api/0/%s' % api_path

    if self._cache:
      cache_key = base.paths.url_to_file_name(url, query_params, post_params)
      cache_value = self._cache.get(cache_key)
      if cache_value:
        return cache_value

    def urlencode(params):
      def encode(s):
        return isinstance(s, unicode) and s.encode('utf-8') or s

      encoded_params = {}
      for key, value in params.items():
        if isinstance(value, list):
          value = [encode(v) for v in value]
        else:
          value = encode(value)
        encoded_params[encode(key)] = value
      return urllib.urlencode(encoded_params, doseq=True)

    request_url = (url, urlencode(query_params)) % '%s?%s'
    url_fetcher = self._authenticated_url_fetcher if authenticated \
        else self._direct_url_fetcher
    response_text = url_fetcher.fetch(
        request_url,
        post_data=urlencode(post_params) if post_params else None)
    if self._cache:
      self._cache.set(cache_key, response_text)
    return response_text
dataset/ETHPy150Open mihaip/readerisdead/base/api.py/Api._fetch/swapped operands of `%`