Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "4.28.0",
"cliVersion": "4.29.0",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "4.64.0",
"generatorConfig": {
Expand All @@ -10,6 +10,6 @@
"exported_filename": "client.py"
}
},
"originGitCommit": "ea3775d5199c3ed3efc0866eb726d2ed2141aeba",
"sdkVersion": "2.0.0"
"originGitCommit": "bbd2054c67ad246b017399f96faf58cf6737bf01",
"sdkVersion": "2.0.1"
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "newscatcher-sdk"
version = "2.0.0"
version = "2.0.1"
description = ""
readme = "README.md"
authors = []
Expand Down
42 changes: 21 additions & 21 deletions reference.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reference
## Search
<details><summary><code>client.search.<a href="src/newscatcher/search/client.py">get</a>(...) -> SearchGetResponse</code></summary>
<details><summary><code>client.search.<a href="src/newscatcher/search/client.py">get</a>(...) -> GetSearchResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -651,7 +651,7 @@ To learn more, see the [Custom tags](https://www.newscatcherapi.com/docs/news-ap
</dl>
</details>

<details><summary><code>client.search.<a href="src/newscatcher/search/client.py">post</a>(...) -> SearchPostResponse</code></summary>
<details><summary><code>client.search.<a href="src/newscatcher/search/client.py">post</a>(...) -> PostSearchResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -1174,7 +1174,7 @@ client.search.post(
</details>

## LatestHeadlines
<details><summary><code>client.latest_headlines.<a href="src/newscatcher/latest_headlines/client.py">latest_headlines_get</a>(...) -> LatestHeadlinesGetResponse</code></summary>
<details><summary><code>client.latest_headlines.<a href="src/newscatcher/latest_headlines/client.py">get</a>(...) -> GetLatestHeadlinesResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -1209,7 +1209,7 @@ client = NewscatcherApi(
environment=NewscatcherApiEnvironment.DEFAULT,
)

client.latest_headlines.latest_headlines_get(
client.latest_headlines.get(
when="7d",
by_parse_date=True,
lang="en,es",
Expand Down Expand Up @@ -1709,7 +1709,7 @@ To learn more, see the [Custom tags](https://www.newscatcherapi.com/docs/news-ap
</dl>
</details>

<details><summary><code>client.latest_headlines.<a href="src/newscatcher/latest_headlines/client.py">latest_headlines_post</a>(...) -> LatestHeadlinesPostResponse</code></summary>
<details><summary><code>client.latest_headlines.<a href="src/newscatcher/latest_headlines/client.py">post</a>(...) -> PostLatestHeadlinesResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -1744,7 +1744,7 @@ client = NewscatcherApi(
environment=NewscatcherApiEnvironment.DEFAULT,
)

client.latest_headlines.latest_headlines_post(
client.latest_headlines.post(
when="7d",
page_size=1,
)
Expand Down Expand Up @@ -2128,7 +2128,7 @@ client.latest_headlines.latest_headlines_post(
</details>

## BreakingNews
<details><summary><code>client.breaking_news.<a href="src/newscatcher/breaking_news/client.py">breaking_news_get</a>(...) -> BreakingNewsResponseDto</code></summary>
<details><summary><code>client.breaking_news.<a href="src/newscatcher/breaking_news/client.py">get</a>(...) -> BreakingNewsResponseDto</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -2163,7 +2163,7 @@ client = NewscatcherApi(
environment=NewscatcherApiEnvironment.DEFAULT,
)

client.breaking_news.breaking_news_get(
client.breaking_news.get(
ranked_only=True,
from_rank=100,
to_rank=100,
Expand Down Expand Up @@ -2371,7 +2371,7 @@ client.breaking_news.breaking_news_get(
</dl>
</details>

<details><summary><code>client.breaking_news.<a href="src/newscatcher/breaking_news/client.py">breaking_news_post</a>(...) -> BreakingNewsResponseDto</code></summary>
<details><summary><code>client.breaking_news.<a href="src/newscatcher/breaking_news/client.py">post</a>(...) -> BreakingNewsResponseDto</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -2406,7 +2406,7 @@ client = NewscatcherApi(
environment=NewscatcherApiEnvironment.DEFAULT,
)

client.breaking_news.breaking_news_post(
client.breaking_news.post(
sort_by="relevancy",
ranked_only=True,
top_n_articles=1,
Expand Down Expand Up @@ -2599,7 +2599,7 @@ client.breaking_news.breaking_news_post(
</details>

## Authors
<details><summary><code>client.authors.<a href="src/newscatcher/authors/client.py">get</a>(...) -> AuthorsGetResponse</code></summary>
<details><summary><code>client.authors.<a href="src/newscatcher/authors/client.py">get</a>(...) -> GetAuthorsResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -3127,7 +3127,7 @@ To learn more, see the [Custom tags](https://www.newscatcherapi.com/docs/news-ap
</dl>
</details>

<details><summary><code>client.authors.<a href="src/newscatcher/authors/client.py">post</a>(...) -> AuthorsPostResponse</code></summary>
<details><summary><code>client.authors.<a href="src/newscatcher/authors/client.py">post</a>(...) -> PostAuthorsResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -3545,7 +3545,7 @@ client.authors.post(
</details>

## SearchByLink
<details><summary><code>client.search_by_link.<a href="src/newscatcher/search_by_link/client.py">search_by_link_get</a>(...) -> SearchResponseDto</code></summary>
<details><summary><code>client.search_by_link.<a href="src/newscatcher/search_by_link/client.py">get</a>(...) -> SearchResponseDto</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -3581,7 +3581,7 @@ client = NewscatcherApi(
environment=NewscatcherApiEnvironment.DEFAULT,
)

client.search_by_link.search_by_link_get(
client.search_by_link.get(
ids="5f8d0d55b6e45e00179c6e7e",
links="https://nytimes.com/article1,https://bbc.com/article2",
from_=datetime.datetime.fromisoformat("2024-07-01T00:00:00+00:00"),
Expand Down Expand Up @@ -3681,7 +3681,7 @@ The article link or list of article links to search for. To specify multiple lin
</dl>
</details>

<details><summary><code>client.search_by_link.<a href="src/newscatcher/search_by_link/client.py">search_by_link_post</a>(...) -> SearchResponseDto</code></summary>
<details><summary><code>client.search_by_link.<a href="src/newscatcher/search_by_link/client.py">post</a>(...) -> SearchResponseDto</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -3716,7 +3716,7 @@ client = NewscatcherApi(
environment=NewscatcherApiEnvironment.DEFAULT,
)

client.search_by_link.search_by_link_post(
client.search_by_link.post(
links="https://www.reuters.com/business/energy/oil-prices-up-after-israeli-attacks-oversupply-caps-gains-2025-09-10/",
)

Expand Down Expand Up @@ -4163,8 +4163,8 @@ client.sources.post(
</dl>
</details>

## Aggregation
<details><summary><code>client.aggregation.<a href="src/newscatcher/aggregation/client.py">count_get</a>(...) -> AggregationCountGetResponse</code></summary>
## AggregationCount
<details><summary><code>client.aggregation_count.<a href="src/newscatcher/aggregation_count/client.py">get</a>(...) -> GetAggregationCountResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -4200,7 +4200,7 @@ client = NewscatcherApi(
environment=NewscatcherApiEnvironment.DEFAULT,
)

client.aggregation.count_get(
client.aggregation_count.get(
q="\"supply chain\" AND Amazon NOT China",
search_in="title_content, title_content_translated",
predefined_sources="top 50 US, top 20 GB",
Expand Down Expand Up @@ -4680,7 +4680,7 @@ To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCod
</dl>
</details>

<details><summary><code>client.aggregation.<a href="src/newscatcher/aggregation/client.py">count_post</a>(...) -> AggregationCountPostResponse</code></summary>
<details><summary><code>client.aggregation_count.<a href="src/newscatcher/aggregation_count/client.py">post</a>(...) -> PostAggregationCountResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -4715,7 +4715,7 @@ client = NewscatcherApi(
environment=NewscatcherApiEnvironment.DEFAULT,
)

client.aggregation.count_post(
client.aggregation_count.post(
q="\"supply chain\" AND Amazon NOT China",
aggregation_by="day",
)
Expand Down
55 changes: 32 additions & 23 deletions src/newscatcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,28 @@
UnauthorizedError,
UnprocessableEntityError,
)
from . import aggregation, authors, breaking_news, latest_headlines, search, search_by_link, sources, subscription
from .aggregation import AggregationCountGetResponse, AggregationCountPostResponse
from .authors import AuthorsGetResponse, AuthorsPostResponse
from . import (
aggregation_count,
authors,
breaking_news,
latest_headlines,
search,
search_by_link,
sources,
subscription,
)
from .aggregation_count import GetAggregationCountResponse, PostAggregationCountResponse
from .authors import GetAuthorsResponse, PostAuthorsResponse
from .client import AsyncNewscatcherApi, NewscatcherApi
from .environment import NewscatcherApiEnvironment
from .latest_headlines import LatestHeadlinesGetResponse, LatestHeadlinesPostResponse
from .search import SearchGetResponse, SearchPostResponse
from .latest_headlines import GetLatestHeadlinesResponse, PostLatestHeadlinesResponse
from .search import GetSearchResponse, PostSearchResponse
from .version import __version__
_dynamic_imports: typing.Dict[str, str] = {
"AdditionalDomainInfo": ".types",
"AdditionalDomainInfoEntity": ".types",
"AdditionalSourceInfo": ".types",
"AggregationBy": ".types",
"AggregationCountGetResponse": ".aggregation",
"AggregationCountPostResponse": ".aggregation",
"AggregationCountResponseDto": ".types",
"AggregationCountResponseDtoAggregations": ".types",
"AggregationItem": ".types",
Expand All @@ -150,8 +157,6 @@
"ArticlesDto": ".types",
"AsyncNewscatcherApi": ".client",
"AuthorName": ".types",
"AuthorsGetResponse": ".authors",
"AuthorsPostResponse": ".authors",
"BadRequestError": ".errors",
"BaseSearchResponseDto": ".types",
"BreakingNewsArticleEntity": ".types",
Expand Down Expand Up @@ -179,6 +184,10 @@
"ForbiddenError": ".errors",
"From": ".types",
"FromRank": ".types",
"GetAggregationCountResponse": ".aggregation_count",
"GetAuthorsResponse": ".authors",
"GetLatestHeadlinesResponse": ".latest_headlines",
"GetSearchResponse": ".search",
"HasNlp": ".types",
"IabTags": ".types",
"Ids": ".types",
Expand All @@ -192,8 +201,6 @@
"IsOpinion": ".types",
"IsPaidContent": ".types",
"Lang": ".types",
"LatestHeadlinesGetResponse": ".latest_headlines",
"LatestHeadlinesPostResponse": ".latest_headlines",
"Links": ".types",
"LocEntityName": ".types",
"MiscEntityName": ".types",
Expand All @@ -217,15 +224,17 @@
"PageSize": ".types",
"ParentUrl": ".types",
"PerEntityName": ".types",
"PostAggregationCountResponse": ".aggregation_count",
"PostAuthorsResponse": ".authors",
"PostLatestHeadlinesResponse": ".latest_headlines",
"PostSearchResponse": ".search",
"PredefinedSources": ".types",
"PublishedDatePrecision": ".types",
"Q": ".types",
"RankedOnly": ".types",
"RequestTimeoutError": ".errors",
"RobotsCompliant": ".types",
"SearchGetResponse": ".search",
"SearchIn": ".types",
"SearchPostResponse": ".search",
"SearchResponseDto": ".types",
"SentimentScores": ".types",
"SortBy": ".types",
Expand All @@ -251,7 +260,7 @@
"WordCountMax": ".types",
"WordCountMin": ".types",
"__version__": ".version",
"aggregation": ".aggregation",
"aggregation_count": ".aggregation_count",
"authors": ".authors",
"breaking_news": ".breaking_news",
"latest_headlines": ".latest_headlines",
Expand Down Expand Up @@ -288,8 +297,6 @@ def __dir__():
"AdditionalDomainInfoEntity",
"AdditionalSourceInfo",
"AggregationBy",
"AggregationCountGetResponse",
"AggregationCountPostResponse",
"AggregationCountResponseDto",
"AggregationCountResponseDtoAggregations",
"AggregationItem",
Expand All @@ -305,8 +312,6 @@ def __dir__():
"ArticlesDto",
"AsyncNewscatcherApi",
"AuthorName",
"AuthorsGetResponse",
"AuthorsPostResponse",
"BadRequestError",
"BaseSearchResponseDto",
"BreakingNewsArticleEntity",
Expand Down Expand Up @@ -334,6 +339,10 @@ def __dir__():
"ForbiddenError",
"From",
"FromRank",
"GetAggregationCountResponse",
"GetAuthorsResponse",
"GetLatestHeadlinesResponse",
"GetSearchResponse",
"HasNlp",
"IabTags",
"Ids",
Expand All @@ -347,8 +356,6 @@ def __dir__():
"IsOpinion",
"IsPaidContent",
"Lang",
"LatestHeadlinesGetResponse",
"LatestHeadlinesPostResponse",
"Links",
"LocEntityName",
"MiscEntityName",
Expand All @@ -372,15 +379,17 @@ def __dir__():
"PageSize",
"ParentUrl",
"PerEntityName",
"PostAggregationCountResponse",
"PostAuthorsResponse",
"PostLatestHeadlinesResponse",
"PostSearchResponse",
"PredefinedSources",
"PublishedDatePrecision",
"Q",
"RankedOnly",
"RequestTimeoutError",
"RobotsCompliant",
"SearchGetResponse",
"SearchIn",
"SearchPostResponse",
"SearchResponseDto",
"SentimentScores",
"SortBy",
Expand All @@ -406,7 +415,7 @@ def __dir__():
"WordCountMax",
"WordCountMin",
"__version__",
"aggregation",
"aggregation_count",
"authors",
"breaking_news",
"latest_headlines",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from importlib import import_module

if typing.TYPE_CHECKING:
from .types import AggregationCountGetResponse, AggregationCountPostResponse
from .types import GetAggregationCountResponse, PostAggregationCountResponse
_dynamic_imports: typing.Dict[str, str] = {
"AggregationCountGetResponse": ".types",
"AggregationCountPostResponse": ".types",
"GetAggregationCountResponse": ".types",
"PostAggregationCountResponse": ".types",
}


Expand All @@ -34,4 +34,4 @@ def __dir__():
return sorted(lazy_attrs)


__all__ = ["AggregationCountGetResponse", "AggregationCountPostResponse"]
__all__ = ["GetAggregationCountResponse", "PostAggregationCountResponse"]
Loading
Loading