parameters: (self, pb_type, filter='')
docstring: iterator on all navitia objects that match a filter
docstring_summary: iterator on all navitia objects that match a filter
docstring_tokens: iterator on all navitia objects that match a filter
function: def get_objs(self, pb_type, filter=''):
          """
          iterator on all navitia objects that match a filter
          """
          req = request_pb2.Request()
          req.requested_api = type_pb2.PTREFERENTIAL
          req.ptref.requested_type = pb_type
          req.ptref.count = 20
          req.ptref.start_page = 0
          req.ptref.depth = 1
          req.ptref.filter = filter
  
          while True:
              result = self.instance.send_and_receive(req)
  
              objects = getattr(result, PT_TYPE_RESPONSE_MAPPING[pb_type])
              if not objects:
                  # when no more objects are yielded we stop
                  return
  
              for o in objects:
                  yield o
  
              req.ptref.start_page += 1
              if req.ptref.count > result.pagination.itemsOnPage:
                  # we did not get as much results as planned, we can stop
                  return
function_tokens: def get_objs ( self , pb_type , filter = '' ) : req = request_pb2 . Request ( ) req . requested_api = type_pb2 . PTREFERENTIAL req . ptref . requested_type = pb_type req . ptref . count = 20 req . ptref . start_page = 0 req . ptref . depth = 1 req . ptref . filter = filter while True : result = self . instance . send_and_receive ( req ) objects = getattr ( result , PT_TYPE_RESPONSE_MAPPING [ pb_type ] ) if not objects : # when no more objects are yielded we stop return for o in objects : yield o req . ptref . start_page += 1 if req . ptref . count > result . pagination . itemsOnPage : # we did not get as much results as planned, we can stop return