Source code for amoorion.methods.search_method

"""Search: find messages of the inbox by their text."""

from typing import ClassVar

from pydantic import Field

from amoorion.core import Model
from amoorion.methods.base import METHODS, Method
from amoorion.models import Message


[docs] class SearchParams(Model): """What to look for, and where.""" text: str = Field(min_length=1) platform: str | None = Field( None, description="only this platform (a hook is hook:<name>)", ) limit: int = Field( 20, ge=1, le=1000, )