Skip to content

Commit 06c6eef

Browse files
feat(api): api update
1 parent a96c6d7 commit 06c6eef

19 files changed

Lines changed: 286 additions & 271 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 266
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-8fc068b0eaa22ed851b43bf6a3504c7aa451ec280d6677e8472a0e1f89b9b9b6.yml
3-
openapi_spec_hash: ae58a89e758acbaa14f71ef912d341cf
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-7208a292a7e06ff0b1104c21c970fabf73cc1adfa4bc33816ab7e4a5553e6267.yml
3+
openapi_spec_hash: 4f652aa77155c360d33db12fc0e9e9cf
44
config_hash: 397c91e15c0024f8b5bbed9b82c2348c

src/onlyfansapi/_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def giphy(self) -> GiphyResource:
311311

312312
@cached_property
313313
def link_tags(self) -> LinkTagsResource:
314-
"""APIs for managing tags on free trial links and tracking links"""
314+
"""APIs for managing tags on free trial links, tracking links, and Smart Links"""
315315
from .resources.link_tags import LinkTagsResource
316316

317317
return LinkTagsResource(self)
@@ -779,7 +779,7 @@ def giphy(self) -> AsyncGiphyResource:
779779

780780
@cached_property
781781
def link_tags(self) -> AsyncLinkTagsResource:
782-
"""APIs for managing tags on free trial links and tracking links"""
782+
"""APIs for managing tags on free trial links, tracking links, and Smart Links"""
783783
from .resources.link_tags import AsyncLinkTagsResource
784784

785785
return AsyncLinkTagsResource(self)
@@ -1189,7 +1189,7 @@ def giphy(self) -> giphy.GiphyResourceWithRawResponse:
11891189

11901190
@cached_property
11911191
def link_tags(self) -> link_tags.LinkTagsResourceWithRawResponse:
1192-
"""APIs for managing tags on free trial links and tracking links"""
1192+
"""APIs for managing tags on free trial links, tracking links, and Smart Links"""
11931193
from .resources.link_tags import LinkTagsResourceWithRawResponse
11941194

11951195
return LinkTagsResourceWithRawResponse(self._client.link_tags)
@@ -1482,7 +1482,7 @@ def giphy(self) -> giphy.AsyncGiphyResourceWithRawResponse:
14821482

14831483
@cached_property
14841484
def link_tags(self) -> link_tags.AsyncLinkTagsResourceWithRawResponse:
1485-
"""APIs for managing tags on free trial links and tracking links"""
1485+
"""APIs for managing tags on free trial links, tracking links, and Smart Links"""
14861486
from .resources.link_tags import AsyncLinkTagsResourceWithRawResponse
14871487

14881488
return AsyncLinkTagsResourceWithRawResponse(self._client.link_tags)
@@ -1775,7 +1775,7 @@ def giphy(self) -> giphy.GiphyResourceWithStreamingResponse:
17751775

17761776
@cached_property
17771777
def link_tags(self) -> link_tags.LinkTagsResourceWithStreamingResponse:
1778-
"""APIs for managing tags on free trial links and tracking links"""
1778+
"""APIs for managing tags on free trial links, tracking links, and Smart Links"""
17791779
from .resources.link_tags import LinkTagsResourceWithStreamingResponse
17801780

17811781
return LinkTagsResourceWithStreamingResponse(self._client.link_tags)
@@ -2068,7 +2068,7 @@ def giphy(self) -> giphy.AsyncGiphyResourceWithStreamingResponse:
20682068

20692069
@cached_property
20702070
def link_tags(self) -> link_tags.AsyncLinkTagsResourceWithStreamingResponse:
2071-
"""APIs for managing tags on free trial links and tracking links"""
2071+
"""APIs for managing tags on free trial links, tracking links, and Smart Links"""
20722072
from .resources.link_tags import AsyncLinkTagsResourceWithStreamingResponse
20732073

20742074
return AsyncLinkTagsResourceWithStreamingResponse(self._client.link_tags)

src/onlyfansapi/resources/link_tags.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525

2626
class LinkTagsResource(SyncAPIResource):
27-
"""APIs for managing tags on free trial links and tracking links"""
27+
"""APIs for managing tags on free trial links, tracking links, and Smart Links"""
2828

