Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.14.0"
".": "1.15.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/day-moon-development%2Fpost-for-me-4ab77a12a89621944a10c6383193ad885148886601ae135b2558beb9fd145daa.yml
openapi_spec_hash: 74462f287ddc518cbea2f7f81e8ec350
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/day-moon-development%2Fpost-for-me-d7bde21e6d3328e90ec781ff8e2629faeaae4bb5d8e0d350703326ec8aadf898.yml
openapi_spec_hash: dcb2130480c4476fe08fcb080e369ce0
config_hash: 0ec19602e41aea0526548245a59d4253
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.15.0 (2026-04-11)

Full Changelog: [v1.14.0...v1.15.0](https://github.com/DayMoonDevelopment/post-for-me-python/compare/v1.14.0...v1.15.0)

### Features

* **api:** api update ([dfe7a39](https://github.com/DayMoonDevelopment/post-for-me-python/commit/dfe7a397758b92059c2def1325a5e03d294fbb3a))


### Bug Fixes

* ensure file data are only sent as 1 parameter ([c6d61de](https://github.com/DayMoonDevelopment/post-for-me-python/commit/c6d61de594f18fedf8cd66d72257e2e1b7d621e8))

## 1.14.0 (2026-04-08)

Full Changelog: [v1.13.0...v1.14.0](https://github.com/DayMoonDevelopment/post-for-me-python/compare/v1.13.0...v1.14.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "post_for_me"
version = "1.14.0"
version = "1.15.0"
description = "The official Python library for the post-for-me API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
5 changes: 3 additions & 2 deletions src/post_for_me/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def _extract_items(
index += 1
if is_dict(obj):
try:
# We are at the last entry in the path so we must remove the field
if (len(path)) == index:
# Remove the field if there are no more dict keys in the path,
# only "<array>" traversal markers or end.
if all(p == "<array>" for p in path[index:]):
item = obj.pop(key)
else:
item = obj[key]
Expand Down
2 changes: 1 addition & 1 deletion src/post_for_me/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "post_for_me"
__version__ = "1.14.0" # x-release-please-version
__version__ = "1.15.0" # x-release-please-version
6 changes: 6 additions & 0 deletions src/post_for_me/types/facebook_configuration_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ class FacebookConfigurationDto(BaseModel):

placement: Optional[Literal["reels", "stories", "timeline"]] = None
"""Facebook post placement"""

set_caption_for_each_image: Optional[bool] = None
"""
If true, include the caption on each image in a carousel upload; if false, only
include it on the final carousel post
"""
6 changes: 6 additions & 0 deletions src/post_for_me/types/facebook_configuration_dto_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ class FacebookConfigurationDtoParam(TypedDict, total=False):

placement: Optional[Literal["reels", "stories", "timeline"]]
"""Facebook post placement"""

set_caption_for_each_image: Optional[bool]
"""
If true, include the caption on each image in a carousel upload; if false, only
include it on the final carousel post
"""
6 changes: 6 additions & 0 deletions src/post_for_me/types/social_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ class AccountConfigurationConfiguration(BaseModel):
reply_settings: Optional[Literal["following", "mentionedUsers", "subscribers", "verified"]] = None
"""Who can reply to the tweet"""

set_caption_for_each_image: Optional[bool] = None
"""
If true, include the caption on each image in a Facebook carousel upload; if
false, only include it on the final carousel post
"""

share_to_feed: Optional[bool] = None
"""If false Instagram video posts will only be shown in the Reels tab"""

Expand Down
6 changes: 6 additions & 0 deletions src/post_for_me/types/social_post_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ class AccountConfigurationConfiguration(TypedDict, total=False):
reply_settings: Optional[Literal["following", "mentionedUsers", "subscribers", "verified"]]
"""Who can reply to the tweet"""

set_caption_for_each_image: Optional[bool]
"""
If true, include the caption on each image in a Facebook carousel upload; if
false, only include it on the final carousel post
"""

share_to_feed: Optional[bool]
"""If false Instagram video posts will only be shown in the Reels tab"""

Expand Down
6 changes: 6 additions & 0 deletions src/post_for_me/types/social_post_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ class AccountConfigurationConfiguration(TypedDict, total=False):
reply_settings: Optional[Literal["following", "mentionedUsers", "subscribers", "verified"]]
"""Who can reply to the tweet"""

set_caption_for_each_image: Optional[bool]
"""
If true, include the caption on each image in a Facebook carousel upload; if
false, only include it on the final carousel post
"""

share_to_feed: Optional[bool]
"""If false Instagram video posts will only be shown in the Reels tab"""

Expand Down
8 changes: 8 additions & 0 deletions tests/api_resources/test_social_posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def test_method_create_with_all_params(self, client: PostForMe) -> None:
"privacy_status": "public",
"quote_tweet_id": "quote_tweet_id",
"reply_settings": "following",
"set_caption_for_each_image": True,
"share_to_feed": True,
"title": "title",
"trial_reel_type": "manual",
Expand Down Expand Up @@ -150,6 +151,7 @@ def test_method_create_with_all_params(self, client: PostForMe) -> None:
}
],
"placement": "reels",
"set_caption_for_each_image": True,
},
"instagram": {
"caption": {},
Expand Down Expand Up @@ -486,6 +488,7 @@ def test_method_update_with_all_params(self, client: PostForMe) -> None:
"privacy_status": "public",
"quote_tweet_id": "quote_tweet_id",
"reply_settings": "following",
"set_caption_for_each_image": True,
"share_to_feed": True,
"title": "title",
"trial_reel_type": "manual",
Expand Down Expand Up @@ -555,6 +558,7 @@ def test_method_update_with_all_params(self, client: PostForMe) -> None:
}
],
"placement": "reels",
"set_caption_for_each_image": True,
},
"instagram": {
"caption": {},
Expand Down Expand Up @@ -948,6 +952,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncPostForMe)
"privacy_status": "public",
"quote_tweet_id": "quote_tweet_id",
"reply_settings": "following",
"set_caption_for_each_image": True,
"share_to_feed": True,
"title": "title",
"trial_reel_type": "manual",
Expand Down Expand Up @@ -1017,6 +1022,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncPostForMe)
}
],
"placement": "reels",
"set_caption_for_each_image": True,
},
"instagram": {
"caption": {},
Expand Down Expand Up @@ -1353,6 +1359,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncPostForMe)
"privacy_status": "public",
"quote_tweet_id": "quote_tweet_id",
"reply_settings": "following",
"set_caption_for_each_image": True,
"share_to_feed": True,
"title": "title",
"trial_reel_type": "manual",
Expand Down Expand Up @@ -1422,6 +1429,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncPostForMe)
}
],
"placement": "reels",
"set_caption_for_each_image": True,
},
"instagram": {
"caption": {},
Expand Down
9 changes: 9 additions & 0 deletions tests/test_extract_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ def test_multiple_files() -> None:
assert query == {"documents": [{}, {}]}


def test_top_level_file_array() -> None:
query = {"files": [b"file one", b"file two"], "title": "hello"}
assert extract_files(query, paths=[["files", "<array>"]]) == [
("files[]", b"file one"),
("files[]", b"file two"),
]
assert query == {"title": "hello"}


@pytest.mark.parametrize(
"query,paths,expected",
[
Expand Down