marqetive-lib 0.1.0__tar.gz → 0.1.2__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.0 → marqetive_lib-0.1.2}/PKG-INFO +1 -2
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/pyproject.toml +1 -2
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/__init__.py +9 -9
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/core/__init__.py +1 -1
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/core/account_factory.py +2 -2
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/core/base_manager.py +4 -4
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/core/client.py +1 -1
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/core/registry.py +1 -1
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/__init__.py +3 -3
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/base.py +3 -3
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/exceptions.py +2 -1
- marqetive_lib-0.1.2/src/marqetive/platforms/instagram/__init__.py +7 -0
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/instagram/client.py +4 -4
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/instagram/exceptions.py +1 -1
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/instagram/factory.py +5 -5
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/instagram/manager.py +4 -4
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/instagram/media.py +2 -2
- marqetive_lib-0.1.2/src/marqetive/platforms/linkedin/__init__.py +7 -0
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/linkedin/client.py +4 -4
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/linkedin/exceptions.py +1 -1
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/linkedin/factory.py +5 -5
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/linkedin/manager.py +4 -4
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/linkedin/media.py +4 -4
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/models.py +2 -0
- marqetive_lib-0.1.2/src/marqetive/platforms/tiktok/__init__.py +7 -0
- marqetive_lib-0.1.2/src/marqetive/platforms/tiktok/client.py +277 -0
- marqetive_lib-0.1.2/src/marqetive/platforms/tiktok/exceptions.py +180 -0
- marqetive_lib-0.1.2/src/marqetive/platforms/tiktok/factory.py +188 -0
- marqetive_lib-0.1.2/src/marqetive/platforms/tiktok/manager.py +115 -0
- marqetive_lib-0.1.2/src/marqetive/platforms/tiktok/media.py +305 -0
- marqetive_lib-0.1.2/src/marqetive/platforms/twitter/__init__.py +7 -0
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/twitter/client.py +6 -6
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/twitter/exceptions.py +1 -1
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/twitter/factory.py +5 -5
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/twitter/manager.py +4 -4
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/twitter/media.py +4 -4
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/platforms/twitter/threads.py +2 -2
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/registry_init.py +4 -4
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/utils/__init__.py +3 -3
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/utils/file_handlers.py +1 -1
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/utils/oauth.py +137 -2
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/utils/token_validator.py +1 -1
- marqetive_lib-0.1.0/src/marqetive/platforms/instagram/__init__.py +0 -7
- marqetive_lib-0.1.0/src/marqetive/platforms/linkedin/__init__.py +0 -7
- marqetive_lib-0.1.0/src/marqetive/platforms/tiktok/__init__.py +0 -0
- marqetive_lib-0.1.0/src/marqetive/platforms/twitter/__init__.py +0 -7
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/README.md +0 -0
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/core/progress.py +0 -0
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/py.typed +0 -0
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/utils/helpers.py +0 -0
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/utils/media.py +0 -0
- {marqetive_lib-0.1.0 → marqetive_lib-0.1.2}/src/marqetive/utils/retry.py +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: marqetive-lib
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Modern Python utilities for web APIs
|
|
5
5
|
Keywords: api,utilities,web,http,marqetive
|
|
6
6
|
Requires-Python: >=3.12
|
|
7
7
|
Classifier: Development Status :: 3 - Alpha
|
|
8
8
|
Classifier: Intended Audience :: Developers
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
9
|
Classifier: Programming Language :: Python :: 3
|
|
11
10
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.13
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "marqetive-lib"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
8
8
|
description = "Modern Python utilities for web APIs"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12"
|
|
@@ -12,7 +12,6 @@ keywords = ["api", "utilities", "web", "http", "marqetive"]
|
|
|
12
12
|
classifiers = [
|
|
13
13
|
"Development Status :: 3 - Alpha",
|
|
14
14
|
"Intended Audience :: Developers",
|
|
15
|
-
"License :: OSI Approved :: MIT License",
|
|
16
15
|
"Programming Language :: Python :: 3",
|
|
17
16
|
"Programming Language :: Python :: 3.12",
|
|
18
17
|
"Programming Language :: Python :: 3.13",
|
|
@@ -28,20 +28,20 @@ Usage:
|
|
|
28
28
|
|
|
29
29
|
# Core API client
|
|
30
30
|
# Account management
|
|
31
|
-
from marqetive.core.account_factory import BaseAccountFactory
|
|
31
|
+
from src.marqetive.core.account_factory import BaseAccountFactory
|
|
32
32
|
|
|
33
33
|
# Registry and managers
|
|
34
|
-
from marqetive.core.base_manager import BasePostManager
|
|
35
|
-
from marqetive.core.client import APIClient
|
|
34
|
+
from src.marqetive.core.base_manager import BasePostManager
|
|
35
|
+
from src.marqetive.core.client import APIClient
|
|
36
36
|
|
|
37
37
|
# Progress tracking
|
|
38
|
-
from marqetive.core.progress import (
|
|
38
|
+
from src.marqetive.core.progress import (
|
|
39
39
|
ProgressCallback,
|
|
40
40
|
ProgressEvent,
|
|
41
41
|
ProgressStatus,
|
|
42
42
|
ProgressTracker,
|
|
43
43
|
)
|
|
44
|
-
from marqetive.core.registry import (
|
|
44
|
+
from src.marqetive.core.registry import (
|
|
45
45
|
PlatformRegistry,
|
|
46
46
|
get_available_platforms,
|
|
47
47
|
get_manager_for_platform,
|
|
@@ -50,7 +50,7 @@ from marqetive.core.registry import (
|
|
|
50
50
|
)
|
|
51
51
|
|
|
52
52
|
# Models
|
|
53
|
-
from marqetive.platforms.models import (
|
|
53
|
+
from src.marqetive.platforms.models import (
|
|
54
54
|
AccountStatus,
|
|
55
55
|
AuthCredentials,
|
|
56
56
|
Comment,
|
|
@@ -62,16 +62,16 @@ from marqetive.platforms.models import (
|
|
|
62
62
|
PostStatus,
|
|
63
63
|
PostUpdateRequest,
|
|
64
64
|
)
|
|
65
|
-
from marqetive.registry_init import (
|
|
65
|
+
from src.marqetive.registry_init import (
|
|
66
66
|
initialize_platform_registry,
|
|
67
67
|
is_registry_initialized,
|
|
68
68
|
)
|
|
69
69
|
|
|
70
70
|
# Utilities
|
|
71
|
-
from marqetive.utils.helpers import format_response
|
|
71
|
+
from src.marqetive.utils.helpers import format_response
|
|
72
72
|
|
|
73
73
|
# Retry utilities
|
|
74
|
-
from marqetive.utils.retry import STANDARD_BACKOFF, BackoffConfig, retry_async
|
|
74
|
+
from src.marqetive.utils.retry import STANDARD_BACKOFF, BackoffConfig, retry_async
|
|
75
75
|
|
|
76
76
|
__version__ = "0.1.0"
|
|
77
77
|
|
|
@@ -9,8 +9,8 @@ from abc import ABC, abstractmethod
|
|
|
9
9
|
from collections.abc import Callable
|
|
10
10
|
from typing import Any
|
|
11
11
|
|
|
12
|
-
from marqetive.platforms.exceptions import PlatformAuthError
|
|
13
|
-
from marqetive.platforms.models import AccountStatus, AuthCredentials
|
|
12
|
+
from src.marqetive.platforms.exceptions import PlatformAuthError
|
|
13
|
+
from src.marqetive.platforms.models import AccountStatus, AuthCredentials
|
|
14
14
|
|
|
15
15
|
logger = logging.getLogger(__name__)
|
|
16
16
|
|
|
@@ -10,10 +10,10 @@ import logging
|
|
|
10
10
|
from abc import ABC, abstractmethod
|
|
11
11
|
from typing import Any
|
|
12
12
|
|
|
13
|
-
from marqetive.core.account_factory import BaseAccountFactory
|
|
14
|
-
from marqetive.core.progress import ProgressCallback, ProgressTracker
|
|
15
|
-
from marqetive.platforms.exceptions import PlatformError
|
|
16
|
-
from marqetive.platforms.models import AuthCredentials, Post, PostCreateRequest
|
|
13
|
+
from src.marqetive.core.account_factory import BaseAccountFactory
|
|
14
|
+
from src.marqetive.core.progress import ProgressCallback, ProgressTracker
|
|
15
|
+
from src.marqetive.platforms.exceptions import PlatformError
|
|
16
|
+
from src.marqetive.platforms.models import AuthCredentials, Post, PostCreateRequest
|
|
17
17
|
|
|
18
18
|
logger = logging.getLogger(__name__)
|
|
19
19
|
|
|
@@ -73,7 +73,7 @@ class APIClient:
|
|
|
73
73
|
if not self._client:
|
|
74
74
|
raise RuntimeError("Client not initialized. Use async context manager.")
|
|
75
75
|
|
|
76
|
-
response
|
|
76
|
+
response = await self._client.get(path, params=params)
|
|
77
77
|
response.raise_for_status()
|
|
78
78
|
|
|
79
79
|
return APIResponse(
|
|
@@ -7,7 +7,7 @@ platform managers across the application.
|
|
|
7
7
|
import threading
|
|
8
8
|
from typing import Any, TypeVar
|
|
9
9
|
|
|
10
|
-
from marqetive.platforms.models import AuthCredentials
|
|
10
|
+
from src.marqetive.platforms.models import AuthCredentials
|
|
11
11
|
|
|
12
12
|
# Type variable for manager classes
|
|
13
13
|
ManagerType = TypeVar("ManagerType")
|
|
@@ -9,8 +9,8 @@ Platform clients are available via their respective subpackages:
|
|
|
9
9
|
- from marqetive_lib.platforms.instagram import InstagramClient
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
-
from marqetive.platforms.base import SocialMediaPlatform
|
|
13
|
-
from marqetive.platforms.exceptions import (
|
|
12
|
+
from src.marqetive.platforms.base import SocialMediaPlatform
|
|
13
|
+
from src.marqetive.platforms.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.platforms.models import (
|
|
21
|
+
from src.marqetive.platforms.models import (
|
|
22
22
|
AuthCredentials,
|
|
23
23
|
Comment,
|
|
24
24
|
CommentStatus,
|
|
@@ -10,12 +10,12 @@ from datetime import datetime
|
|
|
10
10
|
from traceback import TracebackException
|
|
11
11
|
from typing import Any
|
|
12
12
|
|
|
13
|
-
from marqetive.core.client import APIClient
|
|
14
|
-
from marqetive.platforms.exceptions import (
|
|
13
|
+
from src.marqetive.core.client import APIClient
|
|
14
|
+
from src.marqetive.platforms.exceptions import (
|
|
15
15
|
PlatformAuthError,
|
|
16
16
|
RateLimitError,
|
|
17
17
|
)
|
|
18
|
-
from marqetive.platforms.models import (
|
|
18
|
+
from src.marqetive.platforms.models import (
|
|
19
19
|
AuthCredentials,
|
|
20
20
|
Comment,
|
|
21
21
|
MediaAttachment,
|
|
@@ -115,9 +115,10 @@ class PostNotFoundError(PlatformError):
|
|
|
115
115
|
post_id: str,
|
|
116
116
|
platform: str | None = None,
|
|
117
117
|
status_code: int | None = None,
|
|
118
|
+
message: str | None = None,
|
|
118
119
|
) -> None:
|
|
119
120
|
self.post_id = post_id
|
|
120
|
-
message = f"Post not found: {post_id}"
|
|
121
|
+
message = message or f"Post not found: {post_id}"
|
|
121
122
|
super().__init__(message, platform, status_code)
|
|
122
123
|
|
|
123
124
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"""Instagram platform integration."""
|
|
2
|
+
|
|
3
|
+
from src.marqetive.platforms.instagram.client import InstagramClient
|
|
4
|
+
from src.marqetive.platforms.instagram.factory import InstagramAccountFactory
|
|
5
|
+
from src.marqetive.platforms.instagram.manager import InstagramPostManager
|
|
6
|
+
|
|
7
|
+
__all__ = ["InstagramClient", "InstagramAccountFactory", "InstagramPostManager"]
|
|
@@ -12,19 +12,19 @@ from typing import Any, Literal, cast
|
|
|
12
12
|
import httpx
|
|
13
13
|
from pydantic import HttpUrl
|
|
14
14
|
|
|
15
|
-
from marqetive.platforms.base import SocialMediaPlatform
|
|
16
|
-
from marqetive.platforms.exceptions import (
|
|
15
|
+
from src.marqetive.platforms.base import SocialMediaPlatform
|
|
16
|
+
from src.marqetive.platforms.exceptions import (
|
|
17
17
|
MediaUploadError,
|
|
18
18
|
PlatformAuthError,
|
|
19
19
|
PlatformError,
|
|
20
20
|
PostNotFoundError,
|
|
21
21
|
ValidationError,
|
|
22
22
|
)
|
|
23
|
-
from marqetive.platforms.instagram.media import (
|
|
23
|
+
from src.marqetive.platforms.instagram.media import (
|
|
24
24
|
InstagramMediaManager,
|
|
25
25
|
MediaItem,
|
|
26
26
|
)
|
|
27
|
-
from marqetive.platforms.models import (
|
|
27
|
+
from src.marqetive.platforms.models import (
|
|
28
28
|
AuthCredentials,
|
|
29
29
|
Comment,
|
|
30
30
|
CommentStatus,
|
|
@@ -5,7 +5,7 @@ This module provides comprehensive error handling for Instagram Graph API errors
|
|
|
5
5
|
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
|
-
from marqetive.platforms.exceptions import (
|
|
8
|
+
from src.marqetive.platforms.exceptions import (
|
|
9
9
|
MediaUploadError,
|
|
10
10
|
PlatformAuthError,
|
|
11
11
|
PlatformError,
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from collections.abc import Callable
|
|
5
5
|
|
|
6
|
-
from marqetive.core.account_factory import BaseAccountFactory
|
|
7
|
-
from marqetive.platforms.exceptions import PlatformAuthError
|
|
8
|
-
from marqetive.platforms.instagram.client import InstagramClient
|
|
9
|
-
from marqetive.platforms.models import AccountStatus, AuthCredentials
|
|
10
|
-
from marqetive.utils.oauth import refresh_instagram_token
|
|
6
|
+
from src.marqetive.core.account_factory import BaseAccountFactory
|
|
7
|
+
from src.marqetive.platforms.exceptions import PlatformAuthError
|
|
8
|
+
from src.marqetive.platforms.instagram.client import InstagramClient
|
|
9
|
+
from src.marqetive.platforms.models import AccountStatus, AuthCredentials
|
|
10
|
+
from src.marqetive.utils.oauth import refresh_instagram_token
|
|
11
11
|
|
|
12
12
|
logger = logging.getLogger(__name__)
|
|
13
13
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from marqetive.core.base_manager import BasePostManager
|
|
7
|
-
from marqetive.platforms.instagram.client import InstagramClient
|
|
8
|
-
from marqetive.platforms.instagram.factory import InstagramAccountFactory
|
|
9
|
-
from marqetive.platforms.models import AuthCredentials, Post, PostCreateRequest
|
|
6
|
+
from src.marqetive.core.base_manager import BasePostManager
|
|
7
|
+
from src.marqetive.platforms.instagram.client import InstagramClient
|
|
8
|
+
from src.marqetive.platforms.instagram.factory import InstagramAccountFactory
|
|
9
|
+
from src.marqetive.platforms.models import AuthCredentials, Post, PostCreateRequest
|
|
10
10
|
|
|
11
11
|
logger = logging.getLogger(__name__)
|
|
12
12
|
|
|
@@ -19,11 +19,11 @@ from typing import Any, Literal
|
|
|
19
19
|
|
|
20
20
|
import httpx
|
|
21
21
|
|
|
22
|
-
from marqetive.platforms.exceptions import (
|
|
22
|
+
from src.marqetive.platforms.exceptions import (
|
|
23
23
|
MediaUploadError,
|
|
24
24
|
ValidationError,
|
|
25
25
|
)
|
|
26
|
-
from marqetive.utils.retry import STANDARD_BACKOFF, retry_async
|
|
26
|
+
from src.marqetive.utils.retry import STANDARD_BACKOFF, retry_async
|
|
27
27
|
|
|
28
28
|
logger = logging.getLogger(__name__)
|
|
29
29
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"""LinkedIn platform integration."""
|
|
2
|
+
|
|
3
|
+
from src.marqetive.platforms.linkedin.client import LinkedInClient
|
|
4
|
+
from src.marqetive.platforms.linkedin.factory import LinkedInAccountFactory
|
|
5
|
+
from src.marqetive.platforms.linkedin.manager import LinkedInPostManager
|
|
6
|
+
|
|
7
|
+
__all__ = ["LinkedInClient", "LinkedInAccountFactory", "LinkedInPostManager"]
|
|
@@ -12,16 +12,16 @@ from typing import Any, cast
|
|
|
12
12
|
import httpx
|
|
13
13
|
from pydantic import HttpUrl
|
|
14
14
|
|
|
15
|
-
from marqetive.platforms.base import SocialMediaPlatform
|
|
16
|
-
from marqetive.platforms.exceptions import (
|
|
15
|
+
from src.marqetive.platforms.base import SocialMediaPlatform
|
|
16
|
+
from src.marqetive.platforms.exceptions import (
|
|
17
17
|
MediaUploadError,
|
|
18
18
|
PlatformAuthError,
|
|
19
19
|
PlatformError,
|
|
20
20
|
PostNotFoundError,
|
|
21
21
|
ValidationError,
|
|
22
22
|
)
|
|
23
|
-
from marqetive.platforms.linkedin.media import LinkedInMediaManager, MediaAsset
|
|
24
|
-
from marqetive.platforms.models import (
|
|
23
|
+
from src.marqetive.platforms.linkedin.media import LinkedInMediaManager, MediaAsset
|
|
24
|
+
from src.marqetive.platforms.models import (
|
|
25
25
|
AuthCredentials,
|
|
26
26
|
Comment,
|
|
27
27
|
CommentStatus,
|
|
@@ -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.platforms.exceptions import (
|
|
12
|
+
from src.marqetive.platforms.exceptions import (
|
|
13
13
|
MediaUploadError,
|
|
14
14
|
PlatformAuthError,
|
|
15
15
|
PlatformError,
|
|
@@ -4,11 +4,11 @@ import logging
|
|
|
4
4
|
import os
|
|
5
5
|
from collections.abc import Callable
|
|
6
6
|
|
|
7
|
-
from marqetive.core.account_factory import BaseAccountFactory
|
|
8
|
-
from marqetive.platforms.exceptions import PlatformAuthError
|
|
9
|
-
from marqetive.platforms.linkedin.client import LinkedInClient
|
|
10
|
-
from marqetive.platforms.models import AccountStatus, AuthCredentials
|
|
11
|
-
from marqetive.utils.oauth import refresh_linkedin_token
|
|
7
|
+
from src.marqetive.core.account_factory import BaseAccountFactory
|
|
8
|
+
from src.marqetive.platforms.exceptions import PlatformAuthError
|
|
9
|
+
from src.marqetive.platforms.linkedin.client import LinkedInClient
|
|
10
|
+
from src.marqetive.platforms.models import AccountStatus, AuthCredentials
|
|
11
|
+
from src.marqetive.utils.oauth import refresh_linkedin_token
|
|
12
12
|
|
|
13
13
|
logger = logging.getLogger(__name__)
|
|
14
14
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from marqetive.core.base_manager import BasePostManager
|
|
7
|
-
from marqetive.platforms.linkedin.client import LinkedInClient
|
|
8
|
-
from marqetive.platforms.linkedin.factory import LinkedInAccountFactory
|
|
9
|
-
from marqetive.platforms.models import AuthCredentials, Post, PostCreateRequest
|
|
6
|
+
from src.marqetive.core.base_manager import BasePostManager
|
|
7
|
+
from src.marqetive.platforms.linkedin.client import LinkedInClient
|
|
8
|
+
from src.marqetive.platforms.linkedin.factory import LinkedInAccountFactory
|
|
9
|
+
from src.marqetive.platforms.models import AuthCredentials, Post, PostCreateRequest
|
|
10
10
|
|
|
11
11
|
logger = logging.getLogger(__name__)
|
|
12
12
|
|
|
@@ -20,13 +20,13 @@ from typing import Any, Literal
|
|
|
20
20
|
|
|
21
21
|
import httpx
|
|
22
22
|
|
|
23
|
-
from marqetive.platforms.exceptions import (
|
|
23
|
+
from src.marqetive.platforms.exceptions import (
|
|
24
24
|
MediaUploadError,
|
|
25
25
|
ValidationError,
|
|
26
26
|
)
|
|
27
|
-
from marqetive.utils.file_handlers import download_file, read_file_bytes
|
|
28
|
-
from marqetive.utils.media import detect_mime_type, format_file_size
|
|
29
|
-
from marqetive.utils.retry import STANDARD_BACKOFF, retry_async
|
|
27
|
+
from src.marqetive.utils.file_handlers import download_file, read_file_bytes
|
|
28
|
+
from src.marqetive.utils.media import detect_mime_type, format_file_size
|
|
29
|
+
from src.marqetive.utils.retry import STANDARD_BACKOFF, retry_async
|
|
30
30
|
|
|
31
31
|
logger = logging.getLogger(__name__)
|
|
32
32
|
|
|
@@ -305,6 +305,7 @@ class PostCreateRequest(BaseModel):
|
|
|
305
305
|
link: URL to include in the post
|
|
306
306
|
tags: List of hashtags or user tags
|
|
307
307
|
location: Location/place tag for the post
|
|
308
|
+
additional_data: Platform-specific data
|
|
308
309
|
|
|
309
310
|
Example:
|
|
310
311
|
>>> request = PostCreateRequest(
|
|
@@ -321,6 +322,7 @@ class PostCreateRequest(BaseModel):
|
|
|
321
322
|
link: str | None = None
|
|
322
323
|
tags: list[str] = Field(default_factory=list)
|
|
323
324
|
location: str | None = None
|
|
325
|
+
additional_data: dict[str, Any] = Field(default_factory=dict)
|
|
324
326
|
|
|
325
327
|
|
|
326
328
|
class PostUpdateRequest(BaseModel):
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"""TikTok platform integration."""
|
|
2
|
+
|
|
3
|
+
from src.marqetive.platforms.tiktok.client import TikTokClient
|
|
4
|
+
from src.marqetive.platforms.tiktok.factory import TikTokAccountFactory
|
|
5
|
+
from src.marqetive.platforms.tiktok.manager import TikTokPostManager
|
|
6
|
+
|
|
7
|
+
__all__ = ["TikTokClient", "TikTokAccountFactory", "TikTokPostManager"]
|