def fetch_item_bodies(
      self, item_ids, format='json', media_rss=False, authenticated=True):
    query_params = {
        'output': format,
        # Don't render annotations inline (so that the item body is left alone).
        # Instead we'll parse them from the <gr:annotation> namespaced entry.
        'ann': 'false',
        # Likes are public data, and thus work even if we don't use
        # authentication.
        'likes': 'true',
      }
    if media_rss:
      query_params['mediaRss'] = 'true'
    post_params = {'i': [i.decimal_form for i in item_ids]}

    result_text = self._fetch(
        'stream/items/contents',
        query_params,
        post_params,
        authenticated=authenticated)

    result = {}
    if format.startswith('atom'):
      feed = base.atom.parse(result_text)
      for entry in feed.entries:
        result[entry.item_id] = entry
    else:
      item_bodies_json = json.loads(result_text)
      for item_body_json in item_bodies_json['items']:
        # TODO: parse the JSON
        item_id = item_id_from_atom_form(item_body_json['id'])
        result[item_id] = item_body_json

    for item_id in item_ids:
      if item_id not in result and item_id not in not_found_items_ids_to_ignore:
        logging.warning(
            'Requested item id %s (%s), but it was not found in the result',
            item_id.atom_form, item_id.decimal_form)

    return result
dataset/ETHPy150Open mihaip/readerisdead/base/api.py/Api.fetch_item_bodies/original