Esempio n. 1
0
 def get_all_webs(self):
     """Returns a collection containing a flat list of all Web objects in the Web object."""
     qry = ReadEntityQuery(self.webs)
     result = ClientResult(self.webs)
     self.context.add_query(qry, result)
     self.context.pending_request.after_execute_request(self._load_sub_webs)
     return result
    def load(self, client_object, properties_to_retrieve=None):
        """Prepare query

        :type properties_to_retrieve: list[str] or None
        :type client_object: office365.runtime.client_object.ClientObject
        """
        qry = ReadEntityQuery(client_object, properties_to_retrieve)
        self.get_pending_request().add_query(qry)
Esempio n. 3
0
 def load(self, client_object, properties_to_retrieve=None):
     """Prepare query"""
     if properties_to_retrieve is None:
         properties_to_retrieve = []
     if properties_to_retrieve:
         select_expr = ",".join(properties_to_retrieve)
         client_object = client_object.select(select_expr)
     qry = ReadEntityQuery(client_object)
     self.pending_request.add_query(qry, client_object)
    def load(self, client_object, properties_to_retrieve=None, on_loaded=None):
        """Prepare query

        :type on_loaded: () -> None
        :type properties_to_retrieve: list[str] or None
        :type client_object: office365.runtime.client_object.ClientObject
        """
        qry = ReadEntityQuery(client_object, properties_to_retrieve)
        self.get_pending_request().add_query(qry)

        def _process_response(resp):
            if self.current_query.id == qry.id:
                self.get_pending_request().afterExecute -= _process_response
                on_loaded()

        if callable(on_loaded):
            self.get_pending_request().afterExecute += _process_response
 def load(self, client_object, properties_to_retrieve=None):
     """Prepare query"""
     qry = ReadEntityQuery(client_object, properties_to_retrieve)
     self.get_pending_request().add_query(qry)