add basic support for Izneo
This commit is contained in:
parent
828d8448d8
commit
c9614152f6
3 changed files with 125 additions and 1 deletions
|
|
@ -56,7 +56,9 @@ class BaseGallery(CapBaseObject):
|
|||
raise NotImplementedError()
|
||||
|
||||
class BaseImage(CapBaseObject):
|
||||
def __init__(self, _id, index=None, thumbnail=NotLoaded, url=NotLoaded, ext=NotLoaded):
|
||||
def __init__(self, _id, index=None, thumbnail=NotLoaded, url=NotLoaded,
|
||||
ext=NotLoaded, gallery=None):
|
||||
|
||||
CapBaseObject.__init__(self, unicode(_id))
|
||||
|
||||
self.add_field('index', int, index) # usually page number
|
||||
|
|
@ -64,6 +66,7 @@ class BaseImage(CapBaseObject):
|
|||
self.add_field('url', basestring, url)
|
||||
self.add_field('ext', basestring, ext)
|
||||
self.add_field('data', str)
|
||||
self.add_field('gallery', BaseGallery, gallery)
|
||||
|
||||
def __str__(self):
|
||||
return self.url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue