linkedapi 1.3.4__tar.gz → 1.3.5__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.4 → linkedapi-1.3.5}/PKG-INFO +1 -1
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/__init__.py +5 -1
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/client.py +6 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/errors.py +4 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/__init__.py +4 -0
- linkedapi-1.3.5/linkedapi/operations/comment_on_post.py +15 -0
- linkedapi-1.3.5/linkedapi/operations/react_to_comment.py +12 -0
- linkedapi-1.3.5/linkedapi/operations/reply_to_comment.py +15 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/__init__.py +10 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/post.py +23 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/pyproject.toml +1 -1
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/test_errors.py +2 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/test_operations.py +10 -1
- linkedapi-1.3.4/linkedapi/operations/comment_on_post.py +0 -12
- {linkedapi-1.3.4 → linkedapi-1.3.5}/.github/workflows/publish.yaml +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/.gitignore +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/LICENSE +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/README.md +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/admin/__init__.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/admin/accounts.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/admin/admin.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/admin/http_client.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/admin/limits.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/admin/subscription.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/admin/webhooks.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/config.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/core/__init__.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/core/operation.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/core/polling.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/http/__init__.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/http/base.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/http/linked_api_http_client.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/mappers/__init__.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/mappers/array.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/mappers/base.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/mappers/send_message.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/mappers/simple.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/mappers/then.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/mappers/void.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/accept_invitation.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/check_connection_status.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/create_post.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/custom_workflow.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/fetch_company.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/fetch_job.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/fetch_person.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/fetch_post.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/ignore_invitation.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/manage_conversation.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/nv_fetch_company.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/nv_fetch_person.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/nv_manage_conversation.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/nv_search_companies.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/nv_search_people.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/nv_send_message.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/nv_sync_conversation.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/nv_sync_inbox.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/react_to_post.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/remove_connection.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/retrieve_connections.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/retrieve_feed.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/retrieve_invitations.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/retrieve_pending_requests.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/retrieve_performance.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/retrieve_ssi.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/search_companies.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/search_jobs.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/search_people.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/send_connection_request.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/send_message.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/sync_conversation.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/sync_inbox.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/sync_network.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/operations/withdraw_connection_request.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/py.typed +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/account.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/admin/__init__.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/admin/accounts.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/admin/config.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/admin/limits.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/admin/subscription.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/base.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/company.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/connection.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/feed.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/jobs.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/message.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/network.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/params.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/person.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/responses.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/search_companies.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/search_people.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/statistics.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/webhooks.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/types/workflow.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/webhooks/__init__.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/linkedapi/webhooks/parse.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/conftest.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/test_admin.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/test_direct_methods.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/test_http_client.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/test_mappers.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/test_models.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/test_polling.py +0 -0
- {linkedapi-1.3.4 → linkedapi-1.3.5}/tests/test_webhooks.py +0 -0
|
@@ -54,8 +54,10 @@ from linkedapi.operations import (
|
|
|
54
54
|
NvSendMessage,
|
|
55
55
|
NvSyncConversation,
|
|
56
56
|
NvSyncInbox,
|
|
57
|
+
ReactToComment,
|
|
57
58
|
ReactToPost,
|
|
58
59
|
RemoveConnection,
|
|
60
|
+
ReplyToComment,
|
|
59
61
|
RetrieveConnections,
|
|
60
62
|
RetrieveFeed,
|
|
61
63
|
RetrieveInvitations,
|
|
@@ -76,7 +78,7 @@ from linkedapi.types import * # noqa: F403
|
|
|
76
78
|
from linkedapi.types import __all__ as _types_all
|
|
77
79
|
from linkedapi.webhooks import parse_webhook_event
|
|
78
80
|
|
|
79
|
-
__version__ = "1.3.
|
|
81
|
+
__version__ = "1.3.5"
|
|
80
82
|
PredefinedOperation = Operation
|
|
81
83
|
|
|
82
84
|
__all__ = [
|
|
@@ -128,8 +130,10 @@ __all__ = [
|
|
|
128
130
|
"NvSyncInbox",
|
|
129
131
|
"Operation",
|
|
130
132
|
"PredefinedOperation",
|
|
133
|
+
"ReactToComment",
|
|
131
134
|
"ReactToPost",
|
|
132
135
|
"RemoveConnection",
|
|
136
|
+
"ReplyToComment",
|
|
133
137
|
"ResponseMapping",
|
|
134
138
|
"RetrieveInvitations",
|
|
135
139
|
"RetrieveConnections",
|
|
@@ -27,8 +27,10 @@ from linkedapi.operations import (
|
|
|
27
27
|
NvSendMessage,
|
|
28
28
|
NvSyncConversation,
|
|
29
29
|
NvSyncInbox,
|
|
30
|
+
ReactToComment,
|
|
30
31
|
ReactToPost,
|
|
31
32
|
RemoveConnection,
|
|
33
|
+
ReplyToComment,
|
|
32
34
|
RetrieveConnections,
|
|
33
35
|
RetrieveFeed,
|
|
34
36
|
RetrieveInvitations,
|
|
@@ -90,6 +92,8 @@ class LinkedApi:
|
|
|
90
92
|
self.fetch_job = FetchJob(self.http_client)
|
|
91
93
|
self.react_to_post = ReactToPost(self.http_client)
|
|
92
94
|
self.comment_on_post = CommentOnPost(self.http_client)
|
|
95
|
+
self.react_to_comment = ReactToComment(self.http_client)
|
|
96
|
+
self.reply_to_comment = ReplyToComment(self.http_client)
|
|
93
97
|
self.create_post = CreatePost(self.http_client)
|
|
94
98
|
self.retrieve_feed = RetrieveFeed(self.http_client)
|
|
95
99
|
self.retrieve_ssi = RetrieveSSI(self.http_client)
|
|
@@ -128,6 +132,8 @@ class LinkedApi:
|
|
|
128
132
|
self.fetch_job,
|
|
129
133
|
self.react_to_post,
|
|
130
134
|
self.comment_on_post,
|
|
135
|
+
self.react_to_comment,
|
|
136
|
+
self.reply_to_comment,
|
|
131
137
|
self.create_post,
|
|
132
138
|
self.retrieve_feed,
|
|
133
139
|
self.retrieve_ssi,
|
|
@@ -20,6 +20,8 @@ LinkedApiActionErrorType = Literal[
|
|
|
20
20
|
"postNotFound",
|
|
21
21
|
"jobNotFound",
|
|
22
22
|
"commentingNotAllowed",
|
|
23
|
+
"commentNotFound",
|
|
24
|
+
"replyingNotAllowed",
|
|
23
25
|
"noPostingPermission",
|
|
24
26
|
"noSalesNavigator",
|
|
25
27
|
"conversationsNotSynced",
|
|
@@ -43,6 +45,8 @@ LINKED_API_ACTION_ERROR_TYPES: tuple[str, ...] = (
|
|
|
43
45
|
"postNotFound",
|
|
44
46
|
"jobNotFound",
|
|
45
47
|
"commentingNotAllowed",
|
|
48
|
+
"commentNotFound",
|
|
49
|
+
"replyingNotAllowed",
|
|
46
50
|
"noPostingPermission",
|
|
47
51
|
"noSalesNavigator",
|
|
48
52
|
"conversationsNotSynced",
|
|
@@ -17,8 +17,10 @@ from linkedapi.operations.nv_search_people import NvSearchPeople
|
|
|
17
17
|
from linkedapi.operations.nv_send_message import NvSendMessage
|
|
18
18
|
from linkedapi.operations.nv_sync_conversation import NvSyncConversation
|
|
19
19
|
from linkedapi.operations.nv_sync_inbox import NvSyncInbox
|
|
20
|
+
from linkedapi.operations.react_to_comment import ReactToComment
|
|
20
21
|
from linkedapi.operations.react_to_post import ReactToPost
|
|
21
22
|
from linkedapi.operations.remove_connection import RemoveConnection
|
|
23
|
+
from linkedapi.operations.reply_to_comment import ReplyToComment
|
|
22
24
|
from linkedapi.operations.retrieve_connections import RetrieveConnections
|
|
23
25
|
from linkedapi.operations.retrieve_feed import RetrieveFeed
|
|
24
26
|
from linkedapi.operations.retrieve_invitations import RetrieveInvitations
|
|
@@ -61,8 +63,10 @@ __all__ = [
|
|
|
61
63
|
"NvSendMessage",
|
|
62
64
|
"NvSyncConversation",
|
|
63
65
|
"NvSyncInbox",
|
|
66
|
+
"ReactToComment",
|
|
64
67
|
"ReactToPost",
|
|
65
68
|
"RemoveConnection",
|
|
69
|
+
"ReplyToComment",
|
|
66
70
|
"RetrieveConnections",
|
|
67
71
|
"RetrieveFeed",
|
|
68
72
|
"RetrieveInvitations",
|
|
@@ -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 CommentOnPostParams, CommentResult
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CommentOnPost(Operation[CommentOnPostParams, CommentResult]):
|
|
9
|
+
"""Comment on a LinkedIn post."""
|
|
10
|
+
|
|
11
|
+
operation_name = "commentOnPost"
|
|
12
|
+
mapper = SimpleWorkflowMapper[CommentOnPostParams, CommentResult](
|
|
13
|
+
"st.commentOnPost",
|
|
14
|
+
result_model=CommentResult,
|
|
15
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from linkedapi.core import Operation
|
|
4
|
+
from linkedapi.mappers import VoidWorkflowMapper
|
|
5
|
+
from linkedapi.types import ReactToCommentParams
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ReactToComment(Operation[ReactToCommentParams, None]):
|
|
9
|
+
"""React to a LinkedIn comment."""
|
|
10
|
+
|
|
11
|
+
operation_name = "reactToComment"
|
|
12
|
+
mapper = VoidWorkflowMapper[ReactToCommentParams]("st.reactToComment")
|
|
@@ -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 CommentResult, ReplyToCommentParams
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ReplyToComment(Operation[ReplyToCommentParams, CommentResult]):
|
|
9
|
+
"""Reply to a LinkedIn comment."""
|
|
10
|
+
|
|
11
|
+
operation_name = "replyToComment"
|
|
12
|
+
mapper = SimpleWorkflowMapper[ReplyToCommentParams, CommentResult](
|
|
13
|
+
"st.replyToComment",
|
|
14
|
+
result_model=CommentResult,
|
|
15
|
+
)
|
|
@@ -149,6 +149,8 @@ from linkedapi.types.post import (
|
|
|
149
149
|
BaseFetchPostParamsWide,
|
|
150
150
|
Comment,
|
|
151
151
|
CommentOnPostParams,
|
|
152
|
+
CommentOnPostResult,
|
|
153
|
+
CommentResult,
|
|
152
154
|
CreatePostAttachment,
|
|
153
155
|
CreatePostParams,
|
|
154
156
|
CreatePostResult,
|
|
@@ -168,7 +170,10 @@ from linkedapi.types.post import (
|
|
|
168
170
|
PostType,
|
|
169
171
|
Reaction,
|
|
170
172
|
ReactionType,
|
|
173
|
+
ReactToCommentParams,
|
|
171
174
|
ReactToPostParams,
|
|
175
|
+
ReplyToCommentParams,
|
|
176
|
+
ReplyToCommentResult,
|
|
172
177
|
)
|
|
173
178
|
from linkedapi.types.responses import LinkedApiRequestError, LinkedApiResponse
|
|
174
179
|
from linkedapi.types.search_companies import (
|
|
@@ -262,6 +267,8 @@ __all__ = [
|
|
|
262
267
|
"CheckConnectionStatusResult",
|
|
263
268
|
"Comment",
|
|
264
269
|
"CommentOnPostParams",
|
|
270
|
+
"CommentOnPostResult",
|
|
271
|
+
"CommentResult",
|
|
265
272
|
"Company",
|
|
266
273
|
"ConnectionPerson",
|
|
267
274
|
"ConnectionSession",
|
|
@@ -372,6 +379,7 @@ __all__ = [
|
|
|
372
379
|
"PostReactionsRetrievalConfig",
|
|
373
380
|
"PostReposter",
|
|
374
381
|
"PostType",
|
|
382
|
+
"ReactToCommentParams",
|
|
375
383
|
"ReactToPostParams",
|
|
376
384
|
"Reaction",
|
|
377
385
|
"ReactionType",
|
|
@@ -381,6 +389,8 @@ __all__ = [
|
|
|
381
389
|
"ReparseAccountInfoParams",
|
|
382
390
|
"ReparseAccountInfoResult",
|
|
383
391
|
"ReplayWebhookDeliveryParams",
|
|
392
|
+
"ReplyToCommentParams",
|
|
393
|
+
"ReplyToCommentResult",
|
|
384
394
|
"ResetLimitsParams",
|
|
385
395
|
"RetrieveConnectionsFilter",
|
|
386
396
|
"RetrieveConnectionsParams",
|
|
@@ -40,7 +40,30 @@ class CommentOnPostParams(BaseActionParams):
|
|
|
40
40
|
company_url: str | None = None
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
class CommentResult(LinkedApiModel):
|
|
44
|
+
comment_urn: str | None = None
|
|
45
|
+
comment_url: str | None = None
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
CommentOnPostResult: TypeAlias = CommentResult
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class ReactToCommentParams(BaseActionParams):
|
|
52
|
+
comment_url: str
|
|
53
|
+
type: ReactionType = "like"
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class ReplyToCommentParams(BaseActionParams):
|
|
57
|
+
comment_url: str
|
|
58
|
+
text: str
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
ReplyToCommentResult: TypeAlias = CommentResult
|
|
62
|
+
|
|
63
|
+
|
|
43
64
|
class PostComment(LinkedApiModel):
|
|
65
|
+
comment_urn: str | None = None
|
|
66
|
+
comment_url: str | None = None
|
|
44
67
|
commenter_url: str | None = None
|
|
45
68
|
commenter_name: str | None = None
|
|
46
69
|
commenter_headline: str | None = None
|
|
@@ -13,6 +13,7 @@ from linkedapi import (
|
|
|
13
13
|
LinkedApi,
|
|
14
14
|
LinkedApiConfig,
|
|
15
15
|
RetrieveFeedParams,
|
|
16
|
+
SimpleWorkflowMapper,
|
|
16
17
|
VoidWorkflowMapper,
|
|
17
18
|
)
|
|
18
19
|
|
|
@@ -53,6 +54,8 @@ def test_linked_api_exposes_all_predefined_operations() -> None:
|
|
|
53
54
|
"nv_manage_conversation",
|
|
54
55
|
"react_to_post",
|
|
55
56
|
"comment_on_post",
|
|
57
|
+
"react_to_comment",
|
|
58
|
+
"reply_to_comment",
|
|
56
59
|
"create_post",
|
|
57
60
|
"retrieve_ssi",
|
|
58
61
|
"retrieve_performance",
|
|
@@ -63,7 +66,7 @@ def test_linked_api_exposes_all_predefined_operations() -> None:
|
|
|
63
66
|
assert hasattr(operation, "execute")
|
|
64
67
|
assert hasattr(operation, "result")
|
|
65
68
|
assert hasattr(operation, "cancel")
|
|
66
|
-
assert len(linkedapi.operations) ==
|
|
69
|
+
assert len(linkedapi.operations) == 38
|
|
67
70
|
|
|
68
71
|
|
|
69
72
|
def test_operation_mappers_match_node_contract() -> None:
|
|
@@ -95,6 +98,12 @@ def test_operation_mappers_match_node_contract() -> None:
|
|
|
95
98
|
assert linkedapi.manage_conversation.mapper.action_type == "st.manageConversation"
|
|
96
99
|
assert isinstance(linkedapi.nv_manage_conversation.mapper, VoidWorkflowMapper)
|
|
97
100
|
assert linkedapi.nv_manage_conversation.mapper.action_type == "nv.manageConversation"
|
|
101
|
+
assert isinstance(linkedapi.react_to_comment.mapper, VoidWorkflowMapper)
|
|
102
|
+
assert linkedapi.react_to_comment.mapper.action_type == "st.reactToComment"
|
|
103
|
+
assert isinstance(linkedapi.comment_on_post.mapper, SimpleWorkflowMapper)
|
|
104
|
+
assert linkedapi.comment_on_post.mapper.action_type == "st.commentOnPost"
|
|
105
|
+
assert isinstance(linkedapi.reply_to_comment.mapper, SimpleWorkflowMapper)
|
|
106
|
+
assert linkedapi.reply_to_comment.mapper.action_type == "st.replyToComment"
|
|
98
107
|
|
|
99
108
|
|
|
100
109
|
def test_retrieve_feed_maps_params_and_feed_context() -> None:
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from linkedapi.core import Operation
|
|
4
|
-
from linkedapi.mappers import VoidWorkflowMapper
|
|
5
|
-
from linkedapi.types import CommentOnPostParams
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class CommentOnPost(Operation[CommentOnPostParams, None]):
|
|
9
|
-
"""Comment on a LinkedIn post."""
|
|
10
|
-
|
|
11
|
-
operation_name = "commentOnPost"
|
|
12
|
-
mapper = VoidWorkflowMapper[CommentOnPostParams]("st.commentOnPost")
|
|
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
|