class weboob.capabilities.collection.CapCollection

Bases: weboob.capabilities.base.Capability

get_collection(objs, split_path)

Get a collection for a given split path. If the path is invalid (i.e. can’t be handled by this module), it should return None.

iter_resources(objs, split_path)

split_path is a list, either empty (root path) or with one or many components.

iter_resources_flat(objs, split_path, clean_only=False)

Call iter_resources() to fetch all resources in the tree. If clean_only is True, do not explore paths, only remove them. split_path is used to set the starting path.

validate_collection(objs, collection)

Tests if a collection is valid. For compatibility reasons, and to provide a default way, it checks if the collection has at least one object in it. However, it is not very efficient or exact, and you are encouraged to override this method. You can replace the collection object entirely by returning a new one.

class weboob.capabilities.collection.BaseCollection(split_path, id=None, url=None)

Bases: weboob.capabilities.base.BaseObject

Inherit from this if you want to create an object that is also a Collection. However, this probably will not work properly for now.

class weboob.capabilities.collection.Collection(split_path=None, title=None, id=None, url=None)

Bases: weboob.capabilities.collection.BaseCollection

A Collection is a “fake” object returned in results, which shows you can get more results if you go into its path.

It is a dumb object, it must not contain callbacks to a backend.

Do not inherit from this class if you want to make a regular BaseObject a Collection, use BaseCollection instead.

  • title – (unicode) Collection title
  • split_path – (list) Full collection path
exception weboob.capabilities.collection.CollectionNotFound(split_path=None)

Bases: weboob.capabilities.base.UserError