🔍 Code Extractor

class DocumentsSharedWithGroup

Maturity: 41

A class representing a SharePoint list that manages documents shared with a SharePoint Group on a user's personal site.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/userprofiles/documents_shared_with_group.py
Lines:
4 - 11
Complexity:
simple

Purpose

This class extends the Entity base class to provide specialized functionality for working with documents that are shared with SharePoint Groups on personal sites. It serves as a domain-specific entity type within the Office365 SharePoint Portal UserProfiles namespace, enabling operations on shared document lists through the SharePoint REST API.

Source Code

class DocumentsSharedWithGroup(Entity):
    """
    Provides methods for working with a list that shares documents with a SharePoint Group on the user's personal site.
    """

    @property
    def entity_type_name(self):
        return "Microsoft.SharePoint.Portal.UserProfiles.DocumentsSharedWithGroup"

Parameters

Name Type Default Kind
bases Entity -

Parameter Details

__init__: Inherits constructor from Entity base class. The Entity base class typically accepts context and resource_path parameters for SharePoint API communication, though specific parameters depend on the parent implementation.

Return Value

Instantiation returns a DocumentsSharedWithGroup object that represents a SharePoint entity. The entity_type_name property returns the string 'Microsoft.SharePoint.Portal.UserProfiles.DocumentsSharedWithGroup', which is used internally for SharePoint API type identification.

Class Interface

Methods

@property def entity_type_name(self) -> str property

Purpose: Returns the fully qualified SharePoint entity type name for this class, used for API type identification and serialization

Returns: String value 'Microsoft.SharePoint.Portal.UserProfiles.DocumentsSharedWithGroup' representing the SharePoint entity type

Attributes

Name Type Description Scope
entity_type_name str Read-only property that returns the SharePoint entity type identifier for documents shared with groups instance

Dependencies

  • office365

Required Imports

from office365.sharepoint.portal.userprofiles.documents_shared_with_group import DocumentsSharedWithGroup
from office365.sharepoint.entity import Entity

Usage Example

from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.portal.userprofiles.documents_shared_with_group import DocumentsSharedWithGroup

# Establish SharePoint context
ctx = ClientContext(site_url).with_credentials(credentials)

# Typically accessed through the SharePoint API rather than direct instantiation
# The class is used internally by the Office365 library when working with shared documents
# Example of how it might be retrieved:
shared_docs = ctx.web.get_property('DocumentsSharedWithGroup')
ctx.load(shared_docs)
ctx.execute_query()

# Access the entity type name
type_name = shared_docs.entity_type_name

Best Practices

  • This class is typically not instantiated directly but rather retrieved through SharePoint API queries
  • Ensure proper authentication and permissions are configured before accessing shared document lists
  • The entity_type_name property is primarily used internally by the Office365 library for type resolution
  • This class inherits all methods and properties from the Entity base class, which provides CRUD operations and query capabilities
  • Always use within a proper ClientContext to ensure API calls are executed correctly
  • The class follows the Office365 REST API entity model and should be used in conjunction with load() and execute_query() patterns

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class DocumentsSharedWithMe 85.1% similar

    A SharePoint class that provides static methods for retrieving documents shared with the current user on their personal site.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/userprofiles/documents_shared_with_me.py
  • class SharedWithMeDocument 76.4% similar

    Represents a shared document in SharePoint with metadata about authors, editors, modification dates, and document properties.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/userprofiles/sharedwithme/document.py
  • class SharedWithMeItems 75.6% similar

    A SharePoint entity class that provides access to items shared with the current user, allowing retrieval of documents and files that others have shared.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/userprofiles/sharedwithme/items.py
  • class SharedWithMeDocumentUser 71.5% similar

    A data class representing a user associated with a document that has been shared with the current user in SharePoint/Office 365.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/userprofiles/sharedwithme/document_user.py
  • class ObjectSharingInformation 71.5% similar

    A class that provides comprehensive information about the sharing state of SharePoint securable objects (documents, list items, sites), including permissions, sharing links, and user access details.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/sharing/object_sharing_information.py
← Back to Browse