🔍 Code Extractor

class Refiner

Maturity: 40

A Refiner class that represents a SharePoint search refiner containing a list of RefinerEntry objects, inheriting from ClientValue for Office 365 REST API integration.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/refiner/refiner.py
Lines:
4 - 9
Complexity:
simple

Purpose

This class serves as a data model for SharePoint search refiners in the Office 365 REST API. It represents a refiner object that contains entries for filtering and refining search results. The class is designed to work with Microsoft.Office.Server.Search.REST.Refiner entity type and provides the necessary structure for handling search refinement data in SharePoint Online operations.

Source Code

class Refiner(ClientValue):
    """A refiner contains a list with entries, of the RefinerEntry types"""

    @property
    def entity_type_name(self):
        return "Microsoft.Office.Server.Search.REST.Refiner"

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

__init__: The constructor parameters are inherited from ClientValue base class. No explicit constructor is defined in this class, so it uses the parent class's initialization logic.

Return Value

Instantiation returns a Refiner object that can be used to represent and manipulate SharePoint search refiner data. The entity_type_name property returns the string 'Microsoft.Office.Server.Search.REST.Refiner' which identifies the entity type in the Office 365 REST API.

Class Interface

Methods

@property entity_type_name(self) -> str property

Purpose: Returns the entity type name used by the Office 365 REST API to identify this refiner object

Returns: A string containing 'Microsoft.Office.Server.Search.REST.Refiner' which is the entity type identifier for SharePoint search refiners

Attributes

Name Type Description Scope
entity_type_name str Read-only property that returns the REST API entity type name for this refiner object instance

Dependencies

  • office365

Required Imports

from office365.runtime.client_value import ClientValue

Usage Example

from office365.runtime.client_value import ClientValue
from office365.sharepoint.search.refiner import Refiner

# Instantiate a Refiner object
refiner = Refiner()

# Access the entity type name
entity_type = refiner.entity_type_name
print(entity_type)  # Output: Microsoft.Office.Server.Search.REST.Refiner

# Typically used in context of SharePoint search operations
# The refiner would be populated with RefinerEntry objects
# and used to filter search results

Best Practices

  • This class is primarily a data container and should be instantiated when working with SharePoint search refiners
  • The class inherits from ClientValue, which provides serialization/deserialization capabilities for Office 365 REST API communication
  • Typically used in conjunction with RefinerEntry objects to build complete refiner structures
  • The entity_type_name property should not be modified as it identifies the specific REST API entity type
  • This class is part of a larger Office 365 SDK and should be used within the context of authenticated SharePoint operations
  • No explicit state management is required as the class relies on its parent ClientValue for data handling

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class RefinerEntry 86.8% similar

    RefinerEntry is a data class representing a single refinement entry in Microsoft Office Server Search REST API, containing a refinement name and its associated count.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/refiner/entry.py
  • class RefinementResults 77.9% similar

    A data class representing refinement results from a SharePoint search query, containing layout templates, refiners, and result metadata.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/refinement_results.py
  • class ReorderingRule 62.2% similar

    ReorderingRule is a class representing SharePoint search result reordering rules, inheriting from ClientValue to provide information about how search results should be reordered when specific conditions are met.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/reordering_rule.py
  • class SearchEndpoints 60.0% similar

    A class representing SharePoint search endpoints configuration, containing admin endpoint and query context for search operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/endpoints.py
  • class ReorderingRuleCollection 59.8% similar

    A SharePoint entity class that represents a collection of reordering rules for search results, inheriting from the Entity base class.

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