class FavoriteLists
A SharePoint entity class representing favorite lists functionality, inheriting from the Entity base class.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/listhome/favorite_lists.py
4 - 7
simple
Purpose
This class represents a SharePoint FavoriteLists entity, which manages collections of favorite lists in SharePoint. It provides the entity type name identifier used by SharePoint's REST API for operations related to favorite lists. The class serves as a data model and API wrapper for interacting with SharePoint favorite lists functionality.
Source Code
class FavoriteLists(Entity):
@property
def entity_type_name(self):
return "SP.FavoriteLists"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
Entity | - |
Parameter Details
__init__: Inherits constructor from Entity base class. The exact parameters depend on the Entity parent class implementation, but typically includes context and resource path for SharePoint API communication.
Return Value
Instantiation returns a FavoriteLists object that represents a SharePoint favorite lists entity. The entity_type_name property returns the string 'SP.FavoriteLists', which is the SharePoint internal type identifier used for API operations.
Class Interface
Methods
@property
def entity_type_name(self) -> str
property
Purpose: Returns the SharePoint entity type name identifier used for REST API operations
Returns: String 'SP.FavoriteLists' which is the SharePoint internal type identifier for favorite lists entities
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns the SharePoint entity type identifier 'SP.FavoriteLists' | instance |
Dependencies
office365
Required Imports
from office365.sharepoint.entity import Entity
from office365.sharepoint.lists.favorite_lists import FavoriteLists
Usage Example
from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.lists.favorite_lists import FavoriteLists
# Assuming you have a SharePoint context set up
ctx = ClientContext(site_url).with_credentials(credentials)
# The FavoriteLists would typically be accessed through the context
# rather than instantiated directly
favorite_lists = ctx.web.favorite_lists
# Get the entity type name
entity_type = favorite_lists.entity_type_name # Returns 'SP.FavoriteLists'
# Load and execute query to get favorite lists data
ctx.load(favorite_lists)
ctx.execute_query()
Best Practices
- This class should typically be accessed through a SharePoint ClientContext rather than instantiated directly
- The entity_type_name property is used internally by the office365 library for API operations and should not be modified
- Ensure proper SharePoint authentication is configured before accessing FavoriteLists functionality
- Use the parent Entity class methods for CRUD operations (load, update, delete, etc.)
- Always call execute_query() on the context after loading or modifying entities to commit changes
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class LikedByInformation 62.9% similar
-
class UserEntity 61.4% similar
-
class Link 61.2% similar
-
class ListItemCollection 59.8% similar
-
class CurrencyList 59.6% similar