thyagx thyagx - 2 months ago 6
Python Question

picasa api - How to get a specific album with an album id?

How do I get a specific album from the picasa api?

Currently I am doing something like this:

def album(gd_client, album_id, user):
all_albums = albums(gd_client,user)
for album in all_albums:
if album.service_id == album_id:
return album


Which means I get all the albums and filter out the one I need.

But there must be an easier and more efficient way.

Thanks!

Answer

In Google Data Protocol version 2.0 there is experimental support for PartialResponse, which allows you to filter responses at the server by passing in a fields parameter.

Unfortunately only the Java API supports 2.0, but you can easily add it to the Python API yourself.

Comments