Skip to content

Commit 3697190

Browse files
feat(api): api update
1 parent f0d6930 commit 3697190

28 files changed

Lines changed: 388 additions & 257 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 265
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-2c3bff053faab91c4b19f9005ee1d08b1c95bbc572b34818b5d6ded6d684bf61.yml
3-
openapi_spec_hash: a00f8341a150e4462efa3b0b5a073fee
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-2f3054908346ebfa16676ab279293c7425b9babb0870452255c037c15a1d6f9c.yml
3+
openapi_spec_hash: 4c39d709bc6f09eacad77af7cfedaf9b
44
config_hash: 397c91e15c0024f8b5bbed9b82c2348c

src/onlyfansapi/resources/chats/messages.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ def send(
356356
chat_id: str,
357357
*,
358358
account: str,
359+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
359360
giphy_id: str | Omit = omit,
360361
locked_text: bool | Omit = omit,
361362
media_files: Iterable[object] | Omit = omit,
@@ -377,6 +378,11 @@ def send(
377378
Send a new message to a chat.
378379
379380
Args:
381+
block_banned_words: Screen `text` for OnlyFans banned words and block the send if any are found
382+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
383+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
384+
only. Omit to disable screening.
385+
380386
giphy_id: The ID of the Giphy GIF to attach to the message. Get IDs from the Giphy listing
381387
endpoints (`/giphy/trending`, `/giphy/search`).
382388
@@ -419,6 +425,7 @@ def send(
419425
path_template("/api/{account}/chats/{chat_id}/messages", account=account, chat_id=chat_id),
420426
body=maybe_transform(
421427
{
428+
"block_banned_words": block_banned_words,
422429
"giphy_id": giphy_id,
423430
"locked_text": locked_text,
424431
"media_files": media_files,
@@ -851,6 +858,7 @@ async def send(
851858
chat_id: str,
852859
*,
853860
account: str,
861+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
854862
giphy_id: str | Omit = omit,
855863
locked_text: bool | Omit = omit,
856864
media_files: Iterable[object] | Omit = omit,
@@ -872,6 +880,11 @@ async def send(
872880
Send a new message to a chat.
873881
874882
Args:
883+
block_banned_words: Screen `text` for OnlyFans banned words and block the send if any are found
884+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
885+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
886+
only. Omit to disable screening.
887+
875888
giphy_id: The ID of the Giphy GIF to attach to the message. Get IDs from the Giphy listing
876889
endpoints (`/giphy/trending`, `/giphy/search`).
877890
@@ -914,6 +927,7 @@ async def send(
914927
path_template("/api/{account}/chats/{chat_id}/messages", account=account, chat_id=chat_id),
915928
body=await async_maybe_transform(
916929
{
930+
"block_banned_words": block_banned_words,
917931
"giphy_id": giphy_id,
918932
"locked_text": locked_text,
919933
"media_files": media_files,

src/onlyfansapi/resources/mass_messaging.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Iterable
6+
from typing_extensions import Literal
67

78
import httpx
89

@@ -90,6 +91,7 @@ def update(
9091
*,
9192
account: str,
9293
text: str,
94+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
9395
giphy_id: str | Omit = omit,
9496
locked_text: bool | Omit = omit,
9597
media_files: SequenceNotStr[str] | Omit = omit,
@@ -111,6 +113,11 @@ def update(
111113
Args:
112114
text: The message text content
113115
116+
block_banned_words: Screen `text` for OnlyFans banned words and block the update if any are found
117+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
118+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
119+
only. Omit to disable screening.
120+
114121
giphy_id: The ID of the Giphy GIF to attach to the message. Get IDs from the Giphy listing
115122
endpoints (`/giphy/trending`, `/giphy/search`).
116123
@@ -149,6 +156,7 @@ def update(
149156
body=maybe_transform(
150157
{
151158
"text": text,
159+
"block_banned_words": block_banned_words,
152160
"giphy_id": giphy_id,
153161
"locked_text": locked_text,
154162
"media_files": media_files,
@@ -300,6 +308,7 @@ def send(
300308
account: str,
301309
*,
302310
text: str,
311+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
303312
excluded_lists: SequenceNotStr[str] | Omit = omit,
304313
giphy_id: str | Omit = omit,
305314
locked_text: bool | Omit = omit,
@@ -329,6 +338,11 @@ def send(
329338
Args:
330339
text: The message text content
331340
341+
block_banned_words: Screen `text` for OnlyFans banned words and block the send if any are found
342+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
343+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
344+
only. Omit to disable screening.
345+
332346
excluded_lists: Array of user list IDs that the mass message will NOT be sent to.
333347
334348
giphy_id: The ID of the Giphy GIF to attach to the message. Get IDs from the Giphy listing
@@ -375,6 +389,7 @@ def send(
375389
body=maybe_transform(
376390
{
377391
"text": text,
392+
"block_banned_words": block_banned_words,
378393
"excluded_lists": excluded_lists,
379394
"giphy_id": giphy_id,
380395
"locked_text": locked_text,
@@ -460,6 +475,7 @@ async def update(
460475
*,
461476
account: str,
462477
text: str,
478+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
463479
giphy_id: str | Omit = omit,
464480
locked_text: bool | Omit = omit,
465481
media_files: SequenceNotStr[str] | Omit = omit,
@@ -481,6 +497,11 @@ async def update(
481497
Args:
482498
text: The message text content
483499
500+
block_banned_words: Screen `text` for OnlyFans banned words and block the update if any are found
501+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
502+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
503+
only. Omit to disable screening.
504+
484505
giphy_id: The ID of the Giphy GIF to attach to the message. Get IDs from the Giphy listing
485506
endpoints (`/giphy/trending`, `/giphy/search`).
486507
@@ -519,6 +540,7 @@ async def update(
519540
body=await async_maybe_transform(
520541
{
521542
"text": text,
543+
"block_banned_words": block_banned_words,
522544
"giphy_id": giphy_id,
523545
"locked_text": locked_text,
524546
"media_files": media_files,
@@ -670,6 +692,7 @@ async def send(
670692
account: str,
671693
*,
672694
text: str,
695+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
673696
excluded_lists: SequenceNotStr[str] | Omit = omit,
674697
giphy_id: str | Omit = omit,
675698
locked_text: bool | Omit = omit,
@@ -699,6 +722,11 @@ async def send(
699722
Args:
700723
text: The message text content
701724
725+
block_banned_words: Screen `text` for OnlyFans banned words and block the send if any are found
726+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
727+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
728+
only. Omit to disable screening.
729+
702730
excluded_lists: Array of user list IDs that the mass message will NOT be sent to.
703731
704732
giphy_id: The ID of the Giphy GIF to attach to the message. Get IDs from the Giphy listing
@@ -745,6 +773,7 @@ async def send(
745773
body=await async_maybe_transform(
746774
{
747775
"text": text,
776+
"block_banned_words": block_banned_words,
748777
"excluded_lists": excluded_lists,
749778
"giphy_id": giphy_id,
750779
"locked_text": locked_text,

src/onlyfansapi/resources/posts/posts.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ def create(
9090
account: str,
9191
*,
9292
text: str,
93+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
9394
expire_days: int | Omit = omit,
9495
fund_raising_target_amount: int | Omit = omit,
9596
fund_raising_tips_presets: SequenceNotStr[str] | Omit = omit,
@@ -116,6 +117,11 @@ def create(
116117
Args:
117118
text: The post text content
118119
120+
block_banned_words: Screen `text` for OnlyFans banned words and block the post if any are found
121+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
122+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
123+
only. Omit to disable screening.
124+
119125
expire_days: Number of days after which the post will expire. Between 1 and 30 days. Keep
120126
empty for no expiration.
121127
@@ -164,6 +170,7 @@ def create(
164170
body=maybe_transform(
165171
{
166172
"text": text,
173+
"block_banned_words": block_banned_words,
167174
"expire_days": expire_days,
168175
"fund_raising_target_amount": fund_raising_target_amount,
169176
"fund_raising_tips_presets": fund_raising_tips_presets,
@@ -226,6 +233,7 @@ def update(
226233
*,
227234
account: str,
228235
text: str,
236+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
229237
expire_days: int | Omit = omit,
230238
fund_raising_target_amount: int | Omit = omit,
231239
fund_raising_tips_presets: SequenceNotStr[str] | Omit = omit,
@@ -252,6 +260,11 @@ def update(
252260
Args:
253261
text: The post text content
254262
263+
block_banned_words: Screen `text` for OnlyFans banned words and block the update if any are found
264+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
265+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
266+
only. Omit to disable screening.
267+
255268
expire_days: Number of days after which the post will expire. Between 1 and 30 days. Keep
256269
empty for no expiration.
257270
@@ -300,6 +313,7 @@ def update(
300313
body=maybe_transform(
301314
{
302315
"text": text,
316+
"block_banned_words": block_banned_words,
303317
"expire_days": expire_days,
304318
"fund_raising_target_amount": fund_raising_target_amount,
305319
"fund_raising_tips_presets": fund_raising_tips_presets,
@@ -627,6 +641,7 @@ async def create(
627641
account: str,
628642
*,
629643
text: str,
644+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
630645
expire_days: int | Omit = omit,
631646
fund_raising_target_amount: int | Omit = omit,
632647
fund_raising_tips_presets: SequenceNotStr[str] | Omit = omit,
@@ -653,6 +668,11 @@ async def create(
653668
Args:
654669
text: The post text content
655670
671+
block_banned_words: Screen `text` for OnlyFans banned words and block the post if any are found
672+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
673+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
674+
only. Omit to disable screening.
675+
656676
expire_days: Number of days after which the post will expire. Between 1 and 30 days. Keep
657677
empty for no expiration.
658678
@@ -701,6 +721,7 @@ async def create(
701721
body=await async_maybe_transform(
702722
{
703723
"text": text,
724+
"block_banned_words": block_banned_words,
704725
"expire_days": expire_days,
705726
"fund_raising_target_amount": fund_raising_target_amount,
706727
"fund_raising_tips_presets": fund_raising_tips_presets,
@@ -763,6 +784,7 @@ async def update(
763784
*,
764785
account: str,
765786
text: str,
787+
block_banned_words: Literal["strict_ban", "risky", "replace_soften"] | Omit = omit,
766788
expire_days: int | Omit = omit,
767789
fund_raising_target_amount: int | Omit = omit,
768790
fund_raising_tips_presets: SequenceNotStr[str] | Omit = omit,
@@ -789,6 +811,11 @@ async def update(
789811
Args:
790812
text: The post text content
791813
814+
block_banned_words: Screen `text` for OnlyFans banned words and block the update if any are found
815+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
816+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
817+
only. Omit to disable screening.
818+
792819
expire_days: Number of days after which the post will expire. Between 1 and 30 days. Keep
793820
empty for no expiration.
794821
@@ -837,6 +864,7 @@ async def update(
837864
body=await async_maybe_transform(
838865
{
839866
"text": text,
867+
"block_banned_words": block_banned_words,
840868
"expire_days": expire_days,
841869
"fund_raising_target_amount": fund_raising_target_amount,
842870
"fund_raising_tips_presets": fund_raising_tips_presets,

src/onlyfansapi/types/chats/message_send_params.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Iterable
6-
from typing_extensions import Required, Annotated, TypedDict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

88
from ..._utils import PropertyInfo
99

@@ -13,6 +13,16 @@
1313
class MessageSendParams(TypedDict, total=False):
1414
account: Required[str]
1515

16+
block_banned_words: Annotated[
17+
Literal["strict_ban", "risky", "replace_soften"], PropertyInfo(alias="blockBannedWords")
18+
]
19+
"""
20+
Screen `text` for OnlyFans banned words and block the send if any are found
21+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
22+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
23+
only. Omit to disable screening.
24+
"""
25+
1626
giphy_id: Annotated[str, PropertyInfo(alias="giphyId")]
1727
"""The ID of the Giphy GIF to attach to the message.
1828

src/onlyfansapi/types/mass_messaging_send_params.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Iterable
6-
from typing_extensions import Required, Annotated, TypedDict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

88
from .._types import SequenceNotStr
99
from .._utils import PropertyInfo
@@ -15,6 +15,16 @@ class MassMessagingSendParams(TypedDict, total=False):
1515
text: Required[str]
1616
"""The message text content"""
1717

18+
block_banned_words: Annotated[
19+
Literal["strict_ban", "risky", "replace_soften"], PropertyInfo(alias="blockBannedWords")
20+
]
21+
"""
22+
Screen `text` for OnlyFans banned words and block the send if any are found
23+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
24+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
25+
only. Omit to disable screening.
26+
"""
27+
1828
excluded_lists: Annotated[SequenceNotStr[str], PropertyInfo(alias="excludedLists")]
1929
"""Array of user list IDs that the mass message will NOT be sent to."""
2030

src/onlyfansapi/types/mass_messaging_update_params.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, Annotated, TypedDict
5+
from typing_extensions import Literal, Required, Annotated, TypedDict
66

77
from .._types import SequenceNotStr
88
from .._utils import PropertyInfo
@@ -16,6 +16,16 @@ class MassMessagingUpdateParams(TypedDict, total=False):
1616
text: Required[str]
1717
"""The message text content"""
1818

19+
block_banned_words: Annotated[
20+
Literal["strict_ban", "risky", "replace_soften"], PropertyInfo(alias="blockBannedWords")
21+
]
22+
"""
23+
Screen `text` for OnlyFans banned words and block the update if any are found
24+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
25+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
26+
only. Omit to disable screening.
27+
"""
28+
1929
giphy_id: Annotated[str, PropertyInfo(alias="giphyId")]
2030
"""The ID of the Giphy GIF to attach to the message.
2131

src/onlyfansapi/types/post_create_params.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ class PostCreateParams(TypedDict, total=False):
1515
text: Required[str]
1616
"""The post text content"""
1717

18+
block_banned_words: Annotated[
19+
Literal["strict_ban", "risky", "replace_soften"], PropertyInfo(alias="blockBannedWords")
20+
]
21+
"""
22+
Screen `text` for OnlyFans banned words and block the post if any are found
23+
(returns a 422 listing the offending words). `strict_ban` blocks all tiers,
24+
`risky` blocks Risky + Replace/soften, `replace_soften` blocks Replace/soften
25+
only. Omit to disable screening.
26+
"""
27+
1828
expire_days: Annotated[int, PropertyInfo(alias="expireDays")]
1929
"""Number of days after which the post will expire.
2030

0 commit comments

Comments
 (0)