Skip to content

Commit 98a84e7

Browse files
feat(api): api update
1 parent f0a25cd commit 98a84e7

17 files changed

Lines changed: 270 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: 266
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-0df6a9e16609368c35c32ee82fa44621fe492cc33106b4569a52bf2787824e9a.yml
3-
openapi_spec_hash: a352fe439e3bacb87c9bc566e72acbc0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-bee7507b20d149239fdbacb3de6b342dcefd08eefeabf1fd35d38cd898264298.yml
3+
openapi_spec_hash: 6fe4334c602d4eaeef46c509545a17b3
44
config_hash: 397c91e15c0024f8b5bbed9b82c2348c

src/onlyfansapi/resources/smart_links.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def list(
160160
meta_pixel_ids: Optional[str] | Omit = omit,
161161
name: Optional[str] | Omit = omit,
162162
offset: int | Omit = omit,
163+
pixel_ids: Optional[str] | Omit = omit,
163164
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
164165
# The extra values given here take precedence over values defined on the client or passed to this method.
165166
extra_headers: Headers | None = None,
@@ -176,12 +177,14 @@ def list(
176177
limit: The number of Smart Links to return. Default `50`. Must be at least 1. Must not
177178
be greater than 1000.
178179
179-
meta_pixel_ids: Comma-separated Meta Pixel IDs to include.
180+
meta_pixel_ids: Deprecated alias for `pixel_ids`. Comma-separated Pixel IDs to include.
180181
181182
name: Filter Smart Links by name. Must not be greater than 255 characters.
182183
183184
offset: The offset used for pagination. Default `0`. Must be at least 0.
184185
186+
pixel_ids: Comma-separated ad platform Pixel IDs to include.
187+
185188
extra_headers: Send extra headers
186189
187190
extra_query: Add additional query parameters to the request
@@ -204,6 +207,7 @@ def list(
204207
"meta_pixel_ids": meta_pixel_ids,
205208
"name": name,
206209
"offset": offset,
210+
"pixel_ids": pixel_ids,
207211
},
208212
smart_link_list_params.SmartLinkListParams,
209213
),
@@ -741,6 +745,7 @@ async def list(
741745
meta_pixel_ids: Optional[str] | Omit = omit,
742746
name: Optional[str] | Omit = omit,
743747
offset: int | Omit = omit,
748+
pixel_ids: Optional[str] | Omit = omit,
744749
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
745750
# The extra values given here take precedence over values defined on the client or passed to this method.
746751
extra_headers: Headers | None = None,
@@ -757,12 +762,14 @@ async def list(
757762
limit: The number of Smart Links to return. Default `50`. Must be at least 1. Must not
758763
be greater than 1000.
759764
760-
meta_pixel_ids: Comma-separated Meta Pixel IDs to include.
765+
meta_pixel_ids: Deprecated alias for `pixel_ids`. Comma-separated Pixel IDs to include.
761766
762767
name: Filter Smart Links by name. Must not be greater than 255 characters.
763768
764769
offset: The offset used for pagination. Default `0`. Must be at least 0.
765770
771+
pixel_ids: Comma-separated ad platform Pixel IDs to include.
772+
766773
extra_headers: Send extra headers
767774
768775
extra_query: Add additional query parameters to the request
@@ -785,6 +792,7 @@ async def list(
785792
"meta_pixel_ids": meta_pixel_ids,
786793
"name": name,
787794
"offset": offset,
795+
"pixel_ids": pixel_ids,
788796
},
789797
smart_link_list_params.SmartLinkListParams,
790798
),

src/onlyfansapi/types/smart_link_list_params.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ class SmartLinkListParams(TypedDict, total=False):
1919
"""
2020

2121
meta_pixel_ids: Optional[str]
22-
"""Comma-separated Meta Pixel IDs to include."""
22+
"""Deprecated alias for `pixel_ids`. Comma-separated Pixel IDs to include."""
2323

2424
name: Optional[str]
2525
"""Filter Smart Links by name. Must not be greater than 255 characters."""
2626

2727
offset: int
2828
"""The offset used for pagination. Default `0`. Must be at least 0."""
29+
30+
pixel_ids: Optional[str]
31+
"""Comma-separated ad platform Pixel IDs to include."""

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="est",
27+
message_id="quia",
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="est",
36+
message_id="quia",
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="est",
50+
message_id="quia",
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="est",
63+
message_id="quia",
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="est",
79+
message_id="quia",
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="est",
151+
message_id="quia",
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="est",
160+
message_id="quia",
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="est",
174+
message_id="quia",
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="est",
187+
message_id="quia",
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="est",
203+
message_id="quia",
204204
account="",
205205
)
206206

tests/api_resources/media/vault/lists/test_media.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TestMedia:
2424
@parametrize
2525
def test_method_add(self, client: OnlyFansAPI) -> None:
2626
media = client.media.vault.lists.media.add(
27-
list_id="est",
27+
list_id="quo",
2828
account="acct_XXXXXXXXXXXXXXX",
2929
media_ids=["string"],
3030
)
@@ -34,7 +34,7 @@ def test_method_add(self, client: OnlyFansAPI) -> None:
3434
@parametrize
3535
def test_raw_response_add(self, client: OnlyFansAPI) -> None:
3636
response = client.media.vault.lists.media.with_raw_response.add(
37-
list_id="est",
37+
list_id="quo",
3838
account="acct_XXXXXXXXXXXXXXX",
3939
media_ids=["string"],
4040
)
@@ -48,7 +48,7 @@ def test_raw_response_add(self, client: OnlyFansAPI) -> None:
4848
@parametrize
4949
def test_streaming_response_add(self, client: OnlyFansAPI) -> None:
5050
with client.media.vault.lists.media.with_streaming_response.add(
51-
list_id="est",
51+
list_id="quo",
5252
account="acct_XXXXXXXXXXXXXXX",
5353
media_ids=["string"],
5454
) as response:
@@ -65,7 +65,7 @@ def test_streaming_response_add(self, client: OnlyFansAPI) -> None:
6565
def test_path_params_add(self, client: OnlyFansAPI) -> None:
6666
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
6767
client.media.vault.lists.media.with_raw_response.add(
68-
list_id="est",
68+
list_id="quo",
6969
account="",
7070
media_ids=["string"],
7171
)
@@ -81,7 +81,7 @@ def test_path_params_add(self, client: OnlyFansAPI) -> None:
8181
@parametrize
8282
def test_method_remove(self, client: OnlyFansAPI) -> None:
8383
media = client.media.vault.lists.media.remove(
84-
list_id="est",
84+
list_id="quo",
8585
account="acct_XXXXXXXXXXXXXXX",
8686
media_ids=["string"],
8787
)
@@ -91,7 +91,7 @@ def test_method_remove(self, client: OnlyFansAPI) -> None:
9191
@parametrize
9292
def test_raw_response_remove(self, client: OnlyFansAPI) -> None:
9393
response = client.media.vault.lists.media.with_raw_response.remove(
94-
list_id="est",
94+
list_id="quo",
9595
account="acct_XXXXXXXXXXXXXXX",
9696
media_ids=["string"],
9797
)
@@ -105,7 +105,7 @@ def test_raw_response_remove(self, client: OnlyFansAPI) -> None:
105105
@parametrize
106106
def test_streaming_response_remove(self, client: OnlyFansAPI) -> None:
107107
with client.media.vault.lists.media.with_streaming_response.remove(
108-
list_id="est",
108+
list_id="quo",
109109
account="acct_XXXXXXXXXXXXXXX",
110110
media_ids=["string"],
111111
) as response:
@@ -122,7 +122,7 @@ def test_streaming_response_remove(self, client: OnlyFansAPI) -> None:
122122
def test_path_params_remove(self, client: OnlyFansAPI) -> None:
123123
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
124124
client.media.vault.lists.media.with_raw_response.remove(
125-
list_id="est",
125+
list_id="quo",
126126
account="",
127127
media_ids=["string"],
128128
)
@@ -144,7 +144,7 @@ class TestAsyncMedia:
144144
@parametrize
145145
async def test_method_add(self, async_client: AsyncOnlyFansAPI) -> None:
146146
media = await async_client.media.vault.lists.media.add(
147-
list_id="est",
147+
list_id="quo",
148148
account="acct_XXXXXXXXXXXXXXX",
149149
media_ids=["string"],
150150
)
@@ -154,7 +154,7 @@ async def test_method_add(self, async_client: AsyncOnlyFansAPI) -> None:
154154
@parametrize
155155
async def test_raw_response_add(self, async_client: AsyncOnlyFansAPI) -> None:
156156
response = await async_client.media.vault.lists.media.with_raw_response.add(
157-
list_id="est",
157+
list_id="quo",
158158
account="acct_XXXXXXXXXXXXXXX",
159159
media_ids=["string"],
160160
)
@@ -168,7 +168,7 @@ async def test_raw_response_add(self, async_client: AsyncOnlyFansAPI) -> None:
168168
@parametrize
169169
async def test_streaming_response_add(self, async_client: AsyncOnlyFansAPI) -> None:
170170
async with async_client.media.vault.lists.media.with_streaming_response.add(
171-
list_id="est",
171+
list_id="quo",
172172
account="acct_XXXXXXXXXXXXXXX",
173173
media_ids=["string"],
174174
) as response:
@@ -185,7 +185,7 @@ async def test_streaming_response_add(self, async_client: AsyncOnlyFansAPI) -> N
185185
async def test_path_params_add(self, async_client: AsyncOnlyFansAPI) -> None:
186186
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
187187
await async_client.media.vault.lists.media.with_raw_response.add(
188-
list_id="est",
188+
list_id="quo",
189189
account="",
190190
media_ids=["string"],
191191
)
@@ -201,7 +201,7 @@ async def test_path_params_add(self, async_client: AsyncOnlyFansAPI) -> None:
201201
@parametrize
202202
async def test_method_remove(self, async_client: AsyncOnlyFansAPI) -> None:
203203
media = await async_client.media.vault.lists.media.remove(
204-
list_id="est",
204+
list_id="quo",
205205
account="acct_XXXXXXXXXXXXXXX",
206206
media_ids=["string"],
207207
)
@@ -211,7 +211,7 @@ async def test_method_remove(self, async_client: AsyncOnlyFansAPI) -> None:
211211
@parametrize
212212
async def test_raw_response_remove(self, async_client: AsyncOnlyFansAPI) -> None:
213213
response = await async_client.media.vault.lists.media.with_raw_response.remove(
214-
list_id="est",
214+
list_id="quo",
215215
account="acct_XXXXXXXXXXXXXXX",
216216
media_ids=["string"],
217217
)
@@ -225,7 +225,7 @@ async def test_raw_response_remove(self, async_client: AsyncOnlyFansAPI) -> None
225225
@parametrize
226226
async def test_streaming_response_remove(self, async_client: AsyncOnlyFansAPI) -> None:
227227
async with async_client.media.vault.lists.media.with_streaming_response.remove(
228-
list_id="est",
228+
list_id="quo",
229229
account="acct_XXXXXXXXXXXXXXX",
230230
media_ids=["string"],
231231
) as response:
@@ -242,7 +242,7 @@ async def test_streaming_response_remove(self, async_client: AsyncOnlyFansAPI) -
242242
async def test_path_params_remove(self, async_client: AsyncOnlyFansAPI) -> None:
243243
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
244244
await async_client.media.vault.lists.media.with_raw_response.remove(
245-
list_id="est",
245+
list_id="quo",
246246
account="",
247247
media_ids=["string"],
248248
)

0 commit comments

Comments
 (0)