# This file was auto-generated by Fern from our API Definition.

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.breaking_news_response_dto import BreakingNewsResponseDto
from ..types.content_sentiment_max import ContentSentimentMax
from ..types.content_sentiment_min import ContentSentimentMin
from ..types.from_rank import FromRank
from ..types.has_nlp import HasNlp
from ..types.include_nlp_data import IncludeNlpData
from ..types.include_translation_fields import IncludeTranslationFields
from ..types.loc_entity_name import LocEntityName
from ..types.misc_entity_name import MiscEntityName
from ..types.not_theme import NotTheme
from ..types.org_entity_name import OrgEntityName
from ..types.page import Page
from ..types.page_size import PageSize
from ..types.per_entity_name import PerEntityName
from ..types.ranked_only import RankedOnly
from ..types.robots_compliant import RobotsCompliant
from ..types.sort_by import SortBy
from ..types.theme import Theme
from ..types.title_sentiment_max import TitleSentimentMax
from ..types.title_sentiment_min import TitleSentimentMin
from ..types.to_rank import ToRank
from ..types.top_n_articles import TopNArticles
from .raw_client import AsyncRawBreakingNewsClient, RawBreakingNewsClient
from .types.breaking_news_get_request_sort_by import BreakingNewsGetRequestSortBy

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class BreakingNewsClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawBreakingNewsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawBreakingNewsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawBreakingNewsClient
        """
        return self._raw_client

    def breaking_news_get(
        self,
        *,
        sort_by: typing.Optional[BreakingNewsGetRequestSortBy] = None,
        ranked_only: typing.Optional[bool] = None,
        from_rank: typing.Optional[int] = None,
        to_rank: typing.Optional[int] = None,
        page: typing.Optional[int] = None,
        page_size: typing.Optional[int] = None,
        top_n_articles: typing.Optional[TopNArticles] = None,
        include_translation_fields: typing.Optional[IncludeTranslationFields] = None,
        include_nlp_data: typing.Optional[IncludeNlpData] = None,
        has_nlp: typing.Optional[HasNlp] = None,
        theme: typing.Optional[str] = None,
        not_theme: typing.Optional[str] = None,
        org_entity_name: typing.Optional[str] = None,
        per_entity_name: typing.Optional[str] = None,
        loc_entity_name: typing.Optional[str] = None,
        misc_entity_name: typing.Optional[str] = None,
        title_sentiment_min: typing.Optional[float] = None,
        title_sentiment_max: typing.Optional[float] = None,
        content_sentiment_min: typing.Optional[float] = None,
        content_sentiment_max: typing.Optional[float] = None,
        robots_compliant: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> BreakingNewsResponseDto:
        """
        Retrieves breaking news articles and sorts them based on specified criteria.

        Parameters
        ----------
        sort_by : typing.Optional[BreakingNewsGetRequestSortBy]
            The sorting order of the results. Possible values are:
            - `relevancy`: The most relevant results first.
            - `date`: The most recently published results first.
            - `rank`: The results from the highest-ranked sources first.

        ranked_only : typing.Optional[bool]
            If true, limits the search to sources ranked in the top 1 million online websites. If false, includes unranked sources which are assigned a rank of 999999.

        from_rank : typing.Optional[int]
            The lowest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source.

        to_rank : typing.Optional[int]
            The highest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source.

        page : typing.Optional[int]
            The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles.

            For details, see [How to paginate large datasets](https://www.newscatcherapi.com/docs/v3/documentation/how-to/paginate-large-datasets).

        page_size : typing.Optional[int]
            The number of articles to return per page.

        top_n_articles : typing.Optional[TopNArticles]

        include_translation_fields : typing.Optional[IncludeTranslationFields]

        include_nlp_data : typing.Optional[IncludeNlpData]

        has_nlp : typing.Optional[HasNlp]

        theme : typing.Optional[str]
            Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string.

            Example: `"Finance, Tech"`

            **Note**: The `theme` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

            Available options: `Business`, `Economics`, `Entertainment`, `Finance`, `Health`, `Politics`, `Science`, `Sports`, `Tech`, `Crime`, `Financial Crime`, `Lifestyle`, `Automotive`, `Travel`, `Weather`, `General`.

        not_theme : typing.Optional[str]
            Inverse of the `theme` parameter. Excludes articles based on their general topic, as determined by NLP analysis. To exclude multiple themes, use a comma-separated string.

            Example: `"Crime, Tech"`

            **Note**: The `not_theme` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        org_entity_name : typing.Optional[str]
            Filters articles that mention specific organization names, as identified by NLP analysis. To specify multiple organizations, use a comma-separated string. To search named entities in translations, combine with the translation options of the `search_in` parameter (e.g., `title_content_translated`).

            Example: `"Apple, Microsoft"`

            **Note**: The `ORG_entity_name` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).

        per_entity_name : typing.Optional[str]
            Filters articles that mention specific person names, as identified by NLP analysis. To specify multiple names, use a comma-separated string. To search named entities in translations, combine with the translation options of the `search_in` parameter (e.g., `title_content_translated`).

            Example: `"Elon Musk, Jeff Bezos"`

            **Note**: The `PER_entity_name` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).

        loc_entity_name : typing.Optional[str]
            Filters articles that mention specific location names, as identified by NLP analysis. To specify multiple locations, use a comma-separated string. To search named entities in translations, combine with the translation options of the `search_in` parameter (e.g., `title_content_translated`).

            Example: `"California, New York"`

            **Note**: The `LOC_entity_name` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).

        misc_entity_name : typing.Optional[str]
            Filters articles that mention other named entities not falling under person, organization, or location categories. Includes events, nationalities, products, works of art, and more. To specify multiple entities, use a comma-separated string. To search named entities in translations, combine with the translation options of the `search_in` parameter (e.g., `title_content_translated`).

            Example: `"Bitcoin, Blockchain"`

            **Note**: The `MISC_entity_name` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).

        title_sentiment_min : typing.Optional[float]
            Filters articles based on the minimum sentiment score of their titles.

            Range is `-1.0` to `1.0`, where:
            - Negative values indicate negative sentiment.
            - Positive values indicate positive sentiment.
            - Values close to 0 indicate neutral sentiment.

            **Note**: The `title_sentiment_min` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        title_sentiment_max : typing.Optional[float]
            Filters articles based on the maximum sentiment score of their titles.

            Range is `-1.0` to `1.0`, where:
            - Negative values indicate negative sentiment.
            - Positive values indicate positive sentiment.
            - Values close to 0 indicate neutral sentiment.

            **Note**: The `title_sentiment_max` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        content_sentiment_min : typing.Optional[float]
            Filters articles based on the minimum sentiment score of their content.

            Range is `-1.0` to `1.0`, where:
            - Negative values indicate negative sentiment.
            - Positive values indicate positive sentiment.
            - Values close to 0 indicate neutral sentiment.

            **Note**: The `content_sentiment_min` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        content_sentiment_max : typing.Optional[float]
            Filters articles based on the maximum sentiment score of their content.

            Range is `-1.0` to `1.0`, where:
            - Negative values indicate negative sentiment.
            - Positive values indicate positive sentiment.
            - Values close to 0 indicate neutral sentiment.

            **Note**: The `content_sentiment_max` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        robots_compliant : typing.Optional[bool]
            If true, returns only articles/sources that comply with the publisher's robots.txt rules. If false, returns only articles/sources that do not comply with robots.txt rules. If omitted, returns all articles/sources regardless of compliance status.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BreakingNewsResponseDto
            A successful response containing breaking news articles with additional breaking news event information.

        Examples
        --------
        from newscatcher import NewscatcherApi

        client = NewscatcherApi(
            api_key="YOUR_API_KEY",
        )
        client.breaking_news.breaking_news_get(
            top_n_articles=5,
            include_translation_fields=True,
            include_nlp_data=True,
            has_nlp=True,
            theme="Business,Finance",
            not_theme="Crime",
        )
        """
        _response = self._raw_client.breaking_news_get(
            sort_by=sort_by,
            ranked_only=ranked_only,
            from_rank=from_rank,
            to_rank=to_rank,
            page=page,
            page_size=page_size,
            top_n_articles=top_n_articles,
            include_translation_fields=include_translation_fields,
            include_nlp_data=include_nlp_data,
            has_nlp=has_nlp,
            theme=theme,
            not_theme=not_theme,
            org_entity_name=org_entity_name,
            per_entity_name=per_entity_name,
            loc_entity_name=loc_entity_name,
            misc_entity_name=misc_entity_name,
            title_sentiment_min=title_sentiment_min,
            title_sentiment_max=title_sentiment_max,
            content_sentiment_min=content_sentiment_min,
            content_sentiment_max=content_sentiment_max,
            robots_compliant=robots_compliant,
            request_options=request_options,
        )
        return _response.data

    def breaking_news_post(
        self,
        *,
        sort_by: typing.Optional[SortBy] = OMIT,
        ranked_only: typing.Optional[RankedOnly] = OMIT,
        from_rank: typing.Optional[FromRank] = OMIT,
        to_rank: typing.Optional[ToRank] = OMIT,
        page: typing.Optional[Page] = OMIT,
        page_size: typing.Optional[PageSize] = OMIT,
        top_n_articles: typing.Optional[TopNArticles] = OMIT,
        include_translation_fields: typing.Optional[IncludeTranslationFields] = OMIT,
        include_nlp_data: typing.Optional[IncludeNlpData] = OMIT,
        has_nlp: typing.Optional[HasNlp] = OMIT,
        theme: typing.Optional[Theme] = OMIT,
        not_theme: typing.Optional[NotTheme] = OMIT,
        org_entity_name: typing.Optional[OrgEntityName] = OMIT,
        per_entity_name: typing.Optional[PerEntityName] = OMIT,
        loc_entity_name: typing.Optional[LocEntityName] = OMIT,
        misc_entity_name: typing.Optional[MiscEntityName] = OMIT,
        title_sentiment_min: typing.Optional[TitleSentimentMin] = OMIT,
        title_sentiment_max: typing.Optional[TitleSentimentMax] = OMIT,
        content_sentiment_min: typing.Optional[ContentSentimentMin] = OMIT,
        content_sentient_max: typing.Optional[ContentSentimentMax] = OMIT,
        robots_compliant: typing.Optional[RobotsCompliant] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> BreakingNewsResponseDto:
        """
        Retrieves breaking news articles and sorts them based on specified criteria.

        Parameters
        ----------
        sort_by : typing.Optional[SortBy]

        ranked_only : typing.Optional[RankedOnly]

        from_rank : typing.Optional[FromRank]

        to_rank : typing.Optional[ToRank]

        page : typing.Optional[Page]

        page_size : typing.Optional[PageSize]

        top_n_articles : typing.Optional[TopNArticles]

        include_translation_fields : typing.Optional[IncludeTranslationFields]

        include_nlp_data : typing.Optional[IncludeNlpData]

        has_nlp : typing.Optional[HasNlp]

        theme : typing.Optional[Theme]

        not_theme : typing.Optional[NotTheme]

        org_entity_name : typing.Optional[OrgEntityName]

        per_entity_name : typing.Optional[PerEntityName]

        loc_entity_name : typing.Optional[LocEntityName]

        misc_entity_name : typing.Optional[MiscEntityName]

        title_sentiment_min : typing.Optional[TitleSentimentMin]

        title_sentiment_max : typing.Optional[TitleSentimentMax]

        content_sentiment_min : typing.Optional[ContentSentimentMin]

        content_sentient_max : typing.Optional[ContentSentimentMax]

        robots_compliant : typing.Optional[RobotsCompliant]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BreakingNewsResponseDto
            A successful response containing breaking news articles with additional breaking news event information.

        Examples
        --------
        from newscatcher import NewscatcherApi

        client = NewscatcherApi(
            api_key="YOUR_API_KEY",
        )
        client.breaking_news.breaking_news_post(
            sort_by="relevancy",
            page=1,
            page_size=100,
            include_nlp_data=True,
        )
        """
        _response = self._raw_client.breaking_news_post(
            sort_by=sort_by,
            ranked_only=ranked_only,
            from_rank=from_rank,
            to_rank=to_rank,
            page=page,
            page_size=page_size,
            top_n_articles=top_n_articles,
            include_translation_fields=include_translation_fields,
            include_nlp_data=include_nlp_data,
            has_nlp=has_nlp,
            theme=theme,
            not_theme=not_theme,
            org_entity_name=org_entity_name,
            per_entity_name=per_entity_name,
            loc_entity_name=loc_entity_name,
            misc_entity_name=misc_entity_name,
            title_sentiment_min=title_sentiment_min,
            title_sentiment_max=title_sentiment_max,
            content_sentiment_min=content_sentiment_min,
            content_sentient_max=content_sentient_max,
            robots_compliant=robots_compliant,
            request_options=request_options,
        )
        return _response.data


class AsyncBreakingNewsClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawBreakingNewsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawBreakingNewsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawBreakingNewsClient
        """
        return self._raw_client

    async def breaking_news_get(
        self,
        *,
        sort_by: typing.Optional[BreakingNewsGetRequestSortBy] = None,
        ranked_only: typing.Optional[bool] = None,
        from_rank: typing.Optional[int] = None,
        to_rank: typing.Optional[int] = None,
        page: typing.Optional[int] = None,
        page_size: typing.Optional[int] = None,
        top_n_articles: typing.Optional[TopNArticles] = None,
        include_translation_fields: typing.Optional[IncludeTranslationFields] = None,
        include_nlp_data: typing.Optional[IncludeNlpData] = None,
        has_nlp: typing.Optional[HasNlp] = None,
        theme: typing.Optional[str] = None,
        not_theme: typing.Optional[str] = None,
        org_entity_name: typing.Optional[str] = None,
        per_entity_name: typing.Optional[str] = None,
        loc_entity_name: typing.Optional[str] = None,
        misc_entity_name: typing.Optional[str] = None,
        title_sentiment_min: typing.Optional[float] = None,
        title_sentiment_max: typing.Optional[float] = None,
        content_sentiment_min: typing.Optional[float] = None,
        content_sentiment_max: typing.Optional[float] = None,
        robots_compliant: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> BreakingNewsResponseDto:
        """
        Retrieves breaking news articles and sorts them based on specified criteria.

        Parameters
        ----------
        sort_by : typing.Optional[BreakingNewsGetRequestSortBy]
            The sorting order of the results. Possible values are:
            - `relevancy`: The most relevant results first.
            - `date`: The most recently published results first.
            - `rank`: The results from the highest-ranked sources first.

        ranked_only : typing.Optional[bool]
            If true, limits the search to sources ranked in the top 1 million online websites. If false, includes unranked sources which are assigned a rank of 999999.

        from_rank : typing.Optional[int]
            The lowest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source.

        to_rank : typing.Optional[int]
            The highest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source.

        page : typing.Optional[int]
            The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles.

            For details, see [How to paginate large datasets](https://www.newscatcherapi.com/docs/v3/documentation/how-to/paginate-large-datasets).

        page_size : typing.Optional[int]
            The number of articles to return per page.

        top_n_articles : typing.Optional[TopNArticles]

        include_translation_fields : typing.Optional[IncludeTranslationFields]

        include_nlp_data : typing.Optional[IncludeNlpData]

        has_nlp : typing.Optional[HasNlp]

        theme : typing.Optional[str]
            Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string.

            Example: `"Finance, Tech"`

            **Note**: The `theme` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

            Available options: `Business`, `Economics`, `Entertainment`, `Finance`, `Health`, `Politics`, `Science`, `Sports`, `Tech`, `Crime`, `Financial Crime`, `Lifestyle`, `Automotive`, `Travel`, `Weather`, `General`.

        not_theme : typing.Optional[str]
            Inverse of the `theme` parameter. Excludes articles based on their general topic, as determined by NLP analysis. To exclude multiple themes, use a comma-separated string.

            Example: `"Crime, Tech"`

            **Note**: The `not_theme` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        org_entity_name : typing.Optional[str]
            Filters articles that mention specific organization names, as identified by NLP analysis. To specify multiple organizations, use a comma-separated string. To search named entities in translations, combine with the translation options of the `search_in` parameter (e.g., `title_content_translated`).

            Example: `"Apple, Microsoft"`

            **Note**: The `ORG_entity_name` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).

        per_entity_name : typing.Optional[str]
            Filters articles that mention specific person names, as identified by NLP analysis. To specify multiple names, use a comma-separated string. To search named entities in translations, combine with the translation options of the `search_in` parameter (e.g., `title_content_translated`).

            Example: `"Elon Musk, Jeff Bezos"`

            **Note**: The `PER_entity_name` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).

        loc_entity_name : typing.Optional[str]
            Filters articles that mention specific location names, as identified by NLP analysis. To specify multiple locations, use a comma-separated string. To search named entities in translations, combine with the translation options of the `search_in` parameter (e.g., `title_content_translated`).

            Example: `"California, New York"`

            **Note**: The `LOC_entity_name` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).

        misc_entity_name : typing.Optional[str]
            Filters articles that mention other named entities not falling under person, organization, or location categories. Includes events, nationalities, products, works of art, and more. To specify multiple entities, use a comma-separated string. To search named entities in translations, combine with the translation options of the `search_in` parameter (e.g., `title_content_translated`).

            Example: `"Bitcoin, Blockchain"`

            **Note**: The `MISC_entity_name` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).

        title_sentiment_min : typing.Optional[float]
            Filters articles based on the minimum sentiment score of their titles.

            Range is `-1.0` to `1.0`, where:
            - Negative values indicate negative sentiment.
            - Positive values indicate positive sentiment.
            - Values close to 0 indicate neutral sentiment.

            **Note**: The `title_sentiment_min` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        title_sentiment_max : typing.Optional[float]
            Filters articles based on the maximum sentiment score of their titles.

            Range is `-1.0` to `1.0`, where:
            - Negative values indicate negative sentiment.
            - Positive values indicate positive sentiment.
            - Values close to 0 indicate neutral sentiment.

            **Note**: The `title_sentiment_max` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        content_sentiment_min : typing.Optional[float]
            Filters articles based on the minimum sentiment score of their content.

            Range is `-1.0` to `1.0`, where:
            - Negative values indicate negative sentiment.
            - Positive values indicate positive sentiment.
            - Values close to 0 indicate neutral sentiment.

            **Note**: The `content_sentiment_min` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        content_sentiment_max : typing.Optional[float]
            Filters articles based on the maximum sentiment score of their content.

            Range is `-1.0` to `1.0`, where:
            - Negative values indicate negative sentiment.
            - Positive values indicate positive sentiment.
            - Values close to 0 indicate neutral sentiment.

            **Note**: The `content_sentiment_max` parameter is only available if NLP is included in your subscription plan.

            To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).

        robots_compliant : typing.Optional[bool]
            If true, returns only articles/sources that comply with the publisher's robots.txt rules. If false, returns only articles/sources that do not comply with robots.txt rules. If omitted, returns all articles/sources regardless of compliance status.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BreakingNewsResponseDto
            A successful response containing breaking news articles with additional breaking news event information.

        Examples
        --------
        import asyncio

        from newscatcher import AsyncNewscatcherApi

        client = AsyncNewscatcherApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.breaking_news.breaking_news_get(
                top_n_articles=5,
                include_translation_fields=True,
                include_nlp_data=True,
                has_nlp=True,
                theme="Business,Finance",
                not_theme="Crime",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.breaking_news_get(
            sort_by=sort_by,
            ranked_only=ranked_only,
            from_rank=from_rank,
            to_rank=to_rank,
            page=page,
            page_size=page_size,
            top_n_articles=top_n_articles,
            include_translation_fields=include_translation_fields,
            include_nlp_data=include_nlp_data,
            has_nlp=has_nlp,
            theme=theme,
            not_theme=not_theme,
            org_entity_name=org_entity_name,
            per_entity_name=per_entity_name,
            loc_entity_name=loc_entity_name,
            misc_entity_name=misc_entity_name,
            title_sentiment_min=title_sentiment_min,
            title_sentiment_max=title_sentiment_max,
            content_sentiment_min=content_sentiment_min,
            content_sentiment_max=content_sentiment_max,
            robots_compliant=robots_compliant,
            request_options=request_options,
        )
        return _response.data

    async def breaking_news_post(
        self,
        *,
        sort_by: typing.Optional[SortBy] = OMIT,
        ranked_only: typing.Optional[RankedOnly] = OMIT,
        from_rank: typing.Optional[FromRank] = OMIT,
        to_rank: typing.Optional[ToRank] = OMIT,
        page: typing.Optional[Page] = OMIT,
        page_size: typing.Optional[PageSize] = OMIT,
        top_n_articles: typing.Optional[TopNArticles] = OMIT,
        include_translation_fields: typing.Optional[IncludeTranslationFields] = OMIT,
        include_nlp_data: typing.Optional[IncludeNlpData] = OMIT,
        has_nlp: typing.Optional[HasNlp] = OMIT,
        theme: typing.Optional[Theme] = OMIT,
        not_theme: typing.Optional[NotTheme] = OMIT,
        org_entity_name: typing.Optional[OrgEntityName] = OMIT,
        per_entity_name: typing.Optional[PerEntityName] = OMIT,
        loc_entity_name: typing.Optional[LocEntityName] = OMIT,
        misc_entity_name: typing.Optional[MiscEntityName] = OMIT,
        title_sentiment_min: typing.Optional[TitleSentimentMin] = OMIT,
        title_sentiment_max: typing.Optional[TitleSentimentMax] = OMIT,
        content_sentiment_min: typing.Optional[ContentSentimentMin] = OMIT,
        content_sentient_max: typing.Optional[ContentSentimentMax] = OMIT,
        robots_compliant: typing.Optional[RobotsCompliant] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> BreakingNewsResponseDto:
        """
        Retrieves breaking news articles and sorts them based on specified criteria.

        Parameters
        ----------
        sort_by : typing.Optional[SortBy]

        ranked_only : typing.Optional[RankedOnly]

        from_rank : typing.Optional[FromRank]

        to_rank : typing.Optional[ToRank]

        page : typing.Optional[Page]

        page_size : typing.Optional[PageSize]

        top_n_articles : typing.Optional[TopNArticles]

        include_translation_fields : typing.Optional[IncludeTranslationFields]

        include_nlp_data : typing.Optional[IncludeNlpData]

        has_nlp : typing.Optional[HasNlp]

        theme : typing.Optional[Theme]

        not_theme : typing.Optional[NotTheme]

        org_entity_name : typing.Optional[OrgEntityName]

        per_entity_name : typing.Optional[PerEntityName]

        loc_entity_name : typing.Optional[LocEntityName]

        misc_entity_name : typing.Optional[MiscEntityName]

        title_sentiment_min : typing.Optional[TitleSentimentMin]

        title_sentiment_max : typing.Optional[TitleSentimentMax]

        content_sentiment_min : typing.Optional[ContentSentimentMin]

        content_sentient_max : typing.Optional[ContentSentimentMax]

        robots_compliant : typing.Optional[RobotsCompliant]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BreakingNewsResponseDto
            A successful response containing breaking news articles with additional breaking news event information.

        Examples
        --------
        import asyncio

        from newscatcher import AsyncNewscatcherApi

        client = AsyncNewscatcherApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.breaking_news.breaking_news_post(
                sort_by="relevancy",
                page=1,
                page_size=100,
                include_nlp_data=True,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.breaking_news_post(
            sort_by=sort_by,
            ranked_only=ranked_only,
            from_rank=from_rank,
            to_rank=to_rank,
            page=page,
            page_size=page_size,
            top_n_articles=top_n_articles,
            include_translation_fields=include_translation_fields,
            include_nlp_data=include_nlp_data,
            has_nlp=has_nlp,
            theme=theme,
            not_theme=not_theme,
            org_entity_name=org_entity_name,
            per_entity_name=per_entity_name,
            loc_entity_name=loc_entity_name,
            misc_entity_name=misc_entity_name,
            title_sentiment_min=title_sentiment_min,
            title_sentiment_max=title_sentiment_max,
            content_sentiment_min=content_sentiment_min,
            content_sentient_max=content_sentient_max,
            robots_compliant=robots_compliant,
            request_options=request_options,
        )
        return _response.data
