You don't list "items" in general. You list layers, channels, or paths, either using the PDB:
for lid in pdb.gimp_image_get_layers(image)
for cid in pdb.gimp_image_get_channels(image)
for vid in pdb.gimp_image_get_vectors(image)
or the attributes of the image object:
for l in image.layers
for c in image.channels
for v in image.vectors
The PDB calls return integer item IDs (use gimp._id2drawable(id)
/gimp._id2vectors(id)
to get the objects), while the image attributes are lists of gimp.Layer
/gimp.Channel
/gimp.Vector
objects (and are therefore much simpler to work with).
To tell if a layer is a text layer, you have to use a PDB call: pdb.gimp_item_is_text_layer(layer)
You can iterate the text layers thus
for textlayer in [l for l in image.layers if pdb.gimp_item_is_text_layer(l)]`
To get the path from a text layer:
path=pdb.gimp_vectors_new_from_text_layer(image,layer)
Many sample Python scripts here and some more specialized in paths here.