Skip to content

Commit d918027

Browse files
pin post search filters by id & add reaction actor
1 parent e193a3e commit d918027

4 files changed

Lines changed: 25 additions & 6 deletions

File tree

‎linkedapi/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
verify_webhook_signature,
8888
)
8989

90-
__version__ = "1.4.3"
90+
__version__ = "1.4.4"
9191
PredefinedOperation = Operation
9292

9393
__all__ = [

‎linkedapi/types/post.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ class PostComment(LinkedApiModel):
112112

113113

114114
class PostReaction(LinkedApiModel):
115+
"""One reaction on a post.
116+
117+
"actor" is whoever reacted, in the same shape a post's author has.
118+
119+
Deprecated: the engager_* fields are still returned; use "actor" instead.
120+
"""
121+
122+
actor: PostAuthor | None = None
123+
# Deprecated: use "actor" instead of the five engager_* fields.
115124
engager_urn: str | None = None
116125
engager_url: str | None = None
117126
engager_name: str | None = None

‎linkedapi/types/search_posts.py‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,30 @@
1616
class SearchPostsPersonFilter(LinkedApiModel):
1717
"""One person to narrow a post search by.
1818
19-
"name" is always required because LinkedIn's filter panel accepts nothing but typed text. The
20-
optional identifier decides which of the offered namesakes is taken; with "name" alone the pick
21-
is whichever suggestion LinkedIn ranked first.
19+
With "name" alone the filter may match a namesake. "id" is any identifier of the person - its
20+
URN, or its public or hashed LinkedIn URL - and pins the filter to exactly that person; when it
21+
cannot be applied, the action fails with "filterNotApplied" rather than filtering by somebody
22+
else.
23+
24+
Deprecated: "urn" and "person_hashed_url" are still accepted; use "id" instead.
2225
"""
2326

2427
name: str
28+
id: str | None = None
2529
urn: str | None = None
2630
person_hashed_url: str | None = None
2731

2832

2933
class SearchPostsCompanyFilter(LinkedApiModel):
30-
"""One company to narrow a post search by. Same contract as SearchPostsPersonFilter."""
34+
"""One company to narrow a post search by. Same contract as SearchPostsPersonFilter.
35+
36+
"id" is the company's URN, its public or hashed LinkedIn URL, or its numeric ID.
37+
38+
Deprecated: "urn" and "company_hashed_url" are still accepted; use "id" instead.
39+
"""
3140

3241
name: str
42+
id: str | None = None
3343
urn: str | None = None
3444
company_hashed_url: str | None = None
3545

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "linkedapi"
7-
version = "1.4.3"
7+
version = "1.4.4"
88
description = "Official synchronous Python SDK for Linked API."
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)