Skip to content

Commit 68cb98c

Browse files
feat(api): api update
1 parent 3b02200 commit 68cb98c

2 files changed

Lines changed: 52 additions & 3 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 41
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5dbe631ce516ca688273053ddcb58870561bd6dc76fa75df354c954d7af65a3c.yml
3-
openapi_spec_hash: 53a74c4cccbdec8590db38183840a446
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5e890b591fcd62757c51fa1decc2cccc3d52d5a83097b10775507e3485776f73.yml
3+
openapi_spec_hash: 432ee63a7d4ffca7d5993dc0853d9c81
44
config_hash: 0fb0ceca5946298c416cec0cca5260c7

‎src/context/dev/types/news_search_response.py‎

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,91 @@
1010

1111

1212
class DataMatch(BaseModel):
13+
"""How the article relates to the company you searched for."""
14+
1315
confidence: Optional[float] = None
16+
"""How confident the match is, from 0 to 1. Null when a score is unavailable."""
1417

1518
level: Literal["primary", "secondary"]
19+
"""
20+
primary when the article is mainly about the company, secondary when the company
21+
is mentioned but is not the main subject.
22+
"""
1623

1724

1825
class DataSource(BaseModel):
26+
"""The publication that published the article."""
27+
1928
direct: bool
2029
"""True when Context observed this article in the publisher-owned feed."""
2130

2231
domain: str
32+
"""Website domain of the publication."""
2333

2434
name: str
35+
"""Name of the publication, such as Reuters."""
2536

2637

2738
class Data(BaseModel):
2839
id: str
40+
"""Stable unique identifier for this article.
41+
42+
Use it to deduplicate or reference an article across requests.
43+
"""
2944

3045
authors: List[str]
46+
"""Bylined authors. Empty when no byline is available."""
3147

3248
description: Optional[str] = None
49+
"""Short summary or excerpt of the article, when the publisher provides one."""
3350

3451
image_url: Optional[str] = None
52+
"""Lead image for the article, when one is available."""
3553

3654
language: Optional[str] = None
55+
"""Language the article is written in, as a lowercase ISO 639-1 code such as en.
56+
57+
Null when unknown.
58+
"""
3759

3860
match: DataMatch
61+
"""How the article relates to the company you searched for."""
3962

4063
published_at: Optional[datetime] = None
64+
"""When the article was published, as an ISO 8601 timestamp.
65+
66+
Null when the publisher does not state a reliable date.
67+
"""
4168

4269
source: DataSource
70+
"""The publication that published the article."""
4371

4472
story_id: str
45-
"""Groups matching normalized headlines published on the same UTC day."""
73+
"""Shared by articles covering the same story on the same day.
74+
75+
Use it to group or collapse syndicated copies of one announcement across
76+
outlets.
77+
"""
4678

4779
title: str
80+
"""Article headline."""
4881

4982
type: Literal["editorial", "press_release", "regulatory_filing", "advisory"]
83+
"""Kind of coverage.
84+
85+
Use it to separate independent reporting (editorial) from company-issued content
86+
(press_release, regulatory_filing, advisory).
87+
"""
5088

5189
url: str
90+
"""Link to the article on the publisher site."""
5291

5392

5493
class Meta(BaseModel):
94+
"""Summary information about this response."""
95+
5596
count: int
97+
"""Number of articles in this page."""
5698

5799

58100
class KeyMetadata(BaseModel):
@@ -70,12 +112,19 @@ class KeyMetadata(BaseModel):
70112

71113
class NewsSearchResponse(BaseModel):
72114
data: List[Data]
115+
"""Articles matching the search, in the requested order."""
73116

74117
has_more: bool
118+
"""True when more results are available beyond this page."""
75119

76120
meta: Meta
121+
"""Summary information about this response."""
77122

78123
next_cursor: Optional[str] = None
124+
"""Pass as cursor in the next request to fetch the following page.
125+
126+
Null when there are no more results.
127+
"""
79128

80129
key_metadata: Optional[KeyMetadata] = None
81130
"""Metadata about the API key used for the request.

0 commit comments

Comments
 (0)