trustcafe-api-wrapper/jobs/post/create.py
2026-03-31 11:03:31 +01:00

13 lines
No EOL
387 B
Python

def create(API, payload: dict) -> dict:
"""
Creates a new post in the API.
Args:
payload (dict): The data for the new post.
Returns:
dict: The post data.
"""
print(f"Creating a new post with payload: {payload}")
post_data = API.make_request("POST", "content", "post", data=payload, authenticate=True)
return post_data