I'm trying to figure out how to use PhotoAlbumObject.
I have looked into the code of Lens and Anna Kim Photography channels. Both use a URL Service.
But I will not be able to use a URL Service because the URLs I will be using contain more than one album.
I want to understand how to use PhotoAlbumObject in ObjectContainer. So using the code on those channels as a reference I have tried this:
def photos():oc = ObjectContainer( title2 = L(‘Photos’) )
oc.add(PhotoAlbumObject(
key = Callback(getImages),
title = “the title”,
summary = “the summary”,
items = [
MediaObject(
parts = Callback(getImages)
)
]
))return oc
def getImages():
oc = ObjectContainer()
fooImage = “http://foo/bar/baz.jpg”
oc.add(PhotoObject(
key = fooImage,
title = “a photo”,
thumb = fooImage
))return oc
but I get a FrameworkException: Object of type '' cannot be added to this container in photos function. More specifically on line:
parts = Callback(getImage)
Here is a link to AnnaKimPhotography URL Service.
Which is the correct way to use PhotoAlbumObject?