🔍 Code Extractor

class GetListsParameters

Maturity: 34

A parameter class for configuring SharePoint list retrieval operations, encapsulating position and row limit settings.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/lists/get_parameters.py
Lines:
5 - 15
Complexity:
simple

Purpose

GetListsParameters is a data transfer object (DTO) that inherits from ClientValue and is used to specify parameters when retrieving lists from SharePoint. It allows configuration of pagination through ListCollectionPosition and limits the number of rows returned. This class is typically used as an argument to SharePoint API methods that fetch multiple lists, providing control over result set size and pagination state.

Source Code

class GetListsParameters(ClientValue):
    def __init__(self, position=ListCollectionPosition(), row_limit=100):
        """
        :param ListCollectionPosition position:
        """
        self.ListCollectionPosition = position
        self.RowLimit = row_limit

    @property
    def entity_type_name(self):
        return "SP.GetListsParameters"

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

position: A ListCollectionPosition object that tracks the current position in a paginated list collection. Defaults to a new ListCollectionPosition() instance. Used for pagination to retrieve lists in chunks and maintain state between requests.

row_limit: An integer specifying the maximum number of list items to return in a single request. Defaults to 100. This helps control response size and performance by limiting the result set.

Return Value

Instantiation returns a GetListsParameters object configured with the specified position and row limit. The object serves as a container for these parameters and can be serialized for SharePoint API calls. The entity_type_name property returns the string 'SP.GetListsParameters', which identifies this object type in SharePoint's client object model.

Class Interface

Methods

__init__(position=ListCollectionPosition(), row_limit=100)

Purpose: Initializes a new GetListsParameters instance with pagination position and row limit settings

Parameters:

  • position: ListCollectionPosition object for tracking pagination state, defaults to new instance
  • row_limit: Integer specifying maximum rows to return, defaults to 100

Returns: None (constructor)

entity_type_name -> str property

Purpose: Returns the SharePoint entity type identifier for this parameter class

Returns: String 'SP.GetListsParameters' identifying this object type in SharePoint's client object model

Attributes

Name Type Description Scope
ListCollectionPosition ListCollectionPosition Stores the pagination position object used to track location in a paginated list collection instance
RowLimit int Stores the maximum number of rows/items to return in a single request instance

Dependencies

  • office365

Required Imports

from office365.runtime.client_value import ClientValue
from office365.sharepoint.lists.collection_position import ListCollectionPosition

Usage Example

from office365.runtime.client_value import ClientValue
from office365.sharepoint.lists.collection_position import ListCollectionPosition

# Basic instantiation with defaults
params = GetListsParameters()

# Custom instantiation with specific row limit
params = GetListsParameters(row_limit=50)

# With custom position for pagination
position = ListCollectionPosition()
params = GetListsParameters(position=position, row_limit=200)

# Access entity type name
entity_type = params.entity_type_name  # Returns 'SP.GetListsParameters'

# Access attributes
row_limit = params.RowLimit  # 200
list_position = params.ListCollectionPosition  # ListCollectionPosition object

Best Practices

  • Always use appropriate row_limit values to balance performance and memory usage; very large values may cause timeouts or memory issues
  • Reuse the same ListCollectionPosition object when paginating through results to maintain proper state
  • This class is immutable after instantiation in typical usage; create new instances for different parameter sets
  • The entity_type_name property should not be modified as it's used internally by the SharePoint client library for serialization
  • When paginating, update the position parameter with the position returned from the previous request
  • Default row_limit of 100 is generally suitable for most scenarios; adjust based on network conditions and data size

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class GetListItemVersionsParameters 77.2% similar

    A parameter class for configuring list item version retrieval operations in SharePoint, allowing control over result limits and sort order.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/listitems/versions/get_parameters.py
  • class ListItemUpdateParameters 72.2% similar

    A parameter class for updating SharePoint list items, inheriting from ClientValue to represent client-side values in Office 365 operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/listitems/update_parameters.py
  • class ListItemDeleteParameters 71.0% similar

    A parameter class that encapsulates configuration options for deleting list items in SharePoint/Office365, specifically controlling whether to bypass shared locks during deletion.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/listitems/delete_parameters.py
  • class RenderListDataOverrideParameters 68.2% similar

    A parameter class for overriding SharePoint list data rendering options, inheriting from ClientValue to represent client-side values in SharePoint operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/lists/render_override_parameters.py
  • class GroupCreationParams 61.8% similar

    A data class representing parameters for creating a SharePoint group, inheriting from ClientValue to enable serialization for SharePoint API calls.

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