|
@@ -56,8 +56,9 @@ class Client(object):
|
|
|
def get_object_ids(self, limit=None, since=None):
|
|
|
return self.get_collection('basemetadata/digitalObjects', 'baseId', limit)
|
|
|
|
|
|
- def get_objects(self, limit=-1):
|
|
|
- return [Object(self, oid) for oid in self.get_object_ids(limit)]
|
|
|
+ def get_objects(self, limit=-1, predicate=lambda o: True):
|
|
|
+ objects = (Object(self, oid) for oid in self.get_object_ids(limit))
|
|
|
+ return [o for o in objects if predicate(o)]
|
|
|
|
|
|
def create_object(self, investigation_id, uploader, label=None, note=None):
|
|
|
url = self.url('basemetadata/investigations', investigation_id, 'digitalObjects')
|