2929
@cached_property
3030
def with_raw_response(self) -> LinkTagsResourceWithRawResponse:
@@ -48,7 +48,7 @@ def with_streaming_response(self) -> LinkTagsResourceWithStreamingResponse:
4848
def list(
4949
self,
5050
*,
51-
type: Literal["trial_links", "tracking_links"] | Omit = omit,
51+
type: Literal["trial_links", "tracking_links", "smart_links"] | Omit = omit,
5252
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5353
# The extra values given here take precedence over values defined on the client or passed to this method.
5454
extra_headers: Headers | None = None,
@@ -57,11 +57,11 @@ def list(
5757
timeout: float | httpx.Timeout | None | NotGiven = not_given,
5858
) -> LinkTagListResponse:
5959
"""
60-
Get all existing tags that have been used on free trial links and/or tracking
61-
links for this account. This is a free endpoint.
60+
Get all existing tags that have been used on free trial links, tracking links,
61+
and/or Smart Links for this account. This is a free endpoint.
6262
6363
Args:
64-
type: Filter by link type. If not provided, returns tags for both types.
64+
type: Filter by link type. If not provided, returns tags for all types.
6565
6666
extra_headers: Send extra headers
6767
@@ -85,7 +85,7 @@ def list(
8585

8686

8787
class AsyncLinkTagsResource(AsyncAPIResource):
88-
"""APIs for managing tags on free trial links and tracking links"""
88+
"""APIs for managing tags on free trial links, tracking links, and Smart Links"""
8989

9090
@cached_property
9191
def with_raw_response(self) -> AsyncLinkTagsResourceWithRawResponse:
@@ -109,7 +109,7 @@ def with_streaming_response(self) -> AsyncLinkTagsResourceWithStreamingResponse:
109109
async def list(
110110
self,
111111
*,
112-
type: Literal["trial_links", "tracking_links"] | Omit = omit,
112+
type: Literal["trial_links", "tracking_links", "smart_links"] | Omit = omit,
113113
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
114114
# The extra values given here take precedence over values defined on the client or passed to this method.
115115
extra_headers: Headers | None = None,
@@ -118,11 +118,11 @@ async def list(
118118
timeout: float | httpx.Timeout | None | NotGiven = not_given,
119119
) -> LinkTagListResponse:
120120
"""
121-
Get all existing tags that have been used on free trial links and/or tracking
122-
links for this account. This is a free endpoint.
121+
Get all existing tags that have been used on free trial links, tracking links,
122+
and/or Smart Links for this account. This is a free endpoint.
123123
124124
Args:
125-
type: Filter by link type. If not provided, returns tags for both types.
125+
type: Filter by link type. If not provided, returns tags for all types.
126126
127127
extra_headers: Send extra headers
128128

src/onlyfansapi/resources/smart_links.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def list(
156156
self,
157157
*,
158158
account_ids: Optional[str] | Omit = omit,
159+
filter: smart_link_list_params.Filter | Omit = omit,
159160
limit: int | Omit = omit,
160161
meta_pixel_ids: Optional[str] | Omit = omit,
161162
name: Optional[str] | Omit = omit,
@@ -203,6 +204,7 @@ def list(
203204
query=maybe_transform(
204205
{
205206
"account_ids": account_ids,
207+
"filter": filter,
206208
"limit": limit,
207209
"meta_pixel_ids": meta_pixel_ids,
208210
"name": name,
@@ -741,6 +743,7 @@ async def list(
741743
self,
742744
*,
743745
account_ids: Optional[str] | Omit = omit,
746+
filter: smart_link_list_params.Filter | Omit = omit,
744747
limit: int | Omit = omit,
745748
meta_pixel_ids: Optional[str] | Omit = omit,
746749
name: Optional[str] | Omit = omit,
@@ -788,6 +791,7 @@ async def list(
788791
query=await async_maybe_transform(
789792
{
790793
"account_ids": account_ids,
794+
"filter": filter,
791795
"limit": limit,
792796
"meta_pixel_ids": meta_pixel_ids,
793797
"name": name,

src/onlyfansapi/types/link_tag_list_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99

1010
class LinkTagListParams(TypedDict, total=False):
11-
type: Literal["trial_links", "tracking_links"]
12-
"""Filter by link type. If not provided, returns tags for both types."""
11+
type: Literal["trial_links", "tracking_links", "smart_links"]
12+
"""Filter by link type. If not provided, returns tags for all types."""

src/onlyfansapi/types/smart_link_list_params.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
from typing import Optional
66
from typing_extensions import TypedDict
77

8-
__all__ = ["SmartLinkListParams"]
8+
from .._types import SequenceNotStr
9+
10+
__all__ = ["SmartLinkListParams", "Filter"]
911

1012

1113
class SmartLinkListParams(TypedDict, total=False):
1214
account_ids: Optional[str]
1315
"""Comma-separated account prefixed IDs to include."""
1416

17+
filter: Filter
18+
1519
limit: int
1620
"""The number of Smart Links to return.
1721
@@ -29,3 +33,8 @@ class SmartLinkListParams(TypedDict, total=False):
2933

3034
pixel_ids: Optional[str]
3135
"""Comma-separated ad platform Pixel IDs to include."""
36+
37+
38+
class Filter(TypedDict, total=False):
39+
tags: SequenceNotStr[str]
40+
"""Must not be greater than 50 characters."""

tests/api_resources/engagement/test_messages.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TestMessages:
2424
@parametrize
2525
def test_method_get_message_buyers(self, client: OnlyFansAPI) -> None:
2626
message = client.engagement.messages.get_message_buyers(
27-
message_id="voluptatibus",
27+
message_id="necessitatibus",
2828
account="acct_XXXXXXXXXXXXXXX",
2929
)
3030
assert_matches_type(MessageGetMessageBuyersResponse, message, path=["response"])
@@ -33,7 +33,7 @@ def test_method_get_message_buyers(self, client: OnlyFansAPI) -> None:
3333
@parametrize
3434
def test_method_get_message_buyers_with_all_params(self, client: OnlyFansAPI) -> None:
3535
message = client.engagement.messages.get_message_buyers(
36-
message_id="voluptatibus",
36+
message_id="necessitatibus",
3737
account="acct_XXXXXXXXXXXXXXX",
3838
limit=10,
3939
marker=0,
@@ -47,7 +47,7 @@ def test_method_get_message_buyers_with_all_params(self, client: OnlyFansAPI) ->
4747
@parametrize
4848
def test_raw_response_get_message_buyers(self, client: OnlyFansAPI) -> None:
4949
response = client.engagement.messages.with_raw_response.get_message_buyers(
50-
message_id="voluptatibus",
50+
message_id="necessitatibus",
5151
account="acct_XXXXXXXXXXXXXXX",
5252
)
5353

@@ -60,7 +60,7 @@ def test_raw_response_get_message_buyers(self, client: OnlyFansAPI) -> None:
6060
@parametrize
6161
def test_streaming_response_get_message_buyers(self, client: OnlyFansAPI) -> None:
6262
with client.engagement.messages.with_streaming_response.get_message_buyers(
63-
message_id="voluptatibus",
63+
message_id="necessitatibus",
6464
account="acct_XXXXXXXXXXXXXXX",
6565
) as response:
6666
assert not response.is_closed
@@ -76,7 +76,7 @@ def test_streaming_response_get_message_buyers(self, client: OnlyFansAPI) -> Non
7676
def test_path_params_get_message_buyers(self, client: OnlyFansAPI) -> None:
7777
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
7878
client.engagement.messages.with_raw_response.get_message_buyers(
79-
message_id="voluptatibus",
79+
message_id="necessitatibus",
8080
account="",
8181
)
8282

@@ -148,7 +148,7 @@ class TestAsyncMessages:
148148
@parametrize
149149
async def test_method_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None:
150150
message = await async_client.engagement.messages.get_message_buyers(
151-
message_id="voluptatibus",
151+
message_id="necessitatibus",
152152
account="acct_XXXXXXXXXXXXXXX",
153153
)
154154
assert_matches_type(MessageGetMessageBuyersResponse, message, path=["response"])
@@ -157,7 +157,7 @@ async def test_method_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -
157157
@parametrize
158158
async def test_method_get_message_buyers_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
159159
message = await async_client.engagement.messages.get_message_buyers(
160-
message_id="voluptatibus",
160+
message_id="necessitatibus",
161161
account="acct_XXXXXXXXXXXXXXX",
162162
limit=10,
163163
marker=0,
@@ -171,7 +171,7 @@ async def test_method_get_message_buyers_with_all_params(self, async_client: Asy
171171
@parametrize
172172
async def test_raw_response_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None:
173173
response = await async_client.engagement.messages.with_raw_response.get_message_buyers(
174-
message_id="voluptatibus",
174+
message_id="necessitatibus",
175175
account="acct_XXXXXXXXXXXXXXX",
176176
)
177177

@@ -184,7 +184,7 @@ async def test_raw_response_get_message_buyers(self, async_client: AsyncOnlyFans
184184
@parametrize
185185
async def test_streaming_response_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None:
186186
async with async_client.engagement.messages.with_streaming_response.get_message_buyers(
187-
message_id="voluptatibus",
187+
message_id="necessitatibus",
188188
account="acct_XXXXXXXXXXXXXXX",
189189
) as response:
190190
assert not response.is_closed
@@ -200,7 +200,7 @@ async def test_streaming_response_get_message_buyers(self, async_client: AsyncOn
200200
async def test_path_params_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None:
201201
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
202202
await async_client.engagement.messages.with_raw_response.get_message_buyers(
203-
message_id="voluptatibus",
203+
message_id="necessitatibus",
204204
account="",
205205
)
206206

0 commit comments

Comments
 (0)