hansken_extraction_plugin.api.search_sort_option

This module defines the sort options for a search within Hansken.

Classes

Direction(value)

Enumeration for sorting directions.

SearchSortOption([field, direction])

Represents a search sort option consisting of a field and a direction.

class Direction(value)[source]

Bases: Enum

Enumeration for sorting directions.

Attributes:

ASCENDING: Sort in ascending order. DESCENDING: Sort in descending order.

ASCENDING = 'ASCENDING'
DESCENDING = 'DESCENDING'
class SearchSortOption(field: str = 'uid', direction: Direction = Direction.ASCENDING)[source]

Bases: object

Represents a search sort option consisting of a field and a direction.

Attributes:

_field (str): The field to sort by. _direction (Direction): The direction to sort in (ascending or descending).

field()[source]

Get the field to sort on.

Returns:

str: Returns the current field.

direction()[source]

Get the sorting direction.

Returns:

Direction: Returns the current direction.