marqetive-lib 0.1.4__tar.gz → 0.1.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.
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/PKG-INFO +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/pyproject.toml +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/__init__.py +7 -8
- marqetive_lib-0.1.5/src/marqetive/core/__init__.py +54 -0
- {marqetive_lib-0.1.4/src/marqetive/platforms → marqetive_lib-0.1.5/src/marqetive/core}/base.py +2 -2
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/factory.py +3 -3
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/__init__.py +3 -3
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/instagram/client.py +7 -7
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/instagram/exceptions.py +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/instagram/media.py +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/linkedin/client.py +4 -4
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/linkedin/exceptions.py +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/linkedin/media.py +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/tiktok/client.py +9 -5
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/tiktok/exceptions.py +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/tiktok/media.py +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/twitter/client.py +3 -3
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/twitter/exceptions.py +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/twitter/media.py +1 -1
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/oauth.py +2 -2
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/token_validator.py +1 -1
- marqetive_lib-0.1.4/src/marqetive/core/__init__.py +0 -5
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/README.md +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/core/client.py +0 -0
- {marqetive_lib-0.1.4/src/marqetive/platforms → marqetive_lib-0.1.5/src/marqetive/core}/exceptions.py +0 -0
- {marqetive_lib-0.1.4/src/marqetive/platforms → marqetive_lib-0.1.5/src/marqetive/core}/models.py +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/instagram/__init__.py +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/linkedin/__init__.py +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/tiktok/__init__.py +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/twitter/__init__.py +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/py.typed +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/__init__.py +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/file_handlers.py +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/helpers.py +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/media.py +0 -0
- {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/retry.py +0 -0
|
@@ -35,16 +35,12 @@ Usage:
|
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
37
|
# Core API client
|
|
38
|
-
from marqetive.core.client import APIClient
|
|
39
|
-
|
|
40
|
-
# Factory
|
|
41
|
-
from marqetive.factory import PlatformFactory, get_client
|
|
42
|
-
|
|
43
38
|
# Progress callback type
|
|
44
|
-
from marqetive.
|
|
39
|
+
from marqetive.core.base import ProgressCallback
|
|
40
|
+
from marqetive.core.client import APIClient
|
|
45
41
|
|
|
46
42
|
# Exceptions
|
|
47
|
-
from marqetive.
|
|
43
|
+
from marqetive.core.exceptions import (
|
|
48
44
|
InvalidFileTypeError,
|
|
49
45
|
MediaUploadError,
|
|
50
46
|
PlatformAuthError,
|
|
@@ -55,7 +51,7 @@ from marqetive.platforms.exceptions import (
|
|
|
55
51
|
)
|
|
56
52
|
|
|
57
53
|
# Models
|
|
58
|
-
from marqetive.
|
|
54
|
+
from marqetive.core.models import (
|
|
59
55
|
AccountStatus,
|
|
60
56
|
AuthCredentials,
|
|
61
57
|
Comment,
|
|
@@ -68,6 +64,9 @@ from marqetive.platforms.models import (
|
|
|
68
64
|
PostUpdateRequest,
|
|
69
65
|
)
|
|
70
66
|
|
|
67
|
+
# Factory
|
|
68
|
+
from marqetive.factory import PlatformFactory, get_client
|
|
69
|
+
|
|
71
70
|
# Utilities
|
|
72
71
|
from marqetive.utils.helpers import format_response
|
|
73
72
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""Core functionality for MarqetiveLib."""
|
|
2
|
+
|
|
3
|
+
from marqetive.core.base import ProgressCallback, SocialMediaPlatform
|
|
4
|
+
from marqetive.core.client import APIClient
|
|
5
|
+
from marqetive.core.exceptions import (
|
|
6
|
+
InvalidFileTypeError,
|
|
7
|
+
MediaUploadError,
|
|
8
|
+
PlatformAuthError,
|
|
9
|
+
PlatformError,
|
|
10
|
+
PostNotFoundError,
|
|
11
|
+
RateLimitError,
|
|
12
|
+
ValidationError,
|
|
13
|
+
)
|
|
14
|
+
from marqetive.core.models import (
|
|
15
|
+
AccountStatus,
|
|
16
|
+
AuthCredentials,
|
|
17
|
+
Comment,
|
|
18
|
+
CommentStatus,
|
|
19
|
+
MediaAttachment,
|
|
20
|
+
MediaType,
|
|
21
|
+
PlatformResponse,
|
|
22
|
+
Post,
|
|
23
|
+
PostCreateRequest,
|
|
24
|
+
PostStatus,
|
|
25
|
+
PostUpdateRequest,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
# Client
|
|
30
|
+
"APIClient",
|
|
31
|
+
# Base class
|
|
32
|
+
"SocialMediaPlatform",
|
|
33
|
+
"ProgressCallback",
|
|
34
|
+
# Models
|
|
35
|
+
"AccountStatus",
|
|
36
|
+
"AuthCredentials",
|
|
37
|
+
"Comment",
|
|
38
|
+
"CommentStatus",
|
|
39
|
+
"MediaAttachment",
|
|
40
|
+
"MediaType",
|
|
41
|
+
"PlatformResponse",
|
|
42
|
+
"Post",
|
|
43
|
+
"PostCreateRequest",
|
|
44
|
+
"PostStatus",
|
|
45
|
+
"PostUpdateRequest",
|
|
46
|
+
# Exceptions
|
|
47
|
+
"InvalidFileTypeError",
|
|
48
|
+
"MediaUploadError",
|
|
49
|
+
"PlatformAuthError",
|
|
50
|
+
"PlatformError",
|
|
51
|
+
"PostNotFoundError",
|
|
52
|
+
"RateLimitError",
|
|
53
|
+
"ValidationError",
|
|
54
|
+
]
|
{marqetive_lib-0.1.4/src/marqetive/platforms → marqetive_lib-0.1.5/src/marqetive/core}/base.py
RENAMED
|
@@ -12,11 +12,11 @@ from traceback import TracebackException
|
|
|
12
12
|
from typing import Any
|
|
13
13
|
|
|
14
14
|
from marqetive.core.client import APIClient
|
|
15
|
-
from marqetive.
|
|
15
|
+
from marqetive.core.exceptions import (
|
|
16
16
|
PlatformAuthError,
|
|
17
17
|
RateLimitError,
|
|
18
18
|
)
|
|
19
|
-
from marqetive.
|
|
19
|
+
from marqetive.core.models import (
|
|
20
20
|
AuthCredentials,
|
|
21
21
|
Comment,
|
|
22
22
|
MediaAttachment,
|
|
@@ -8,8 +8,8 @@ import logging
|
|
|
8
8
|
import os
|
|
9
9
|
from typing import TYPE_CHECKING
|
|
10
10
|
|
|
11
|
-
from marqetive.
|
|
12
|
-
from marqetive.
|
|
11
|
+
from marqetive.core.exceptions import PlatformAuthError
|
|
12
|
+
from marqetive.core.models import AuthCredentials
|
|
13
13
|
from marqetive.utils.oauth import (
|
|
14
14
|
refresh_instagram_token,
|
|
15
15
|
refresh_linkedin_token,
|
|
@@ -18,7 +18,7 @@ from marqetive.utils.oauth import (
|
|
|
18
18
|
)
|
|
19
19
|
|
|
20
20
|
if TYPE_CHECKING:
|
|
21
|
-
from marqetive.
|
|
21
|
+
from marqetive.core.base import SocialMediaPlatform
|
|
22
22
|
|
|
23
23
|
logger = logging.getLogger(__name__)
|
|
24
24
|
|
|
@@ -9,8 +9,8 @@ Platform clients are available via their respective subpackages:
|
|
|
9
9
|
- from marqetive.platforms.instagram import InstagramClient
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
-
from marqetive.
|
|
13
|
-
from marqetive.
|
|
12
|
+
from marqetive.core.base import SocialMediaPlatform
|
|
13
|
+
from marqetive.core.exceptions import (
|
|
14
14
|
MediaUploadError,
|
|
15
15
|
PlatformAuthError,
|
|
16
16
|
PlatformError,
|
|
@@ -18,7 +18,7 @@ from marqetive.platforms.exceptions import (
|
|
|
18
18
|
RateLimitError,
|
|
19
19
|
ValidationError,
|
|
20
20
|
)
|
|
21
|
-
from marqetive.
|
|
21
|
+
from marqetive.core.models import (
|
|
22
22
|
AuthCredentials,
|
|
23
23
|
Comment,
|
|
24
24
|
CommentStatus,
|
|
@@ -12,19 +12,15 @@ from typing import Any, Literal, cast
|
|
|
12
12
|
import httpx
|
|
13
13
|
from pydantic import HttpUrl
|
|
14
14
|
|
|
15
|
-
from marqetive.
|
|
16
|
-
from marqetive.
|
|
15
|
+
from marqetive.core.base import ProgressCallback, SocialMediaPlatform
|
|
16
|
+
from marqetive.core.exceptions import (
|
|
17
17
|
MediaUploadError,
|
|
18
18
|
PlatformAuthError,
|
|
19
19
|
PlatformError,
|
|
20
20
|
PostNotFoundError,
|
|
21
21
|
ValidationError,
|
|
22
22
|
)
|
|
23
|
-
from marqetive.
|
|
24
|
-
InstagramMediaManager,
|
|
25
|
-
MediaItem,
|
|
26
|
-
)
|
|
27
|
-
from marqetive.platforms.models import (
|
|
23
|
+
from marqetive.core.models import (
|
|
28
24
|
AuthCredentials,
|
|
29
25
|
Comment,
|
|
30
26
|
CommentStatus,
|
|
@@ -35,6 +31,10 @@ from marqetive.platforms.models import (
|
|
|
35
31
|
PostStatus,
|
|
36
32
|
PostUpdateRequest,
|
|
37
33
|
)
|
|
34
|
+
from marqetive.platforms.instagram.media import (
|
|
35
|
+
InstagramMediaManager,
|
|
36
|
+
MediaItem,
|
|
37
|
+
)
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
class InstagramClient(SocialMediaPlatform):
|
|
@@ -12,16 +12,15 @@ from typing import Any, cast
|
|
|
12
12
|
import httpx
|
|
13
13
|
from pydantic import HttpUrl
|
|
14
14
|
|
|
15
|
-
from marqetive.
|
|
16
|
-
from marqetive.
|
|
15
|
+
from marqetive.core.base import ProgressCallback, SocialMediaPlatform
|
|
16
|
+
from marqetive.core.exceptions import (
|
|
17
17
|
MediaUploadError,
|
|
18
18
|
PlatformAuthError,
|
|
19
19
|
PlatformError,
|
|
20
20
|
PostNotFoundError,
|
|
21
21
|
ValidationError,
|
|
22
22
|
)
|
|
23
|
-
from marqetive.
|
|
24
|
-
from marqetive.platforms.models import (
|
|
23
|
+
from marqetive.core.models import (
|
|
25
24
|
AuthCredentials,
|
|
26
25
|
Comment,
|
|
27
26
|
CommentStatus,
|
|
@@ -32,6 +31,7 @@ from marqetive.platforms.models import (
|
|
|
32
31
|
PostStatus,
|
|
33
32
|
PostUpdateRequest,
|
|
34
33
|
)
|
|
34
|
+
from marqetive.platforms.linkedin.media import LinkedInMediaManager, MediaAsset
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class LinkedInClient(SocialMediaPlatform):
|
|
@@ -9,7 +9,7 @@ This module provides comprehensive error handling for LinkedIn API errors includ
|
|
|
9
9
|
|
|
10
10
|
from typing import Any
|
|
11
11
|
|
|
12
|
-
from marqetive.
|
|
12
|
+
from marqetive.core.exceptions import (
|
|
13
13
|
MediaUploadError,
|
|
14
14
|
PlatformAuthError,
|
|
15
15
|
PlatformError,
|
|
@@ -11,14 +11,14 @@ from typing import Any
|
|
|
11
11
|
|
|
12
12
|
from pydantic import HttpUrl
|
|
13
13
|
|
|
14
|
-
from marqetive.
|
|
15
|
-
from marqetive.
|
|
14
|
+
from marqetive.core.base import ProgressCallback, SocialMediaPlatform
|
|
15
|
+
from marqetive.core.exceptions import (
|
|
16
16
|
PlatformAuthError,
|
|
17
17
|
PlatformError,
|
|
18
18
|
PostNotFoundError,
|
|
19
19
|
ValidationError,
|
|
20
20
|
)
|
|
21
|
-
from marqetive.
|
|
21
|
+
from marqetive.core.models import (
|
|
22
22
|
AuthCredentials,
|
|
23
23
|
Comment,
|
|
24
24
|
CommentStatus,
|
|
@@ -292,7 +292,9 @@ class TikTokClient(SocialMediaPlatform):
|
|
|
292
292
|
) from e
|
|
293
293
|
|
|
294
294
|
async def update_post(
|
|
295
|
-
self,
|
|
295
|
+
self,
|
|
296
|
+
post_id: str,
|
|
297
|
+
request: PostUpdateRequest, # noqa: ARG002
|
|
296
298
|
) -> Post:
|
|
297
299
|
"""Update a TikTok video.
|
|
298
300
|
|
|
@@ -337,7 +339,9 @@ class TikTokClient(SocialMediaPlatform):
|
|
|
337
339
|
)
|
|
338
340
|
|
|
339
341
|
async def create_comment(
|
|
340
|
-
self,
|
|
342
|
+
self,
|
|
343
|
+
post_id: str,
|
|
344
|
+
content: str, # noqa: ARG002
|
|
341
345
|
) -> Comment:
|
|
342
346
|
"""Create a comment on a TikTok video.
|
|
343
347
|
|
|
@@ -13,8 +13,8 @@ import httpx
|
|
|
13
13
|
import tweepy
|
|
14
14
|
from pydantic import HttpUrl
|
|
15
15
|
|
|
16
|
-
from marqetive.
|
|
17
|
-
from marqetive.
|
|
16
|
+
from marqetive.core.base import ProgressCallback, SocialMediaPlatform
|
|
17
|
+
from marqetive.core.exceptions import (
|
|
18
18
|
MediaUploadError,
|
|
19
19
|
PlatformAuthError,
|
|
20
20
|
PlatformError,
|
|
@@ -22,7 +22,7 @@ from marqetive.platforms.exceptions import (
|
|
|
22
22
|
RateLimitError,
|
|
23
23
|
ValidationError,
|
|
24
24
|
)
|
|
25
|
-
from marqetive.
|
|
25
|
+
from marqetive.core.models import (
|
|
26
26
|
AuthCredentials,
|
|
27
27
|
Comment,
|
|
28
28
|
CommentStatus,
|
|
@@ -9,7 +9,7 @@ This module provides comprehensive error handling for Twitter API errors includi
|
|
|
9
9
|
|
|
10
10
|
from typing import Any
|
|
11
11
|
|
|
12
|
-
from marqetive.
|
|
12
|
+
from marqetive.core.exceptions import (
|
|
13
13
|
MediaUploadError,
|
|
14
14
|
PlatformAuthError,
|
|
15
15
|
PlatformError,
|
|
@@ -10,8 +10,8 @@ from typing import Any
|
|
|
10
10
|
|
|
11
11
|
import httpx
|
|
12
12
|
|
|
13
|
-
from marqetive.
|
|
14
|
-
from marqetive.
|
|
13
|
+
from marqetive.core.exceptions import PlatformAuthError
|
|
14
|
+
from marqetive.core.models import AuthCredentials
|
|
15
15
|
|
|
16
16
|
logger = logging.getLogger(__name__)
|
|
17
17
|
|
|
File without changes
|
|
File without changes
|
{marqetive_lib-0.1.4/src/marqetive/platforms → marqetive_lib-0.1.5/src/marqetive/core}/exceptions.py
RENAMED
|
File without changes
|
{marqetive_lib-0.1.4/src/marqetive/platforms → marqetive_lib-0.1.5/src/marqetive/core}/models.py
RENAMED
|
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
|