From dfe7a397758b92059c2def1325a5e03d294fbb3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 18:10:56 +0000 Subject: [PATCH 1/4] feat(api): api update --- .stats.yml | 2 +- src/post_for_me/types/facebook_configuration_dto.py | 6 ++++++ src/post_for_me/types/facebook_configuration_dto_param.py | 6 ++++++ src/post_for_me/types/social_post.py | 6 ++++++ src/post_for_me/types/social_post_create_params.py | 6 ++++++ src/post_for_me/types/social_post_update_params.py | 6 ++++++ tests/api_resources/test_social_posts.py | 8 ++++++++ 7 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 226e50a..a22e219 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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_hash: dcb2130480c4476fe08fcb080e369ce0 config_hash: 0ec19602e41aea0526548245a59d4253 diff --git a/src/post_for_me/types/facebook_configuration_dto.py b/src/post_for_me/types/facebook_configuration_dto.py index 96e3cb2..246b33e 100644 --- a/src/post_for_me/types/facebook_configuration_dto.py +++ b/src/post_for_me/types/facebook_configuration_dto.py @@ -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 + """ diff --git a/src/post_for_me/types/facebook_configuration_dto_param.py b/src/post_for_me/types/facebook_configuration_dto_param.py index d0d91c3..a19274a 100644 --- a/src/post_for_me/types/facebook_configuration_dto_param.py +++ b/src/post_for_me/types/facebook_configuration_dto_param.py @@ -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 + """ diff --git a/src/post_for_me/types/social_post.py b/src/post_for_me/types/social_post.py index 235b1df..9cf83cc 100644 --- a/src/post_for_me/types/social_post.py +++ b/src/post_for_me/types/social_post.py @@ -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""" diff --git a/src/post_for_me/types/social_post_create_params.py b/src/post_for_me/types/social_post_create_params.py index 1ad8cbb..d456fbf 100644 --- a/src/post_for_me/types/social_post_create_params.py +++ b/src/post_for_me/types/social_post_create_params.py @@ -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""" diff --git a/src/post_for_me/types/social_post_update_params.py b/src/post_for_me/types/social_post_update_params.py index 0a3f2ec..fa55930 100644 --- a/src/post_for_me/types/social_post_update_params.py +++ b/src/post_for_me/types/social_post_update_params.py @@ -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""" diff --git a/tests/api_resources/test_social_posts.py b/tests/api_resources/test_social_posts.py index 29751a7..b66c6b0 100644 --- a/tests/api_resources/test_social_posts.py +++ b/tests/api_resources/test_social_posts.py @@ -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", @@ -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": {}, @@ -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", @@ -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": {}, @@ -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", @@ -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": {}, @@ -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", @@ -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": {}, From 34fc25ba7526c0167be7fb2c01748f3d3a6bc798 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 09:19:33 +0000 Subject: [PATCH 2/4] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a22e219..0a2314b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/day-moon-development%2Fpost-for-me-d7bde21e6d3328e90ec781ff8e2629faeaae4bb5d8e0d350703326ec8aadf898.yml openapi_spec_hash: dcb2130480c4476fe08fcb080e369ce0 config_hash: 0ec19602e41aea0526548245a59d4253 From c6d61de594f18fedf8cd66d72257e2e1b7d621e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 09:21:36 +0000 Subject: [PATCH 3/4] fix: ensure file data are only sent as 1 parameter --- src/post_for_me/_utils/_utils.py | 5 +++-- tests/test_extract_files.py | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/post_for_me/_utils/_utils.py b/src/post_for_me/_utils/_utils.py index eec7f4a..63b8cd6 100644 --- a/src/post_for_me/_utils/_utils.py +++ b/src/post_for_me/_utils/_utils.py @@ -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 "" traversal markers or end. + if all(p == "" for p in path[index:]): item = obj.pop(key) else: item = obj[key] diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index 695baef..e7aa16e 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -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", ""]]) == [ + ("files[]", b"file one"), + ("files[]", b"file two"), + ] + assert query == {"title": "hello"} + + @pytest.mark.parametrize( "query,paths,expected", [ From 917c558d3c9c2661991f700012b18ed30ae11905 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 09:21:49 +0000 Subject: [PATCH 4/4] release: 1.15.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ pyproject.toml | 2 +- src/post_for_me/_version.py | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e72f113..7ccfe12 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.0" + ".": "1.15.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3273b7e..9787795 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/pyproject.toml b/pyproject.toml index 1ecbf8e..7cff57c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/src/post_for_me/_version.py b/src/post_for_me/_version.py index e797f53..207906a 100644 --- a/src/post_for_me/_version.py +++ b/src/post_for_me/_version.py @@ -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