Example #1
0
 def get_session(self, id_=None, friendly_id=None):
     """Get a session of the event"""
     if friendly_id is None and id_ is not None:
         criteria = {'id': id_}
     elif id_ is None and friendly_id is not None:
         criteria = {'friendly_id': friendly_id}
     else:
         raise ValueError('Exactly one kind of id must be specified')
     return get_related_object(self, 'sessions', criteria)
Example #2
0
 def get_session(self, id_=None, friendly_id=None):
     """Get a session of the event"""
     if friendly_id is None and id_ is not None:
         criteria = {'id': id_}
     elif id_ is None and friendly_id is not None:
         criteria = {'friendly_id': friendly_id}
     else:
         raise ValueError('Exactly one kind of id must be specified')
     return get_related_object(self, 'sessions', criteria)
Example #3
0
 def get_contribution(self, id_):
     """Get a contribution of the event"""
     return get_related_object(self, 'contributions', {'id': id_})
Example #4
0
 def get_contribution(self, id_):
     """Get a contribution of the event"""
     return get_related_object(self, 'contributions', {'id': id_})