forked from LiveCarta/ContentAutomation
Store posting results to a mongodb
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Protocol
|
||||
from typing import Any, Protocol
|
||||
|
||||
from content_automation.models import PublishedContentRecord
|
||||
|
||||
|
||||
class SocialNetworkAdapter(Protocol):
|
||||
@@ -8,5 +10,12 @@ class SocialNetworkAdapter(Protocol):
|
||||
|
||||
name: str
|
||||
|
||||
def post_media(self, media_url: str, caption: str) -> str:
|
||||
"""Publish media and return an external post identifier."""
|
||||
def post_media(self, media_url: str, caption: str) -> Any:
|
||||
"""Publish media and return a provider response payload."""
|
||||
|
||||
|
||||
class PublishedContentStore(Protocol):
|
||||
"""Contract for persisting publish operation metadata."""
|
||||
|
||||
def save(self, record: PublishedContentRecord) -> None:
|
||||
"""Persist a published content record."""
|
||||
|
||||
Reference in New Issue
Block a user