marqetive-lib 0.1.6__py3-none-any.whl → 0.1.8__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/__init__.py +13 -7
- marqetive/core/__init__.py +6 -4
- marqetive/core/base.py +92 -13
- marqetive/core/client.py +15 -0
- marqetive/core/models.py +111 -7
- marqetive/platforms/instagram/__init__.py +2 -1
- marqetive/platforms/instagram/client.py +29 -8
- marqetive/platforms/instagram/media.py +79 -13
- marqetive/platforms/instagram/models.py +74 -0
- marqetive/platforms/linkedin/__init__.py +51 -2
- marqetive/platforms/linkedin/client.py +978 -94
- marqetive/platforms/linkedin/media.py +156 -47
- marqetive/platforms/linkedin/models.py +413 -0
- marqetive/platforms/tiktok/__init__.py +2 -1
- marqetive/platforms/tiktok/client.py +5 -4
- marqetive/platforms/tiktok/media.py +193 -102
- marqetive/platforms/tiktok/models.py +79 -0
- marqetive/platforms/twitter/__init__.py +2 -1
- marqetive/platforms/twitter/client.py +86 -0
- marqetive/platforms/twitter/media.py +139 -70
- marqetive/platforms/twitter/models.py +58 -0
- marqetive/utils/media.py +86 -0
- marqetive/utils/oauth.py +31 -4
- {marqetive_lib-0.1.6.dist-info → marqetive_lib-0.1.8.dist-info}/METADATA +1 -9
- marqetive_lib-0.1.8.dist-info/RECORD +39 -0
- marqetive_lib-0.1.6.dist-info/RECORD +0 -35
- {marqetive_lib-0.1.6.dist-info → marqetive_lib-0.1.8.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""Instagram-specific models for post creation.
|
|
2
|
+
|
|
3
|
+
This module defines Instagram-specific data models for creating feed posts,
|
|
4
|
+
carousels, reels, and stories.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from pydantic import BaseModel, Field
|
|
10
|
+
|
|
11
|
+
from marqetive.core.models import MediaType
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class InstagramPostRequest(BaseModel):
|
|
15
|
+
"""Instagram-specific post creation request.
|
|
16
|
+
|
|
17
|
+
Supports feed posts, carousels, reels, and stories.
|
|
18
|
+
Instagram requires media for all posts (no text-only posts).
|
|
19
|
+
|
|
20
|
+
Attributes:
|
|
21
|
+
caption: Post caption/text
|
|
22
|
+
media_urls: List of media URLs (required, 1 for single, 2-10 for carousel)
|
|
23
|
+
media_ids: List of pre-uploaded media container IDs
|
|
24
|
+
media_type: Type of post (IMAGE, VIDEO, CAROUSEL, REEL, STORY)
|
|
25
|
+
alt_texts: Alt text for each media item (accessibility)
|
|
26
|
+
location_id: Facebook Place ID for location tag
|
|
27
|
+
cover_url: Cover/thumbnail image URL (for Reels)
|
|
28
|
+
share_to_feed: Share Reel/Story to main feed
|
|
29
|
+
collaborators: List of collaborator Instagram user IDs
|
|
30
|
+
product_tags: Product tags for shopping posts
|
|
31
|
+
audio_name: Audio track name (for Reels)
|
|
32
|
+
|
|
33
|
+
Example:
|
|
34
|
+
>>> # Single image post
|
|
35
|
+
>>> request = InstagramPostRequest(
|
|
36
|
+
... caption="Beautiful sunset!",
|
|
37
|
+
... media_urls=["https://example.com/sunset.jpg"],
|
|
38
|
+
... media_type=MediaType.IMAGE,
|
|
39
|
+
... alt_texts=["A colorful sunset over the ocean"]
|
|
40
|
+
... )
|
|
41
|
+
|
|
42
|
+
>>> # Carousel post
|
|
43
|
+
>>> request = InstagramPostRequest(
|
|
44
|
+
... caption="Our product lineup",
|
|
45
|
+
... media_urls=[
|
|
46
|
+
... "https://example.com/product1.jpg",
|
|
47
|
+
... "https://example.com/product2.jpg",
|
|
48
|
+
... "https://example.com/product3.jpg"
|
|
49
|
+
... ],
|
|
50
|
+
... media_type=MediaType.CAROUSEL,
|
|
51
|
+
... alt_texts=["Product 1", "Product 2", "Product 3"]
|
|
52
|
+
... )
|
|
53
|
+
|
|
54
|
+
>>> # Reel
|
|
55
|
+
>>> request = InstagramPostRequest(
|
|
56
|
+
... caption="Check out this tutorial!",
|
|
57
|
+
... media_urls=["https://example.com/tutorial.mp4"],
|
|
58
|
+
... media_type=MediaType.REEL,
|
|
59
|
+
... cover_url="https://example.com/thumbnail.jpg",
|
|
60
|
+
... share_to_feed=True
|
|
61
|
+
... )
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
caption: str | None = None
|
|
65
|
+
media_urls: list[str] = Field(default_factory=list)
|
|
66
|
+
media_ids: list[str] = Field(default_factory=list)
|
|
67
|
+
media_type: MediaType = MediaType.IMAGE
|
|
68
|
+
alt_texts: list[str] = Field(default_factory=list)
|
|
69
|
+
location_id: str | None = None
|
|
70
|
+
cover_url: str | None = None
|
|
71
|
+
share_to_feed: bool = True
|
|
72
|
+
collaborators: list[str] = Field(default_factory=list)
|
|
73
|
+
product_tags: list[dict[str, Any]] = Field(default_factory=list)
|
|
74
|
+
audio_name: str | None = None
|
|
@@ -1,5 +1,54 @@
|
|
|
1
|
-
"""LinkedIn platform integration.
|
|
1
|
+
"""LinkedIn platform integration using the Community Management API.
|
|
2
|
+
|
|
3
|
+
This module provides the LinkedIn client and related models for interacting
|
|
4
|
+
with LinkedIn's Community Management API, supporting:
|
|
5
|
+
- Posts (create, read, update, delete, list)
|
|
6
|
+
- Comments (with nested replies)
|
|
7
|
+
- Reactions (Like, Celebrate, Love, Insightful, Support, Funny)
|
|
8
|
+
- Social metadata and engagement metrics
|
|
9
|
+
- Organization (Company Page) management
|
|
10
|
+
- Media uploads (images, videos, documents)
|
|
11
|
+
"""
|
|
2
12
|
|
|
3
13
|
from marqetive.platforms.linkedin.client import LinkedInClient
|
|
14
|
+
from marqetive.platforms.linkedin.media import (
|
|
15
|
+
LinkedInMediaManager,
|
|
16
|
+
MediaAsset,
|
|
17
|
+
UploadProgress,
|
|
18
|
+
VideoProcessingState,
|
|
19
|
+
)
|
|
20
|
+
from marqetive.platforms.linkedin.models import (
|
|
21
|
+
CallToActionLabel,
|
|
22
|
+
CommentsState,
|
|
23
|
+
FeedDistribution,
|
|
24
|
+
LinkedInPostRequest,
|
|
25
|
+
LinkedInPostUpdateRequest,
|
|
26
|
+
Organization,
|
|
27
|
+
OrganizationType,
|
|
28
|
+
PostVisibility,
|
|
29
|
+
Reaction,
|
|
30
|
+
ReactionType,
|
|
31
|
+
SocialMetadata,
|
|
32
|
+
)
|
|
4
33
|
|
|
5
|
-
__all__ = [
|
|
34
|
+
__all__ = [
|
|
35
|
+
# Client
|
|
36
|
+
"LinkedInClient",
|
|
37
|
+
# Media
|
|
38
|
+
"LinkedInMediaManager",
|
|
39
|
+
"MediaAsset",
|
|
40
|
+
"UploadProgress",
|
|
41
|
+
"VideoProcessingState",
|
|
42
|
+
# Models
|
|
43
|
+
"CallToActionLabel",
|
|
44
|
+
"CommentsState",
|
|
45
|
+
"FeedDistribution",
|
|
46
|
+
"LinkedInPostRequest",
|
|
47
|
+
"LinkedInPostUpdateRequest",
|
|
48
|
+
"Organization",
|
|
49
|
+
"OrganizationType",
|
|
50
|
+
"PostVisibility",
|
|
51
|
+
"Reaction",
|
|
52
|
+
"ReactionType",
|
|
53
|
+
"SocialMetadata",
|
|
54
|
+
]
|