Example #1
0
    def add(self, create_node_info):
        """
        Creates a navigation node object and adds it to the collection.

        :type create_node_info: office365.sharepoint.navigation.navigation_node_creation_information.NavigationNodeCreationInformation
        """
        target_node = NavigationNode(self.context)
        target_node.title = create_node_info.Title
        target_node.url = create_node_info.Url
        self.add_child(target_node)
        qry = CreateEntityQuery(self, target_node, target_node)
        self.context.add_query(qry)
        return target_node
Example #2
0
    def get_by_id(self, node_id):
        """Gets the navigation node with the specified ID.

        :type node_id: str
        """
        return NavigationNode(self.context,
                              ResourcePathServiceOperation("GetById", [node_id], self.resource_path))
 def get_by_index(self, index):
     target_node = NavigationNode(self.context)
     self.add_child(target_node)
     qry = ServiceOperationQuery(self, "GetByIndex", [index], None, None,
                                 target_node)
     self.context.add_query(qry)
     return target_node