marqetive-lib 0.2.5__py3-none-any.whl → 0.2.6__py3-none-any.whl
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.
- marqetive/core/models.py +2 -0
- marqetive/platforms/linkedin/client.py +17 -15
- marqetive/platforms/tiktok/client.py +3 -1
- marqetive/platforms/twitter/client.py +9 -0
- marqetive/utils/retry.py +1 -1
- {marqetive_lib-0.2.5.dist-info → marqetive_lib-0.2.6.dist-info}/METADATA +1 -1
- {marqetive_lib-0.2.5.dist-info → marqetive_lib-0.2.6.dist-info}/RECORD +8 -8
- {marqetive_lib-0.2.5.dist-info → marqetive_lib-0.2.6.dist-info}/WHEEL +0 -0
marqetive/core/models.py
CHANGED
|
@@ -423,6 +423,8 @@ class PostCreateRequest(BaseModel):
|
|
|
423
423
|
link: str | None = None
|
|
424
424
|
tags: list[str] = Field(default_factory=list)
|
|
425
425
|
location: str | None = None
|
|
426
|
+
is_quoted: bool | None = None
|
|
427
|
+
quoted_card_id: str | None = None # for future we can quote other than first tweet
|
|
426
428
|
additional_data: dict[str, Any] = Field(default_factory=dict)
|
|
427
429
|
|
|
428
430
|
|
|
@@ -48,21 +48,23 @@ from marqetive.platforms.linkedin.models import (
|
|
|
48
48
|
|
|
49
49
|
# Valid CTA (Call-To-Action) labels per LinkedIn API documentation
|
|
50
50
|
# Note: BUY_NOW and SHOP_NOW require API version 202504 or later
|
|
51
|
-
VALID_CTA_LABELS = frozenset(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
VALID_CTA_LABELS = frozenset(
|
|
52
|
+
{
|
|
53
|
+
"APPLY",
|
|
54
|
+
"DOWNLOAD",
|
|
55
|
+
"VIEW_QUOTE",
|
|
56
|
+
"LEARN_MORE",
|
|
57
|
+
"SIGN_UP",
|
|
58
|
+
"SUBSCRIBE",
|
|
59
|
+
"REGISTER",
|
|
60
|
+
"JOIN",
|
|
61
|
+
"ATTEND",
|
|
62
|
+
"REQUEST_DEMO",
|
|
63
|
+
"SEE_MORE",
|
|
64
|
+
"BUY_NOW", # Requires API version 202504+
|
|
65
|
+
"SHOP_NOW", # Requires API version 202504+
|
|
66
|
+
}
|
|
67
|
+
)
|
|
66
68
|
|
|
67
69
|
|
|
68
70
|
class LinkedInClient(SocialMediaPlatform):
|
|
@@ -257,7 +257,9 @@ class TikTokClient(SocialMediaPlatform):
|
|
|
257
257
|
# 4. Return minimal Post object without fetching details
|
|
258
258
|
video_id = upload_result.video_id or upload_result.publish_id
|
|
259
259
|
url = (
|
|
260
|
-
HttpUrl(
|
|
260
|
+
HttpUrl(
|
|
261
|
+
f"https://www.tiktok.com/@{self.credentials.username}/video/{video_id}"
|
|
262
|
+
)
|
|
261
263
|
if self.credentials.username and video_id
|
|
262
264
|
else None
|
|
263
265
|
)
|
|
@@ -787,6 +787,11 @@ class TwitterClient(SocialMediaPlatform):
|
|
|
787
787
|
post_request = post_request.model_copy(
|
|
788
788
|
update={"reply_to_post_id": reply_to_id}
|
|
789
789
|
)
|
|
790
|
+
if post_request.is_quoted and created_posts:
|
|
791
|
+
post_request = post_request.model_copy(
|
|
792
|
+
update={"quote_post_id": created_posts[0].post_id}
|
|
793
|
+
)
|
|
794
|
+
|
|
790
795
|
# TwitterPostRequest works with create_post via duck typing
|
|
791
796
|
final_request = post_request
|
|
792
797
|
else:
|
|
@@ -798,6 +803,10 @@ class TwitterClient(SocialMediaPlatform):
|
|
|
798
803
|
}
|
|
799
804
|
if reply_to_id is not None:
|
|
800
805
|
request_data["reply_to_post_id"] = reply_to_id
|
|
806
|
+
|
|
807
|
+
if post_request.is_quoted and created_posts:
|
|
808
|
+
request_data["quote_post_id"] = created_posts[0].post_id
|
|
809
|
+
|
|
801
810
|
final_request = TwitterPostRequest(**request_data)
|
|
802
811
|
|
|
803
812
|
# TwitterPostRequest has compatible interface with PostCreateRequest
|
marqetive/utils/retry.py
CHANGED
|
@@ -93,7 +93,7 @@ def is_retryable_error(error: Exception) -> bool:
|
|
|
93
93
|
|
|
94
94
|
# Network/connection errors are retryable
|
|
95
95
|
if isinstance(
|
|
96
|
-
error,
|
|
96
|
+
error, httpx.ConnectError | httpx.TimeoutException | httpx.NetworkError
|
|
97
97
|
):
|
|
98
98
|
return True
|
|
99
99
|
|
|
@@ -3,7 +3,7 @@ marqetive/core/__init__.py,sha256=0_0vzxJ619YIJkz1yzSvhnGDJRkrErs_QSg2q3Bloss,11
|
|
|
3
3
|
marqetive/core/base.py,sha256=I2pRHJWIizSgUtGum1pW1TrJwCRgLE5vljLmJI7Z2Og,20323
|
|
4
4
|
marqetive/core/client.py,sha256=eCtvL100dkxYQHC_TJzHbs3dGjgsa_me9VTHo-CUN2M,3900
|
|
5
5
|
marqetive/core/exceptions.py,sha256=h4boyxGY2tUQXMfnDcpVzAKVW71VpqvOZtGkQ-oVkYM,9710
|
|
6
|
-
marqetive/core/models.py,sha256=
|
|
6
|
+
marqetive/core/models.py,sha256=AGbRuQFhO3VMEF5ZP7mww0-ojKWlCLeuGQKIiWNsyzQ,19409
|
|
7
7
|
marqetive/factory.py,sha256=SfHsp6mdIZpDBtryUvHSwljBRkCyAHhtwV7qDfgL9k4,15268
|
|
8
8
|
marqetive/platforms/__init__.py,sha256=RBxlQSGyELsulSnwf5uaE1ohxFc7jC61OO9CrKaZp48,1312
|
|
9
9
|
marqetive/platforms/instagram/__init__.py,sha256=c1Gs0ozG6D7Z-Uz_UQ7S3joL0qUTT9eUZPWcePyESk8,229
|
|
@@ -12,17 +12,17 @@ marqetive/platforms/instagram/exceptions.py,sha256=TcD_pX4eSx_k4yW8DgfA6SGPiAz3V
|
|
|
12
12
|
marqetive/platforms/instagram/media.py,sha256=0ZbUbpwJ025_hccL9X8qced_-LJGoL_-NdS84Op97VE,23228
|
|
13
13
|
marqetive/platforms/instagram/models.py,sha256=20v3m1037y3b_WlsKF8zAOgV23nFu63tfmmUN1CefOI,2769
|
|
14
14
|
marqetive/platforms/linkedin/__init__.py,sha256=_FrdZpqcXjcUW6C-25zGV7poGih9yzs6y1AFnuizTUQ,1384
|
|
15
|
-
marqetive/platforms/linkedin/client.py,sha256
|
|
15
|
+
marqetive/platforms/linkedin/client.py,sha256=KOcg31aFVglAF0P48MagSLfZHAQxzsdhDFWOJedI-iY,74888
|
|
16
16
|
marqetive/platforms/linkedin/exceptions.py,sha256=i5fARUkZik46bS3htZBwUInVzetsZx1APpKEXLrCKf0,9762
|
|
17
17
|
marqetive/platforms/linkedin/media.py,sha256=-kpkL5brYhx8cZlFS5ueDgY4eSZWqHoB6xp8jZU2cyI,25931
|
|
18
18
|
marqetive/platforms/linkedin/models.py,sha256=n7DqwVxYSbGYBmeEJ1woCZ6XhUIHcLx8Gpm8uCBACzI,12620
|
|
19
19
|
marqetive/platforms/tiktok/__init__.py,sha256=BqjkXTZDyBlcY3lvREy13yP9h3RcDga8E6Rl6f5KPp8,238
|
|
20
|
-
marqetive/platforms/tiktok/client.py,sha256=
|
|
20
|
+
marqetive/platforms/tiktok/client.py,sha256=vp2kJnlsywL339N_p-aXtKdmNrragKlKfbyzij6UB7Y,18998
|
|
21
21
|
marqetive/platforms/tiktok/exceptions.py,sha256=vxwyAKujMGZJh0LetG1QsLF95QfUs_kR6ujsWSHGqL0,10124
|
|
22
22
|
marqetive/platforms/tiktok/media.py,sha256=NmvzvzfaZMmzIx88wkXI5tWLd4vYN1VJXN-IkaEAO2c,28638
|
|
23
23
|
marqetive/platforms/tiktok/models.py,sha256=WWdjuFqhTIR8SnHkz-8UaNc5Mm2PrGomwQ3W7pJcQFg,2962
|
|
24
24
|
marqetive/platforms/twitter/__init__.py,sha256=etiNzWd0EznrDbFTlc71dc_Cm-aqAM7RIwpj8qrYEiE,447
|
|
25
|
-
marqetive/platforms/twitter/client.py,sha256=
|
|
25
|
+
marqetive/platforms/twitter/client.py,sha256=hs18YKBqdu0pBO0hgpHt_E0ZXUFQpNJ6_e-_nfSJh5Q,44910
|
|
26
26
|
marqetive/platforms/twitter/exceptions.py,sha256=AvXzucqF2P6F3-lynayt461oj9e1luCh2-El5pXqZL4,9832
|
|
27
27
|
marqetive/platforms/twitter/media.py,sha256=cWELUTDFlyS7WIjEzkCaXOMOiSZZ3eAwpmiX90-CDjM,28954
|
|
28
28
|
marqetive/platforms/twitter/models.py,sha256=afFK1jJyrIC6BvY6ShkHlg-KnvawdeLGS-hB-GoloWA,4579
|
|
@@ -32,7 +32,7 @@ marqetive/utils/file_handlers.py,sha256=mDBGLQpCBYD-AN3W_qysZn0JmXxQE017_lnURdkk
|
|
|
32
32
|
marqetive/utils/helpers.py,sha256=Sh5HZD6AOJig_6T84n6JsKLosIkKIkpkiYTl69rnOOw,1321
|
|
33
33
|
marqetive/utils/media.py,sha256=reVousdueG-h5jeI6uLGqVCfjYxlsMiWhx6XZwg-iHY,14664
|
|
34
34
|
marqetive/utils/oauth.py,sha256=3TtbUCVuGxtOBxIUvVJH_DUMIHrP76XDpabPYaLXhTU,15392
|
|
35
|
-
marqetive/utils/retry.py,sha256=
|
|
36
|
-
marqetive_lib-0.2.
|
|
37
|
-
marqetive_lib-0.2.
|
|
38
|
-
marqetive_lib-0.2.
|
|
35
|
+
marqetive/utils/retry.py,sha256=f75gWSSz4B6tt-GfoKyWa8HNZhrw3XDGFddwCPFSfoA,7627
|
|
36
|
+
marqetive_lib-0.2.6.dist-info/METADATA,sha256=ZxvYoKe8odjVjN86bn0vOsEtsa9SWnDRVJSppBrbfk0,7875
|
|
37
|
+
marqetive_lib-0.2.6.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
38
|
+
marqetive_lib-0.2.6.dist-info/RECORD,,
|
|
File without changes
|