linkedapi 1.3.11__tar.gz → 1.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {linkedapi-1.3.11 → linkedapi-1.4.0}/PKG-INFO +1 -1
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/__init__.py +2 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/client.py +3 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/errors.py +6 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/__init__.py +2 -0
- linkedapi-1.4.0/linkedapi/operations/create_repost.py +15 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/__init__.py +10 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/post.py +46 -7
- {linkedapi-1.3.11 → linkedapi-1.4.0}/pyproject.toml +1 -1
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_errors.py +3 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_operations.py +2 -1
- {linkedapi-1.3.11 → linkedapi-1.4.0}/.github/workflows/publish.yaml +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/.gitignore +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/LICENSE +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/README.md +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/admin/__init__.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/admin/accounts.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/admin/admin.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/admin/http_client.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/admin/limits.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/admin/subscription.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/admin/webhooks.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/config.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/core/__init__.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/core/operation.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/core/polling.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/http/__init__.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/http/base.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/http/linked_api_http_client.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/mappers/__init__.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/mappers/array.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/mappers/base.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/mappers/send_message.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/mappers/simple.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/mappers/then.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/mappers/void.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/accept_invitation.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/check_connection_status.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/comment_on_post.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/create_post.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/custom_workflow.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/fetch_company.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/fetch_job.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/fetch_person.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/fetch_post.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/ignore_invitation.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/manage_conversation.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/nv_fetch_company.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/nv_fetch_person.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/nv_manage_conversation.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/nv_search_companies.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/nv_search_people.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/nv_send_message.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/nv_sync_conversation.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/nv_sync_inbox.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/react_to_comment.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/react_to_post.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/remove_connection.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/reply_to_comment.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/retrieve_connections.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/retrieve_feed.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/retrieve_invitations.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/retrieve_pending_requests.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/retrieve_performance.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/retrieve_profile_viewers.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/retrieve_ssi.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/search_companies.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/search_jobs.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/search_people.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/search_posts.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/send_connection_request.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/send_message.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/sync_conversation.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/sync_inbox.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/sync_network.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/operations/withdraw_connection_request.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/py.typed +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/account.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/admin/__init__.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/admin/accounts.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/admin/config.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/admin/limits.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/admin/subscription.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/base.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/company.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/connection.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/feed.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/jobs.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/message.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/network.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/params.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/person.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/profile_viewers.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/responses.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/search_companies.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/search_people.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/search_posts.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/statistics.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/webhooks.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/types/workflow.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/webhooks/__init__.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/linkedapi/webhooks/parse.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/conftest.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_admin.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_direct_methods.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_http_client.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_mappers.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_models.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_polling.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_webhooks.py +0 -0
- {linkedapi-1.3.11 → linkedapi-1.4.0}/tests/test_working_hours_contract.py +0 -0
|
@@ -33,6 +33,7 @@ from linkedapi.operations import (
|
|
|
33
33
|
CheckConnectionStatus,
|
|
34
34
|
CommentOnPost,
|
|
35
35
|
CreatePost,
|
|
36
|
+
CreateRepost,
|
|
36
37
|
CustomWorkflow,
|
|
37
38
|
FetchCompany,
|
|
38
39
|
FetchCompanyMapper,
|
|
@@ -97,6 +98,7 @@ __all__ = [
|
|
|
97
98
|
"CheckConnectionStatus",
|
|
98
99
|
"CommentOnPost",
|
|
99
100
|
"CreatePost",
|
|
101
|
+
"CreateRepost",
|
|
100
102
|
"CustomWorkflow",
|
|
101
103
|
"FetchCompany",
|
|
102
104
|
"FetchCompanyMapper",
|
|
@@ -12,6 +12,7 @@ from linkedapi.operations import (
|
|
|
12
12
|
CheckConnectionStatus,
|
|
13
13
|
CommentOnPost,
|
|
14
14
|
CreatePost,
|
|
15
|
+
CreateRepost,
|
|
15
16
|
CustomWorkflow,
|
|
16
17
|
FetchCompany,
|
|
17
18
|
FetchJob,
|
|
@@ -98,6 +99,7 @@ class LinkedApi:
|
|
|
98
99
|
self.react_to_comment = ReactToComment(self.http_client)
|
|
99
100
|
self.reply_to_comment = ReplyToComment(self.http_client)
|
|
100
101
|
self.create_post = CreatePost(self.http_client)
|
|
102
|
+
self.create_repost = CreateRepost(self.http_client)
|
|
101
103
|
self.retrieve_feed = RetrieveFeed(self.http_client)
|
|
102
104
|
self.retrieve_ssi = RetrieveSSI(self.http_client)
|
|
103
105
|
self.retrieve_performance = RetrievePerformance(self.http_client)
|
|
@@ -140,6 +142,7 @@ class LinkedApi:
|
|
|
140
142
|
self.react_to_comment,
|
|
141
143
|
self.reply_to_comment,
|
|
142
144
|
self.create_post,
|
|
145
|
+
self.create_repost,
|
|
143
146
|
self.retrieve_feed,
|
|
144
147
|
self.retrieve_ssi,
|
|
145
148
|
self.retrieve_performance,
|
|
@@ -25,6 +25,9 @@ LinkedApiActionErrorType = Literal[
|
|
|
25
25
|
"commentNotFound",
|
|
26
26
|
"replyingNotAllowed",
|
|
27
27
|
"noPostingPermission",
|
|
28
|
+
"mentionNotResolved",
|
|
29
|
+
"repostNotAllowed",
|
|
30
|
+
"alreadyReposted",
|
|
28
31
|
"noSalesNavigator",
|
|
29
32
|
"conversationsNotSynced",
|
|
30
33
|
"threadNotFound",
|
|
@@ -52,6 +55,9 @@ LINKED_API_ACTION_ERROR_TYPES: tuple[str, ...] = (
|
|
|
52
55
|
"commentNotFound",
|
|
53
56
|
"replyingNotAllowed",
|
|
54
57
|
"noPostingPermission",
|
|
58
|
+
"mentionNotResolved",
|
|
59
|
+
"repostNotAllowed",
|
|
60
|
+
"alreadyReposted",
|
|
55
61
|
"noSalesNavigator",
|
|
56
62
|
"conversationsNotSynced",
|
|
57
63
|
"threadNotFound",
|
|
@@ -2,6 +2,7 @@ from linkedapi.operations.accept_invitation import AcceptInvitation
|
|
|
2
2
|
from linkedapi.operations.check_connection_status import CheckConnectionStatus
|
|
3
3
|
from linkedapi.operations.comment_on_post import CommentOnPost
|
|
4
4
|
from linkedapi.operations.create_post import CreatePost
|
|
5
|
+
from linkedapi.operations.create_repost import CreateRepost
|
|
5
6
|
from linkedapi.operations.custom_workflow import CustomWorkflow
|
|
6
7
|
from linkedapi.operations.fetch_company import FetchCompany, FetchCompanyMapper
|
|
7
8
|
from linkedapi.operations.fetch_job import FetchJob, FetchJobMapper
|
|
@@ -44,6 +45,7 @@ __all__ = [
|
|
|
44
45
|
"CheckConnectionStatus",
|
|
45
46
|
"CommentOnPost",
|
|
46
47
|
"CreatePost",
|
|
48
|
+
"CreateRepost",
|
|
47
49
|
"CustomWorkflow",
|
|
48
50
|
"FetchCompany",
|
|
49
51
|
"FetchCompanyMapper",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from linkedapi.core import Operation
|
|
4
|
+
from linkedapi.mappers import SimpleWorkflowMapper
|
|
5
|
+
from linkedapi.types import CreateRepostParams, CreateRepostResult
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateRepost(Operation[CreateRepostParams, CreateRepostResult]):
|
|
9
|
+
"""Repost a LinkedIn post, either as is or with your own commentary."""
|
|
10
|
+
|
|
11
|
+
operation_name = "createRepost"
|
|
12
|
+
mapper = SimpleWorkflowMapper[CreateRepostParams, CreateRepostResult](
|
|
13
|
+
"st.createRepost",
|
|
14
|
+
result_model=CreateRepostResult,
|
|
15
|
+
)
|
|
@@ -159,6 +159,8 @@ from linkedapi.types.post import (
|
|
|
159
159
|
CreatePostAttachment,
|
|
160
160
|
CreatePostParams,
|
|
161
161
|
CreatePostResult,
|
|
162
|
+
CreateRepostParams,
|
|
163
|
+
CreateRepostResult,
|
|
162
164
|
FetchPostParams,
|
|
163
165
|
FetchPostResult,
|
|
164
166
|
Post,
|
|
@@ -169,10 +171,13 @@ from linkedapi.types.post import (
|
|
|
169
171
|
PostCommentsRetrievalConfig,
|
|
170
172
|
PostCommentsSort,
|
|
171
173
|
PostEngagerType,
|
|
174
|
+
PostMention,
|
|
172
175
|
PostReaction,
|
|
173
176
|
PostReactionsRetrievalConfig,
|
|
174
177
|
PostReposter,
|
|
178
|
+
PostTargetParams,
|
|
175
179
|
PostType,
|
|
180
|
+
PublishedPostResult,
|
|
176
181
|
Reaction,
|
|
177
182
|
ReactionType,
|
|
178
183
|
ReactToCommentParams,
|
|
@@ -309,6 +314,8 @@ __all__ = [
|
|
|
309
314
|
"CreatePostResult",
|
|
310
315
|
"CreateReconnectionSessionParams",
|
|
311
316
|
"CreateReconnectionSessionResult",
|
|
317
|
+
"CreateRepostParams",
|
|
318
|
+
"CreateRepostResult",
|
|
312
319
|
"DeleteLimitEntry",
|
|
313
320
|
"DeleteLimitsParams",
|
|
314
321
|
"DeleteWebhookParams",
|
|
@@ -403,6 +410,7 @@ __all__ = [
|
|
|
403
410
|
"PostCommentsRetrievalConfig",
|
|
404
411
|
"PostCommentsSort",
|
|
405
412
|
"PostEngagerType",
|
|
413
|
+
"PostMention",
|
|
406
414
|
"PostReaction",
|
|
407
415
|
"PostReactionsRetrievalConfig",
|
|
408
416
|
"PostReposter",
|
|
@@ -410,9 +418,11 @@ __all__ = [
|
|
|
410
418
|
"PostSearchDatePosted",
|
|
411
419
|
"PostSearchPostedBy",
|
|
412
420
|
"PostSearchSort",
|
|
421
|
+
"PostTargetParams",
|
|
413
422
|
"PostType",
|
|
414
423
|
"ProfileViewer",
|
|
415
424
|
"ProfileViewerType",
|
|
425
|
+
"PublishedPostResult",
|
|
416
426
|
"ReactToCommentParams",
|
|
417
427
|
"ReactToPostParams",
|
|
418
428
|
"Reaction",
|
|
@@ -28,14 +28,22 @@ class Comment(LinkedApiModel):
|
|
|
28
28
|
reactions_count: int | None = None
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
class
|
|
32
|
-
|
|
31
|
+
class PostTargetParams(BaseActionParams):
|
|
32
|
+
"""A post is addressed by its URL or by its URN.
|
|
33
|
+
|
|
34
|
+
Provide one of the two; when both are given, they must refer to the same post.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
post_url: str | None = None
|
|
38
|
+
post_urn: str | None = None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class ReactToPostParams(PostTargetParams):
|
|
33
42
|
type: ReactionType
|
|
34
43
|
company_url: str | None = None
|
|
35
44
|
|
|
36
45
|
|
|
37
|
-
class CommentOnPostParams(
|
|
38
|
-
post_url: str
|
|
46
|
+
class CommentOnPostParams(PostTargetParams):
|
|
39
47
|
text: str
|
|
40
48
|
company_url: str | None = None
|
|
41
49
|
|
|
@@ -135,8 +143,7 @@ class PostCommentsRetrievalConfig(LimitParams):
|
|
|
135
143
|
PostReactionsRetrievalConfig: TypeAlias = LimitParams
|
|
136
144
|
|
|
137
145
|
|
|
138
|
-
class BaseFetchPostParams(
|
|
139
|
-
post_url: str
|
|
146
|
+
class BaseFetchPostParams(PostTargetParams):
|
|
140
147
|
retrieve_comments: bool | None = None
|
|
141
148
|
retrieve_reactions: bool | None = None
|
|
142
149
|
|
|
@@ -160,11 +167,43 @@ class CreatePostAttachment(LinkedApiModel):
|
|
|
160
167
|
name: str | None = None
|
|
161
168
|
|
|
162
169
|
|
|
170
|
+
class PostMention(LinkedApiModel):
|
|
171
|
+
"""One person or company to mention, bound to a "@[key]" placeholder in the post text.
|
|
172
|
+
|
|
173
|
+
"name" is always required because LinkedIn's composer accepts nothing but typed text. The
|
|
174
|
+
optional identifier decides which of the offered namesakes is taken; with "name" alone the pick
|
|
175
|
+
is whichever suggestion LinkedIn ranked first. Provide at most one identifier.
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
key: str
|
|
179
|
+
name: str
|
|
180
|
+
urn: str | None = None
|
|
181
|
+
person_hashed_url: str | None = None
|
|
182
|
+
company_hashed_url: str | None = None
|
|
183
|
+
|
|
184
|
+
|
|
163
185
|
class CreatePostParams(BaseActionParams):
|
|
164
186
|
text: str
|
|
187
|
+
mentions: list[PostMention] | None = None
|
|
165
188
|
attachments: list[CreatePostAttachment] | None = None
|
|
166
189
|
company_url: str | None = None
|
|
167
190
|
|
|
168
191
|
|
|
169
|
-
class
|
|
192
|
+
class PublishedPostResult(LinkedApiModel):
|
|
193
|
+
"""Identifiers of a post this account has just published."""
|
|
194
|
+
|
|
170
195
|
post_url: str | None = None
|
|
196
|
+
post_urn: str | None = None
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
CreatePostResult: TypeAlias = PublishedPostResult
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class CreateRepostParams(PostTargetParams):
|
|
203
|
+
"""Without "text" the post is reposted as is; with "text" the commentary goes above it."""
|
|
204
|
+
|
|
205
|
+
text: str | None = None
|
|
206
|
+
mentions: list[PostMention] | None = None
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
CreateRepostResult: TypeAlias = PublishedPostResult
|
|
@@ -54,6 +54,9 @@ def test_error_type_sets_match_node_contract() -> None:
|
|
|
54
54
|
"commentNotFound",
|
|
55
55
|
"replyingNotAllowed",
|
|
56
56
|
"noPostingPermission",
|
|
57
|
+
"mentionNotResolved",
|
|
58
|
+
"repostNotAllowed",
|
|
59
|
+
"alreadyReposted",
|
|
57
60
|
"noSalesNavigator",
|
|
58
61
|
"conversationsNotSynced",
|
|
59
62
|
"threadNotFound",
|
|
@@ -64,6 +64,7 @@ def test_linked_api_exposes_all_predefined_operations() -> None:
|
|
|
64
64
|
"react_to_comment",
|
|
65
65
|
"reply_to_comment",
|
|
66
66
|
"create_post",
|
|
67
|
+
"create_repost",
|
|
67
68
|
"retrieve_ssi",
|
|
68
69
|
"retrieve_performance",
|
|
69
70
|
"retrieve_profile_viewers",
|
|
@@ -74,7 +75,7 @@ def test_linked_api_exposes_all_predefined_operations() -> None:
|
|
|
74
75
|
assert hasattr(operation, "execute")
|
|
75
76
|
assert hasattr(operation, "result")
|
|
76
77
|
assert hasattr(operation, "cancel")
|
|
77
|
-
assert len(linkedapi.operations) ==
|
|
78
|
+
assert len(linkedapi.operations) == 41
|
|
78
79
|
|
|
79
80
|
|
|
80
81
|
def test_operation_mappers_match_node_contract() -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|