Skip to content

Commit c0345cb

Browse files
Add post data
1 parent e42756a commit c0345cb

3 files changed

Lines changed: 32 additions & 1 deletion

File tree

linkedapi/types/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,16 @@
122122
FetchPostParams,
123123
FetchPostResult,
124124
Post,
125+
PostActorType,
126+
PostAuthor,
125127
PostComment,
126128
PostCommenterType,
127129
PostCommentsRetrievalConfig,
128130
PostCommentsSort,
129131
PostEngagerType,
130132
PostReaction,
131133
PostReactionsRetrievalConfig,
134+
PostReposter,
132135
PostType,
133136
Reaction,
134137
ReactionType,
@@ -271,13 +274,16 @@
271274
"PersonLanguage",
272275
"PersonSkill",
273276
"Post",
277+
"PostActorType",
278+
"PostAuthor",
274279
"PostComment",
275280
"PostCommenterType",
276281
"PostCommentsRetrievalConfig",
277282
"PostCommentsSort",
278283
"PostEngagerType",
279284
"PostReaction",
280285
"PostReactionsRetrievalConfig",
286+
"PostReposter",
281287
"PostType",
282288
"ReactToPostParams",
283289
"Reaction",

linkedapi/types/post.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from linkedapi.types.params import BaseActionParams, LimitParams
77

88
PostType = Literal["original", "repost"]
9+
PostActorType = Literal["person", "company"]
910
ReactionType = Literal["like", "celebrate", "support", "love", "insightful", "funny"]
1011
PostCommenterType = Literal["person", "company"]
1112
PostEngagerType = Literal["person", "company"]
@@ -60,14 +61,38 @@ class PostReaction(LinkedApiModel):
6061
type: ReactionType | None = None
6162

6263

64+
class PostAuthor(LinkedApiModel):
65+
type: PostActorType | None = None
66+
name: str | None = None
67+
profile_url: str | None = None
68+
headline: str | None = None
69+
company_url: str | None = None
70+
71+
72+
class PostReposter(LinkedApiModel):
73+
type: PostActorType | None = None
74+
name: str | None = None
75+
profile_url: str | None = None
76+
headline: str | None = None
77+
company_url: str | None = None
78+
79+
6380
class Post(LinkedApiModel):
6481
url: str | None = None
6582
time: str | None = None
6683
type: PostType | None = None
84+
activity_urn: str | None = None
85+
author: PostAuthor | None = None
86+
reposter: PostReposter | None = None
6787
repost_text: str | None = None
88+
hashtags: list[str] | None = None
89+
mentions: list[str] | None = None
90+
external_links: list[str] | None = None
6891
text: str | None = None
6992
images: list[str] | None = None
93+
document_slides: list[str] | None = None
7094
has_video: bool | None = None
95+
video_thumbnail: str | None = None
7196
has_poll: bool | None = None
7297
reactions_count: int | None = None
7398
comments_count: int | None = None

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.0.0"
7+
version = "1.0.1"
88
description = "Official synchronous Python SDK for Linked API."
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)