diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index cda9cbd..10f3091 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.2"
+ ".": "0.2.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 6127ab4..7ad8da5 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 266
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-ba5efdf86108ef077f2db1f8a05b84d58f7f218fe2b7e0eb72e3c371cfa30015.yml
-openapi_spec_hash: 6c2d47cd85674ece07dc37e471a36ac9
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-bdf0ec6c222e345e512af7c9c9ddc55c0fa72d3860a8c8be3e747667c8c31a81.yml
+openapi_spec_hash: af3728e576ac859886d59cc48d3a513d
config_hash: 397c91e15c0024f8b5bbed9b82c2348c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e9d2a81..d7174bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,57 @@
# Changelog
+## 0.2.0 (2026-06-12)
+
+Full Changelog: [v0.1.2...v0.2.0](https://github.com/onlyfansapi/onlyfansapi-python/compare/v0.1.2...v0.2.0)
+
+### Features
+
+* **api:** api update ([56d3af6](https://github.com/onlyfansapi/onlyfansapi-python/commit/56d3af65bb3977a2fe5e4ba229cff154cd5fd3b6))
+* **api:** api update ([afd3835](https://github.com/onlyfansapi/onlyfansapi-python/commit/afd3835d291685dc853fb3d65912f56dc623c485))
+* **api:** api update ([bbaa897](https://github.com/onlyfansapi/onlyfansapi-python/commit/bbaa89714c89ec78261079236b42f2d5d1ddb930))
+* **api:** api update ([06c6eef](https://github.com/onlyfansapi/onlyfansapi-python/commit/06c6eefd0f8f8cb4ee28d7977dd27e594f14c155))
+* **api:** api update ([a96c6d7](https://github.com/onlyfansapi/onlyfansapi-python/commit/a96c6d73c2a5f5dfed976f2ec235b082c2569872))
+* **api:** api update ([eb632d4](https://github.com/onlyfansapi/onlyfansapi-python/commit/eb632d41920d0f838135d5f1d66502298b430bcc))
+* **api:** api update ([6b9ad4e](https://github.com/onlyfansapi/onlyfansapi-python/commit/6b9ad4e06d8663bb4a7959432dbdd1f253b3436e))
+* **api:** api update ([98a84e7](https://github.com/onlyfansapi/onlyfansapi-python/commit/98a84e77ee2bf89462136939c7b6ddfd39a0c619))
+* **api:** api update ([f0a25cd](https://github.com/onlyfansapi/onlyfansapi-python/commit/f0a25cd6b38cdae7c64dfeb113c489b216dda816))
+* **api:** api update ([8bbc9d6](https://github.com/onlyfansapi/onlyfansapi-python/commit/8bbc9d67d84d394af2936841c24ca07f5cce0944))
+* **api:** api update ([3551f5f](https://github.com/onlyfansapi/onlyfansapi-python/commit/3551f5fbba68388f3c5215acec8488b22b83bf30))
+* **api:** api update ([57a911a](https://github.com/onlyfansapi/onlyfansapi-python/commit/57a911acb35d93fd2586a5ae34cc6fd708943b2e))
+* **api:** api update ([e64239d](https://github.com/onlyfansapi/onlyfansapi-python/commit/e64239d0f6358f959e78a679908eddb39f8bff21))
+* **api:** api update ([aa704e0](https://github.com/onlyfansapi/onlyfansapi-python/commit/aa704e0fa956d67a1551857fecfbceaf52a42b5c))
+* **api:** api update ([8ada88c](https://github.com/onlyfansapi/onlyfansapi-python/commit/8ada88cd402259d9daa8cd20e95e3b44d67e0bf5))
+* **api:** api update ([924de03](https://github.com/onlyfansapi/onlyfansapi-python/commit/924de03411c4481b1bf81c6b67dad9d5640c0916))
+* **api:** api update ([fe65d3e](https://github.com/onlyfansapi/onlyfansapi-python/commit/fe65d3ebaaf73dd96c60fbb8dd96292e8b13ae5a))
+* **api:** api update ([b466abb](https://github.com/onlyfansapi/onlyfansapi-python/commit/b466abb391150e3ce362ab9846f672facc69551f))
+* **api:** api update ([db0732e](https://github.com/onlyfansapi/onlyfansapi-python/commit/db0732e227750931db1a25a278456fd7b95424fb))
+* **api:** api update ([2952e4b](https://github.com/onlyfansapi/onlyfansapi-python/commit/2952e4b60838f01d8bd0e586249cd917d607cb62))
+* **api:** api update ([de81294](https://github.com/onlyfansapi/onlyfansapi-python/commit/de812940595d4332b9f42d267f88f12c9783db1a))
+* **api:** api update ([9e94503](https://github.com/onlyfansapi/onlyfansapi-python/commit/9e9450351d93e7a6bd02ac847569349ec71fddb5))
+* **api:** api update ([43194d7](https://github.com/onlyfansapi/onlyfansapi-python/commit/43194d71262d5d50f797a8ccba2659a6c3c2887f))
+* **api:** api update ([4594ec1](https://github.com/onlyfansapi/onlyfansapi-python/commit/4594ec136232b42f3d456b09516ec08065fdfafd))
+* **api:** api update ([c06f3ab](https://github.com/onlyfansapi/onlyfansapi-python/commit/c06f3abf1381148f5e48b85f0086b1af17e2a0d3))
+* **api:** api update ([3525475](https://github.com/onlyfansapi/onlyfansapi-python/commit/3525475272b3341f91f4b75160f63b106321e139))
+* **api:** api update ([3e7e17b](https://github.com/onlyfansapi/onlyfansapi-python/commit/3e7e17b1e3ab8993aba06ffec2ef5378d18f93d2))
+* **api:** api update ([62090dc](https://github.com/onlyfansapi/onlyfansapi-python/commit/62090dc02ca59eb6efec90625d71d312043b55a1))
+* **api:** api update ([9ce94a8](https://github.com/onlyfansapi/onlyfansapi-python/commit/9ce94a833a666de930b770d1ba2c59596ff2d330))
+* **api:** api update ([cb29cb5](https://github.com/onlyfansapi/onlyfansapi-python/commit/cb29cb5216eaf0bbbc57186287b11e829710b6a1))
+* **api:** api update ([43559da](https://github.com/onlyfansapi/onlyfansapi-python/commit/43559da1af5ee18c58b99677f3cfd559e0e2106e))
+* **api:** api update ([9ffc9d3](https://github.com/onlyfansapi/onlyfansapi-python/commit/9ffc9d354f805880d3363c4084fe49935a7a9d10))
+* **api:** api update ([0942b23](https://github.com/onlyfansapi/onlyfansapi-python/commit/0942b231431790866d93cc2e477082c5aee0b87c))
+* **api:** api update ([88c6d42](https://github.com/onlyfansapi/onlyfansapi-python/commit/88c6d42c3c75411714bd70c03322d76b7960208a))
+* **api:** api update ([af71d0c](https://github.com/onlyfansapi/onlyfansapi-python/commit/af71d0ce89f943af5d27d66a5fbb1cd8e7285f9b))
+* **api:** api update ([015b0d1](https://github.com/onlyfansapi/onlyfansapi-python/commit/015b0d11070c3801c8bb26ff99b2f7f1d9ad5627))
+* **api:** api update ([0babea3](https://github.com/onlyfansapi/onlyfansapi-python/commit/0babea32599dc9d8603ba9e6519f9760367ad1f6))
+* **api:** api update ([196b012](https://github.com/onlyfansapi/onlyfansapi-python/commit/196b0123732493210c74e905d55c82ceafee11b9))
+* **api:** api update ([2c2c2d5](https://github.com/onlyfansapi/onlyfansapi-python/commit/2c2c2d5611f7d22371608b4e105d702fc96cbbd1))
+* **api:** api update ([0a74e45](https://github.com/onlyfansapi/onlyfansapi-python/commit/0a74e45ef5ecbefdfb4b2d3ca47c04004f77ee18))
+* **api:** api update ([2b072d1](https://github.com/onlyfansapi/onlyfansapi-python/commit/2b072d1cb4c48b00c3cd66616334e9edd580899d))
+* **api:** api update ([f2f2094](https://github.com/onlyfansapi/onlyfansapi-python/commit/f2f2094213516b1f79af9f22dc03a84a2a074a1a))
+* **api:** api update ([d22aec4](https://github.com/onlyfansapi/onlyfansapi-python/commit/d22aec4906882366899e5bef242bc1a6ca3ca7d6))
+* **api:** api update ([a67bd8b](https://github.com/onlyfansapi/onlyfansapi-python/commit/a67bd8b1e7a96890aaf430233e80dcebf94e6aa0))
+* **api:** api update ([4b08bce](https://github.com/onlyfansapi/onlyfansapi-python/commit/4b08bcecf591dcc5d35dad618d89d806cddab4b8))
+
## 0.1.2 (2026-05-25)
Full Changelog: [v0.1.1...v0.1.2](https://github.com/onlyfansapi/onlyfansapi-python/compare/v0.1.1...v0.1.2)
diff --git a/api.md b/api.md
index f704b20..b589a1e 100644
--- a/api.md
+++ b/api.md
@@ -520,12 +520,12 @@ Methods:
Types:
```python
-from onlyfansapi.types import MediaDownloadResponse, MediaScrapeResponse, MediaUploadResponse
+from onlyfansapi.types import MediaScrapeResponse, MediaUploadResponse
```
Methods:
-- client.media.download(cdn_url, \*, account) -> str
+- client.media.download(cdn_url, \*, account) -> None
- client.media.scrape(account, \*\*params) -> MediaScrapeResponse
- client.media.upload(account, \*\*params) -> MediaUploadResponse
@@ -579,7 +579,7 @@ Methods:
- client.media.vault.lists.create(account, \*\*params) -> ListCreateResponse
- client.media.vault.lists.retrieve(list_id, \*, account) -> ListRetrieveResponse
-- client.media.vault.lists.update(list_id, \*, account) -> ListUpdateResponse
+- client.media.vault.lists.update(list_id, \*, account, \*\*params) -> ListUpdateResponse
- client.media.vault.lists.list(account, \*\*params) -> ListListResponse
- client.media.vault.lists.delete(list_id, \*, account) -> ListDeleteResponse
diff --git a/pyproject.toml b/pyproject.toml
index 184c99e..856f021 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "onlyfans"
-version = "0.1.2"
+version = "0.2.0"
description = "The official Python library for the OnlyFansAPI API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/onlyfansapi/_client.py b/src/onlyfansapi/_client.py
index 4fd6cdf..21e7cff 100644
--- a/src/onlyfansapi/_client.py
+++ b/src/onlyfansapi/_client.py
@@ -311,7 +311,7 @@ def giphy(self) -> GiphyResource:
@cached_property
def link_tags(self) -> LinkTagsResource:
- """APIs for managing tags on free trial links and tracking links"""
+ """APIs for managing tags on free trial links, tracking links, and Smart Links"""
from .resources.link_tags import LinkTagsResource
return LinkTagsResource(self)
@@ -779,7 +779,7 @@ def giphy(self) -> AsyncGiphyResource:
@cached_property
def link_tags(self) -> AsyncLinkTagsResource:
- """APIs for managing tags on free trial links and tracking links"""
+ """APIs for managing tags on free trial links, tracking links, and Smart Links"""
from .resources.link_tags import AsyncLinkTagsResource
return AsyncLinkTagsResource(self)
@@ -1189,7 +1189,7 @@ def giphy(self) -> giphy.GiphyResourceWithRawResponse:
@cached_property
def link_tags(self) -> link_tags.LinkTagsResourceWithRawResponse:
- """APIs for managing tags on free trial links and tracking links"""
+ """APIs for managing tags on free trial links, tracking links, and Smart Links"""
from .resources.link_tags import LinkTagsResourceWithRawResponse
return LinkTagsResourceWithRawResponse(self._client.link_tags)
@@ -1482,7 +1482,7 @@ def giphy(self) -> giphy.AsyncGiphyResourceWithRawResponse:
@cached_property
def link_tags(self) -> link_tags.AsyncLinkTagsResourceWithRawResponse:
- """APIs for managing tags on free trial links and tracking links"""
+ """APIs for managing tags on free trial links, tracking links, and Smart Links"""
from .resources.link_tags import AsyncLinkTagsResourceWithRawResponse
return AsyncLinkTagsResourceWithRawResponse(self._client.link_tags)
@@ -1775,7 +1775,7 @@ def giphy(self) -> giphy.GiphyResourceWithStreamingResponse:
@cached_property
def link_tags(self) -> link_tags.LinkTagsResourceWithStreamingResponse:
- """APIs for managing tags on free trial links and tracking links"""
+ """APIs for managing tags on free trial links, tracking links, and Smart Links"""
from .resources.link_tags import LinkTagsResourceWithStreamingResponse
return LinkTagsResourceWithStreamingResponse(self._client.link_tags)
@@ -2068,7 +2068,7 @@ def giphy(self) -> giphy.AsyncGiphyResourceWithStreamingResponse:
@cached_property
def link_tags(self) -> link_tags.AsyncLinkTagsResourceWithStreamingResponse:
- """APIs for managing tags on free trial links and tracking links"""
+ """APIs for managing tags on free trial links, tracking links, and Smart Links"""
from .resources.link_tags import AsyncLinkTagsResourceWithStreamingResponse
return AsyncLinkTagsResourceWithStreamingResponse(self._client.link_tags)
diff --git a/src/onlyfansapi/_version.py b/src/onlyfansapi/_version.py
index 790de9b..a6edd99 100644
--- a/src/onlyfansapi/_version.py
+++ b/src/onlyfansapi/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "onlyfansapi"
-__version__ = "0.1.2" # x-release-please-version
+__version__ = "0.2.0" # x-release-please-version
diff --git a/src/onlyfansapi/resources/link_tags.py b/src/onlyfansapi/resources/link_tags.py
index 75f22c8..46d57c1 100644
--- a/src/onlyfansapi/resources/link_tags.py
+++ b/src/onlyfansapi/resources/link_tags.py
@@ -24,7 +24,7 @@
class LinkTagsResource(SyncAPIResource):
- """APIs for managing tags on free trial links and tracking links"""
+ """APIs for managing tags on free trial links, tracking links, and Smart Links"""
@cached_property
def with_raw_response(self) -> LinkTagsResourceWithRawResponse:
@@ -48,7 +48,7 @@ def with_streaming_response(self) -> LinkTagsResourceWithStreamingResponse:
def list(
self,
*,
- type: Literal["trial_links", "tracking_links"] | Omit = omit,
+ type: Literal["trial_links", "tracking_links", "smart_links"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -57,11 +57,11 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LinkTagListResponse:
"""
- Get all existing tags that have been used on free trial links and/or tracking
- links for this account. This is a free endpoint.
+ Get all existing tags that have been used on free trial links, tracking links,
+ and/or Smart Links for this account. This is a free endpoint.
Args:
- type: Filter by link type. If not provided, returns tags for both types.
+ type: Filter by link type. If not provided, returns tags for all types.
extra_headers: Send extra headers
@@ -85,7 +85,7 @@ def list(
class AsyncLinkTagsResource(AsyncAPIResource):
- """APIs for managing tags on free trial links and tracking links"""
+ """APIs for managing tags on free trial links, tracking links, and Smart Links"""
@cached_property
def with_raw_response(self) -> AsyncLinkTagsResourceWithRawResponse:
@@ -109,7 +109,7 @@ def with_streaming_response(self) -> AsyncLinkTagsResourceWithStreamingResponse:
async def list(
self,
*,
- type: Literal["trial_links", "tracking_links"] | Omit = omit,
+ type: Literal["trial_links", "tracking_links", "smart_links"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -118,11 +118,11 @@ async def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LinkTagListResponse:
"""
- Get all existing tags that have been used on free trial links and/or tracking
- links for this account. This is a free endpoint.
+ Get all existing tags that have been used on free trial links, tracking links,
+ and/or Smart Links for this account. This is a free endpoint.
Args:
- type: Filter by link type. If not provided, returns tags for both types.
+ type: Filter by link type. If not provided, returns tags for all types.
extra_headers: Send extra headers
diff --git a/src/onlyfansapi/resources/media/media.py b/src/onlyfansapi/resources/media/media.py
index cc9894e..d918af4 100644
--- a/src/onlyfansapi/resources/media/media.py
+++ b/src/onlyfansapi/resources/media/media.py
@@ -17,7 +17,7 @@
AsyncUploadsResourceWithStreamingResponse,
)
from ..._files import deepcopy_with_paths
-from ..._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
+from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, omit, not_given
from ..._utils import extract_files, path_template, maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -81,14 +81,15 @@ def download(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> str:
+ ) -> None:
"""Downloads a file directly from a `https://cdn*.onlyfans.com/*` URL.
When the
file is already cached on our CDN, this endpoint returns a `302` redirect to a
`https://cdn.fansapi.com/*` URL. Most HTTP clients follow redirects
- automatically (`curl` requires `-L`). Otherwise, the file is streamed through
- our proxies and queued for caching.
+ automatically (`curl` requires `-L`). Otherwise, the file is redirected to
+ `dl.fansapi.com`, which streams it through the account proxy and reports billing
+ back to the API.
Args:
extra_headers: Send extra headers
@@ -103,13 +104,13 @@ def download(
raise ValueError(f"Expected a non-empty value for `account` but received {account!r}")
if not cdn_url:
raise ValueError(f"Expected a non-empty value for `cdn_url` but received {cdn_url!r}")
- extra_headers = {"Accept": "text/plain", **(extra_headers or {})}
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return self._get(
path_template("/api/{account}/media/download/{cdn_url}", account=account, cdn_url=cdn_url),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=str,
+ cast_to=NoneType,
)
def scrape(
@@ -285,14 +286,15 @@ async def download(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> str:
+ ) -> None:
"""Downloads a file directly from a `https://cdn*.onlyfans.com/*` URL.
When the
file is already cached on our CDN, this endpoint returns a `302` redirect to a
`https://cdn.fansapi.com/*` URL. Most HTTP clients follow redirects
- automatically (`curl` requires `-L`). Otherwise, the file is streamed through
- our proxies and queued for caching.
+ automatically (`curl` requires `-L`). Otherwise, the file is redirected to
+ `dl.fansapi.com`, which streams it through the account proxy and reports billing
+ back to the API.
Args:
extra_headers: Send extra headers
@@ -307,13 +309,13 @@ async def download(
raise ValueError(f"Expected a non-empty value for `account` but received {account!r}")
if not cdn_url:
raise ValueError(f"Expected a non-empty value for `cdn_url` but received {cdn_url!r}")
- extra_headers = {"Accept": "text/plain", **(extra_headers or {})}
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return await self._get(
path_template("/api/{account}/media/download/{cdn_url}", account=account, cdn_url=cdn_url),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=str,
+ cast_to=NoneType,
)
async def scrape(
diff --git a/src/onlyfansapi/resources/media/vault/lists/lists.py b/src/onlyfansapi/resources/media/vault/lists/lists.py
index f326e94..b5f709f 100644
--- a/src/onlyfansapi/resources/media/vault/lists/lists.py
+++ b/src/onlyfansapi/resources/media/vault/lists/lists.py
@@ -23,7 +23,7 @@
async_to_streamed_response_wrapper,
)
from ....._base_client import make_request_options
-from .....types.media.vault import list_list_params, list_create_params
+from .....types.media.vault import list_list_params, list_create_params, list_update_params
from .....types.media.vault.list_list_response import ListListResponse
from .....types.media.vault.list_create_response import ListCreateResponse
from .....types.media.vault.list_delete_response import ListDeleteResponse
@@ -135,6 +135,7 @@ def update(
list_id: str,
*,
account: str,
+ name: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -142,10 +143,13 @@ def update(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ListUpdateResponse:
- """
- Rename a Vault list.
+ """Rename a Vault list.
Args:
+ name: The new name for the vault list.
+
+ Must not be greater than 255 characters.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -160,6 +164,7 @@ def update(
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
return self._put(
path_template("/api/{account}/media/vault/lists/{list_id}", account=account, list_id=list_id),
+ body=maybe_transform({"name": name}, list_update_params.ListUpdateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
@@ -358,6 +363,7 @@ async def update(
list_id: str,
*,
account: str,
+ name: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -365,10 +371,13 @@ async def update(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ListUpdateResponse:
- """
- Rename a Vault list.
+ """Rename a Vault list.
Args:
+ name: The new name for the vault list.
+
+ Must not be greater than 255 characters.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -383,6 +392,7 @@ async def update(
raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}")
return await self._put(
path_template("/api/{account}/media/vault/lists/{list_id}", account=account, list_id=list_id),
+ body=await async_maybe_transform({"name": name}, list_update_params.ListUpdateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
diff --git a/src/onlyfansapi/resources/smart_link_postbacks.py b/src/onlyfansapi/resources/smart_link_postbacks.py
index 7c10116..d3301ae 100644
--- a/src/onlyfansapi/resources/smart_link_postbacks.py
+++ b/src/onlyfansapi/resources/smart_link_postbacks.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Optional
+from typing import Iterable, Optional
from typing_extensions import Literal
import httpx
@@ -56,6 +56,9 @@ def create(
conversion_types: SequenceNotStr[str],
smart_link_scope: Literal["global", "campaign_specific"],
url: str,
+ body: str | Omit = omit,
+ headers: Iterable[smart_link_postback_create_params.Header] | Omit = omit,
+ http_method: Literal["GET", "POST"] | Omit = omit,
smart_link_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -73,8 +76,15 @@ def create(
smart_link_scope: `global` fires for all Smart Links. `campaign_specific` fires only for selected
Smart Links.
- url: The destination URL. Variables such as `{click_id}`, `{fbclid}`, `{gclid}`, and
- `{ttclid}` are replaced when the postback is dispatched.
+ url: The destination URL. Variables such as `{external_click_id}`, `{fbclid}`,
+ `{gclid}`, and `{ttclid}` are replaced when the postback is dispatched.
+
+ body: Optional request body template for POST postbacks. Variables are replaced when
+ the postback is dispatched.
+
+ headers: Optional request headers. Header values may include postback variables.
+
+ http_method: HTTP method used for the postback request. Defaults to `GET` when omitted.
smart_link_ids: Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`.
@@ -93,6 +103,9 @@ def create(
"conversion_types": conversion_types,
"smart_link_scope": smart_link_scope,
"url": url,
+ "body": body,
+ "headers": headers,
+ "http_method": http_method,
"smart_link_ids": smart_link_ids,
},
smart_link_postback_create_params.SmartLinkPostbackCreateParams,
@@ -141,6 +154,9 @@ def update(
conversion_types: SequenceNotStr[str],
smart_link_scope: Literal["global", "campaign_specific"],
url: str,
+ body: str | Omit = omit,
+ headers: Iterable[smart_link_postback_update_params.Header] | Omit = omit,
+ http_method: Literal["GET", "POST"] | Omit = omit,
smart_link_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -159,6 +175,13 @@ def update(
url: The destination URL.
+ body: Optional request body template for POST postbacks. Variables are replaced when
+ the postback is dispatched.
+
+ headers: Optional request headers. Header values may include postback variables.
+
+ http_method: HTTP method used for the postback request. Existing value is kept when omitted.
+
smart_link_ids: Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`.
extra_headers: Send extra headers
@@ -176,6 +199,9 @@ def update(
"conversion_types": conversion_types,
"smart_link_scope": smart_link_scope,
"url": url,
+ "body": body,
+ "headers": headers,
+ "http_method": http_method,
"smart_link_ids": smart_link_ids,
},
smart_link_postback_update_params.SmartLinkPostbackUpdateParams,
@@ -265,6 +291,9 @@ async def create(
conversion_types: SequenceNotStr[str],
smart_link_scope: Literal["global", "campaign_specific"],
url: str,
+ body: str | Omit = omit,
+ headers: Iterable[smart_link_postback_create_params.Header] | Omit = omit,
+ http_method: Literal["GET", "POST"] | Omit = omit,
smart_link_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -282,8 +311,15 @@ async def create(
smart_link_scope: `global` fires for all Smart Links. `campaign_specific` fires only for selected
Smart Links.
- url: The destination URL. Variables such as `{click_id}`, `{fbclid}`, `{gclid}`, and
- `{ttclid}` are replaced when the postback is dispatched.
+ url: The destination URL. Variables such as `{external_click_id}`, `{fbclid}`,
+ `{gclid}`, and `{ttclid}` are replaced when the postback is dispatched.
+
+ body: Optional request body template for POST postbacks. Variables are replaced when
+ the postback is dispatched.
+
+ headers: Optional request headers. Header values may include postback variables.
+
+ http_method: HTTP method used for the postback request. Defaults to `GET` when omitted.
smart_link_ids: Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`.
@@ -302,6 +338,9 @@ async def create(
"conversion_types": conversion_types,
"smart_link_scope": smart_link_scope,
"url": url,
+ "body": body,
+ "headers": headers,
+ "http_method": http_method,
"smart_link_ids": smart_link_ids,
},
smart_link_postback_create_params.SmartLinkPostbackCreateParams,
@@ -350,6 +389,9 @@ async def update(
conversion_types: SequenceNotStr[str],
smart_link_scope: Literal["global", "campaign_specific"],
url: str,
+ body: str | Omit = omit,
+ headers: Iterable[smart_link_postback_update_params.Header] | Omit = omit,
+ http_method: Literal["GET", "POST"] | Omit = omit,
smart_link_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -368,6 +410,13 @@ async def update(
url: The destination URL.
+ body: Optional request body template for POST postbacks. Variables are replaced when
+ the postback is dispatched.
+
+ headers: Optional request headers. Header values may include postback variables.
+
+ http_method: HTTP method used for the postback request. Existing value is kept when omitted.
+
smart_link_ids: Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`.
extra_headers: Send extra headers
@@ -385,6 +434,9 @@ async def update(
"conversion_types": conversion_types,
"smart_link_scope": smart_link_scope,
"url": url,
+ "body": body,
+ "headers": headers,
+ "http_method": http_method,
"smart_link_ids": smart_link_ids,
},
smart_link_postback_update_params.SmartLinkPostbackUpdateParams,
diff --git a/src/onlyfansapi/resources/smart_links.py b/src/onlyfansapi/resources/smart_links.py
index 375f214..0c02239 100644
--- a/src/onlyfansapi/resources/smart_links.py
+++ b/src/onlyfansapi/resources/smart_links.py
@@ -156,10 +156,12 @@ def list(
self,
*,
account_ids: Optional[str] | Omit = omit,
+ filter: smart_link_list_params.Filter | Omit = omit,
limit: int | Omit = omit,
meta_pixel_ids: Optional[str] | Omit = omit,
name: Optional[str] | Omit = omit,
offset: int | Omit = omit,
+ pixel_ids: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -176,12 +178,14 @@ def list(
limit: The number of Smart Links to return. Default `50`. Must be at least 1. Must not
be greater than 1000.
- meta_pixel_ids: Comma-separated Meta Pixel IDs to include.
+ meta_pixel_ids: Deprecated alias for `pixel_ids`. Comma-separated Pixel IDs to include.
name: Filter Smart Links by name. Must not be greater than 255 characters.
offset: The offset used for pagination. Default `0`. Must be at least 0.
+ pixel_ids: Comma-separated ad platform Pixel IDs to include.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -200,10 +204,12 @@ def list(
query=maybe_transform(
{
"account_ids": account_ids,
+ "filter": filter,
"limit": limit,
"meta_pixel_ids": meta_pixel_ids,
"name": name,
"offset": offset,
+ "pixel_ids": pixel_ids,
},
smart_link_list_params.SmartLinkListParams,
),
@@ -737,10 +743,12 @@ async def list(
self,
*,
account_ids: Optional[str] | Omit = omit,
+ filter: smart_link_list_params.Filter | Omit = omit,
limit: int | Omit = omit,
meta_pixel_ids: Optional[str] | Omit = omit,
name: Optional[str] | Omit = omit,
offset: int | Omit = omit,
+ pixel_ids: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -757,12 +765,14 @@ async def list(
limit: The number of Smart Links to return. Default `50`. Must be at least 1. Must not
be greater than 1000.
- meta_pixel_ids: Comma-separated Meta Pixel IDs to include.
+ meta_pixel_ids: Deprecated alias for `pixel_ids`. Comma-separated Pixel IDs to include.
name: Filter Smart Links by name. Must not be greater than 255 characters.
offset: The offset used for pagination. Default `0`. Must be at least 0.
+ pixel_ids: Comma-separated ad platform Pixel IDs to include.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -781,10 +791,12 @@ async def list(
query=await async_maybe_transform(
{
"account_ids": account_ids,
+ "filter": filter,
"limit": limit,
"meta_pixel_ids": meta_pixel_ids,
"name": name,
"offset": offset,
+ "pixel_ids": pixel_ids,
},
smart_link_list_params.SmartLinkListParams,
),
diff --git a/src/onlyfansapi/types/__init__.py b/src/onlyfansapi/types/__init__.py
index 6d3ddf1..01bb12a 100644
--- a/src/onlyfansapi/types/__init__.py
+++ b/src/onlyfansapi/types/__init__.py
@@ -66,7 +66,6 @@
from .user_retrieve_response import UserRetrieveResponse as UserRetrieveResponse
from .data_export_list_params import DataExportListParams as DataExportListParams
from .fan_list_expired_params import FanListExpiredParams as FanListExpiredParams
-from .media_download_response import MediaDownloadResponse as MediaDownloadResponse
from .post_unarchive_response import PostUnarchiveResponse as PostUnarchiveResponse
from .profile_retrieve_params import ProfileRetrieveParams as ProfileRetrieveParams
from .promotion_create_params import PromotionCreateParams as PromotionCreateParams
diff --git a/src/onlyfansapi/types/data_export_list_response.py b/src/onlyfansapi/types/data_export_list_response.py
index 76ca526..a721c5b 100644
--- a/src/onlyfansapi/types/data_export_list_response.py
+++ b/src/onlyfansapi/types/data_export_list_response.py
@@ -80,6 +80,8 @@ class DataData(BaseModel):
failed_at: Optional[str] = None
+ failed_downloads: Optional[int] = None
+
failed_reason: Optional[str] = None
file_type: Optional[str] = None
diff --git a/src/onlyfansapi/types/data_export_retrieve_response.py b/src/onlyfansapi/types/data_export_retrieve_response.py
index bcfde62..d9cc2eb 100644
--- a/src/onlyfansapi/types/data_export_retrieve_response.py
+++ b/src/onlyfansapi/types/data_export_retrieve_response.py
@@ -74,6 +74,8 @@ class Data(BaseModel):
failed_at: Optional[str] = None
+ failed_downloads: Optional[int] = None
+
failed_reason: Optional[str] = None
file_type: Optional[str] = None
diff --git a/src/onlyfansapi/types/link_tag_list_params.py b/src/onlyfansapi/types/link_tag_list_params.py
index 5e15ebb..32f0609 100644
--- a/src/onlyfansapi/types/link_tag_list_params.py
+++ b/src/onlyfansapi/types/link_tag_list_params.py
@@ -8,5 +8,5 @@
class LinkTagListParams(TypedDict, total=False):
- type: Literal["trial_links", "tracking_links"]
- """Filter by link type. If not provided, returns tags for both types."""
+ type: Literal["trial_links", "tracking_links", "smart_links"]
+ """Filter by link type. If not provided, returns tags for all types."""
diff --git a/src/onlyfansapi/types/media/vault/__init__.py b/src/onlyfansapi/types/media/vault/__init__.py
index 87e91af..1335bbc 100644
--- a/src/onlyfansapi/types/media/vault/__init__.py
+++ b/src/onlyfansapi/types/media/vault/__init__.py
@@ -5,6 +5,7 @@
from .list_list_params import ListListParams as ListListParams
from .list_create_params import ListCreateParams as ListCreateParams
from .list_list_response import ListListResponse as ListListResponse
+from .list_update_params import ListUpdateParams as ListUpdateParams
from .list_create_response import ListCreateResponse as ListCreateResponse
from .list_delete_response import ListDeleteResponse as ListDeleteResponse
from .list_update_response import ListUpdateResponse as ListUpdateResponse
diff --git a/src/onlyfansapi/types/media/vault/list_update_params.py b/src/onlyfansapi/types/media/vault/list_update_params.py
new file mode 100644
index 0000000..1e8190f
--- /dev/null
+++ b/src/onlyfansapi/types/media/vault/list_update_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["ListUpdateParams"]
+
+
+class ListUpdateParams(TypedDict, total=False):
+ account: Required[str]
+
+ name: Required[str]
+ """The new name for the vault list. Must not be greater than 255 characters."""
diff --git a/src/onlyfansapi/types/media_download_response.py b/src/onlyfansapi/types/media_download_response.py
deleted file mode 100644
index 8b95a30..0000000
--- a/src/onlyfansapi/types/media_download_response.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing_extensions import TypeAlias
-
-__all__ = ["MediaDownloadResponse"]
-
-MediaDownloadResponse: TypeAlias = str
diff --git a/src/onlyfansapi/types/smart_link_list_params.py b/src/onlyfansapi/types/smart_link_list_params.py
index ca28e0e..ed433ed 100644
--- a/src/onlyfansapi/types/smart_link_list_params.py
+++ b/src/onlyfansapi/types/smart_link_list_params.py
@@ -5,13 +5,17 @@
from typing import Optional
from typing_extensions import TypedDict
-__all__ = ["SmartLinkListParams"]
+from .._types import SequenceNotStr
+
+__all__ = ["SmartLinkListParams", "Filter"]
class SmartLinkListParams(TypedDict, total=False):
account_ids: Optional[str]
"""Comma-separated account prefixed IDs to include."""
+ filter: Filter
+
limit: int
"""The number of Smart Links to return.
@@ -19,10 +23,18 @@ class SmartLinkListParams(TypedDict, total=False):
"""
meta_pixel_ids: Optional[str]
- """Comma-separated Meta Pixel IDs to include."""
+ """Deprecated alias for `pixel_ids`. Comma-separated Pixel IDs to include."""
name: Optional[str]
"""Filter Smart Links by name. Must not be greater than 255 characters."""
offset: int
"""The offset used for pagination. Default `0`. Must be at least 0."""
+
+ pixel_ids: Optional[str]
+ """Comma-separated ad platform Pixel IDs to include."""
+
+
+class Filter(TypedDict, total=False):
+ tags: SequenceNotStr[str]
+ """Must not be greater than 50 characters."""
diff --git a/src/onlyfansapi/types/smart_link_postback_create_params.py b/src/onlyfansapi/types/smart_link_postback_create_params.py
index fb5f0e6..dde8295 100644
--- a/src/onlyfansapi/types/smart_link_postback_create_params.py
+++ b/src/onlyfansapi/types/smart_link_postback_create_params.py
@@ -2,11 +2,12 @@
from __future__ import annotations
+from typing import Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
from .._types import SequenceNotStr
-__all__ = ["SmartLinkPostbackCreateParams"]
+__all__ = ["SmartLinkPostbackCreateParams", "Header"]
class SmartLinkPostbackCreateParams(TypedDict, total=False):
@@ -22,9 +23,33 @@ class SmartLinkPostbackCreateParams(TypedDict, total=False):
url: Required[str]
"""The destination URL.
- Variables such as `{click_id}`, `{fbclid}`, `{gclid}`, and `{ttclid}` are
- replaced when the postback is dispatched.
+ Variables such as `{external_click_id}`, `{fbclid}`, `{gclid}`, and `{ttclid}`
+ are replaced when the postback is dispatched.
"""
+ body: str
+ """Optional request body template for POST postbacks.
+
+ Variables are replaced when the postback is dispatched.
+ """
+
+ headers: Iterable[Header]
+ """Optional request headers. Header values may include postback variables."""
+
+ http_method: Literal["GET", "POST"]
+ """HTTP method used for the postback request. Defaults to `GET` when omitted."""
+
smart_link_ids: SequenceNotStr[str]
"""Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`."""
+
+
+class Header(TypedDict, total=False):
+ name: Optional[str]
+ """This field is required when headers.\\**.value is present.
+
+ Must match the regex /\\AA[A-Za-z0-9!#$%&'*+.^_`|~-]+\\zz/. Must not be greater than
+ 100 characters.
+ """
+
+ value: Optional[str]
+ """Must not be greater than 2000 characters."""
diff --git a/src/onlyfansapi/types/smart_link_postback_create_response.py b/src/onlyfansapi/types/smart_link_postback_create_response.py
index b6681b1..206fd9e 100644
--- a/src/onlyfansapi/types/smart_link_postback_create_response.py
+++ b/src/onlyfansapi/types/smart_link_postback_create_response.py
@@ -6,7 +6,7 @@
from .._models import BaseModel
-__all__ = ["SmartLinkPostbackCreateResponse", "_Meta", "_Meta_Cache", "_Meta_Credits", "Data"]
+__all__ = ["SmartLinkPostbackCreateResponse", "_Meta", "_Meta_Cache", "_Meta_Credits", "Data", "DataHeader"]
class _Meta_Cache(BaseModel):
@@ -29,13 +29,25 @@ class _Meta(BaseModel):
api_credits: Optional[_Meta_Credits] = FieldInfo(alias="_credits", default=None)
+class DataHeader(BaseModel):
+ name: Optional[str] = None
+
+ value: Optional[str] = None
+
+
class Data(BaseModel):
id: Optional[int] = None
+ body: Optional[str] = None
+
conversion_types: Optional[List[str]] = None
created_at: Optional[str] = None
+ headers: Optional[List[DataHeader]] = None
+
+ http_method: Optional[str] = None
+
latest_response: Optional[str] = None
smart_link_ids: Optional[List[object]] = None
diff --git a/src/onlyfansapi/types/smart_link_postback_list_response.py b/src/onlyfansapi/types/smart_link_postback_list_response.py
index 865adf2..4148792 100644
--- a/src/onlyfansapi/types/smart_link_postback_list_response.py
+++ b/src/onlyfansapi/types/smart_link_postback_list_response.py
@@ -12,6 +12,7 @@
"_Meta_Cache",
"_Meta_Credits",
"Data",
+ "DataHeader",
"DataLatestResponse",
"DataSmartLink",
]
@@ -37,6 +38,12 @@ class _Meta(BaseModel):
api_credits: Optional[_Meta_Credits] = FieldInfo(alias="_credits", default=None)
+class DataHeader(BaseModel):
+ name: Optional[str] = None
+
+ value: Optional[str] = None
+
+
class DataLatestResponse(BaseModel):
id: Optional[int] = None
@@ -68,10 +75,16 @@ class DataSmartLink(BaseModel):
class Data(BaseModel):
id: Optional[int] = None
+ body: Optional[str] = None
+
conversion_types: Optional[List[str]] = None
created_at: Optional[str] = None
+ headers: Optional[List[DataHeader]] = None
+
+ http_method: Optional[str] = None
+
latest_response: Optional[DataLatestResponse] = None
smart_link_ids: Optional[List[str]] = None
diff --git a/src/onlyfansapi/types/smart_link_postback_retrieve_response.py b/src/onlyfansapi/types/smart_link_postback_retrieve_response.py
index 6eadd6a..33eed37 100644
--- a/src/onlyfansapi/types/smart_link_postback_retrieve_response.py
+++ b/src/onlyfansapi/types/smart_link_postback_retrieve_response.py
@@ -6,7 +6,15 @@
from .._models import BaseModel
-__all__ = ["SmartLinkPostbackRetrieveResponse", "_Meta", "_Meta_Cache", "_Meta_Credits", "Data", "DataSmartLink"]
+__all__ = [
+ "SmartLinkPostbackRetrieveResponse",
+ "_Meta",
+ "_Meta_Cache",
+ "_Meta_Credits",
+ "Data",
+ "DataHeader",
+ "DataSmartLink",
+]
class _Meta_Cache(BaseModel):
@@ -29,6 +37,12 @@ class _Meta(BaseModel):
api_credits: Optional[_Meta_Credits] = FieldInfo(alias="_credits", default=None)
+class DataHeader(BaseModel):
+ name: Optional[str] = None
+
+ value: Optional[str] = None
+
+
class DataSmartLink(BaseModel):
account_display_name: Optional[str] = None
@@ -42,10 +56,16 @@ class DataSmartLink(BaseModel):
class Data(BaseModel):
id: Optional[int] = None
+ body: Optional[str] = None
+
conversion_types: Optional[List[str]] = None
created_at: Optional[str] = None
+ headers: Optional[List[DataHeader]] = None
+
+ http_method: Optional[str] = None
+
latest_response: Optional[str] = None
smart_link_ids: Optional[List[str]] = None
diff --git a/src/onlyfansapi/types/smart_link_postback_update_params.py b/src/onlyfansapi/types/smart_link_postback_update_params.py
index 7863cc7..93a1e97 100644
--- a/src/onlyfansapi/types/smart_link_postback_update_params.py
+++ b/src/onlyfansapi/types/smart_link_postback_update_params.py
@@ -2,11 +2,12 @@
from __future__ import annotations
+from typing import Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
from .._types import SequenceNotStr
-__all__ = ["SmartLinkPostbackUpdateParams"]
+__all__ = ["SmartLinkPostbackUpdateParams", "Header"]
class SmartLinkPostbackUpdateParams(TypedDict, total=False):
@@ -19,5 +20,29 @@ class SmartLinkPostbackUpdateParams(TypedDict, total=False):
url: Required[str]
"""The destination URL."""
+ body: str
+ """Optional request body template for POST postbacks.
+
+ Variables are replaced when the postback is dispatched.
+ """
+
+ headers: Iterable[Header]
+ """Optional request headers. Header values may include postback variables."""
+
+ http_method: Literal["GET", "POST"]
+ """HTTP method used for the postback request. Existing value is kept when omitted."""
+
smart_link_ids: SequenceNotStr[str]
"""Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`."""
+
+
+class Header(TypedDict, total=False):
+ name: Optional[str]
+ """This field is required when headers.\\**.value is present.
+
+ Must match the regex /\\AA[A-Za-z0-9!#$%&'*+.^_`|~-]+\\zz/. Must not be greater than
+ 100 characters.
+ """
+
+ value: Optional[str]
+ """Must not be greater than 2000 characters."""
diff --git a/src/onlyfansapi/types/smart_link_postback_update_response.py b/src/onlyfansapi/types/smart_link_postback_update_response.py
index fc416c1..018c951 100644
--- a/src/onlyfansapi/types/smart_link_postback_update_response.py
+++ b/src/onlyfansapi/types/smart_link_postback_update_response.py
@@ -6,7 +6,15 @@
from .._models import BaseModel
-__all__ = ["SmartLinkPostbackUpdateResponse", "_Meta", "_Meta_Cache", "_Meta_Credits", "Data", "DataSmartLink"]
+__all__ = [
+ "SmartLinkPostbackUpdateResponse",
+ "_Meta",
+ "_Meta_Cache",
+ "_Meta_Credits",
+ "Data",
+ "DataHeader",
+ "DataSmartLink",
+]
class _Meta_Cache(BaseModel):
@@ -29,6 +37,12 @@ class _Meta(BaseModel):
api_credits: Optional[_Meta_Credits] = FieldInfo(alias="_credits", default=None)
+class DataHeader(BaseModel):
+ name: Optional[str] = None
+
+ value: Optional[str] = None
+
+
class DataSmartLink(BaseModel):
account_display_name: Optional[str] = None
@@ -42,10 +56,16 @@ class DataSmartLink(BaseModel):
class Data(BaseModel):
id: Optional[int] = None
+ body: Optional[str] = None
+
conversion_types: Optional[List[str]] = None
created_at: Optional[str] = None
+ headers: Optional[List[DataHeader]] = None
+
+ http_method: Optional[str] = None
+
latest_response: Optional[str] = None
smart_link_ids: Optional[List[str]] = None
diff --git a/tests/api_resources/engagement/test_messages.py b/tests/api_resources/engagement/test_messages.py
index a4e86aa..7506a92 100644
--- a/tests/api_resources/engagement/test_messages.py
+++ b/tests/api_resources/engagement/test_messages.py
@@ -24,7 +24,7 @@ class TestMessages:
@parametrize
def test_method_get_message_buyers(self, client: OnlyFansAPI) -> None:
message = client.engagement.messages.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(MessageGetMessageBuyersResponse, message, path=["response"])
@@ -33,7 +33,7 @@ def test_method_get_message_buyers(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_get_message_buyers_with_all_params(self, client: OnlyFansAPI) -> None:
message = client.engagement.messages.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
marker=0,
@@ -47,7 +47,7 @@ def test_method_get_message_buyers_with_all_params(self, client: OnlyFansAPI) ->
@parametrize
def test_raw_response_get_message_buyers(self, client: OnlyFansAPI) -> None:
response = client.engagement.messages.with_raw_response.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -60,7 +60,7 @@ def test_raw_response_get_message_buyers(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_get_message_buyers(self, client: OnlyFansAPI) -> None:
with client.engagement.messages.with_streaming_response.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -76,7 +76,7 @@ def test_streaming_response_get_message_buyers(self, client: OnlyFansAPI) -> Non
def test_path_params_get_message_buyers(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.engagement.messages.with_raw_response.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="",
)
@@ -148,7 +148,7 @@ class TestAsyncMessages:
@parametrize
async def test_method_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None:
message = await async_client.engagement.messages.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(MessageGetMessageBuyersResponse, message, path=["response"])
@@ -157,7 +157,7 @@ async def test_method_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -
@parametrize
async def test_method_get_message_buyers_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
message = await async_client.engagement.messages.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
marker=0,
@@ -171,7 +171,7 @@ async def test_method_get_message_buyers_with_all_params(self, async_client: Asy
@parametrize
async def test_raw_response_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.engagement.messages.with_raw_response.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -184,7 +184,7 @@ async def test_raw_response_get_message_buyers(self, async_client: AsyncOnlyFans
@parametrize
async def test_streaming_response_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.engagement.messages.with_streaming_response.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -200,7 +200,7 @@ async def test_streaming_response_get_message_buyers(self, async_client: AsyncOn
async def test_path_params_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.engagement.messages.with_raw_response.get_message_buyers(
- message_id="voluptatem",
+ message_id="ut",
account="",
)
diff --git a/tests/api_resources/media/vault/lists/test_media.py b/tests/api_resources/media/vault/lists/test_media.py
index de76d67..cd24aac 100644
--- a/tests/api_resources/media/vault/lists/test_media.py
+++ b/tests/api_resources/media/vault/lists/test_media.py
@@ -24,7 +24,7 @@ class TestMedia:
@parametrize
def test_method_add(self, client: OnlyFansAPI) -> None:
media = client.media.vault.lists.media.add(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
)
@@ -34,7 +34,7 @@ def test_method_add(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_add(self, client: OnlyFansAPI) -> None:
response = client.media.vault.lists.media.with_raw_response.add(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
)
@@ -48,7 +48,7 @@ def test_raw_response_add(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_add(self, client: OnlyFansAPI) -> None:
with client.media.vault.lists.media.with_streaming_response.add(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
) as response:
@@ -65,7 +65,7 @@ def test_streaming_response_add(self, client: OnlyFansAPI) -> None:
def test_path_params_add(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.media.vault.lists.media.with_raw_response.add(
- list_id="hic",
+ list_id="temporibus",
account="",
media_ids=["string"],
)
@@ -81,7 +81,7 @@ def test_path_params_add(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_remove(self, client: OnlyFansAPI) -> None:
media = client.media.vault.lists.media.remove(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
)
@@ -91,7 +91,7 @@ def test_method_remove(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_remove(self, client: OnlyFansAPI) -> None:
response = client.media.vault.lists.media.with_raw_response.remove(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
)
@@ -105,7 +105,7 @@ def test_raw_response_remove(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_remove(self, client: OnlyFansAPI) -> None:
with client.media.vault.lists.media.with_streaming_response.remove(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
) as response:
@@ -122,7 +122,7 @@ def test_streaming_response_remove(self, client: OnlyFansAPI) -> None:
def test_path_params_remove(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.media.vault.lists.media.with_raw_response.remove(
- list_id="hic",
+ list_id="temporibus",
account="",
media_ids=["string"],
)
@@ -144,7 +144,7 @@ class TestAsyncMedia:
@parametrize
async def test_method_add(self, async_client: AsyncOnlyFansAPI) -> None:
media = await async_client.media.vault.lists.media.add(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
)
@@ -154,7 +154,7 @@ async def test_method_add(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_raw_response_add(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.media.vault.lists.media.with_raw_response.add(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
)
@@ -168,7 +168,7 @@ async def test_raw_response_add(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_streaming_response_add(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.media.vault.lists.media.with_streaming_response.add(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
) as response:
@@ -185,7 +185,7 @@ async def test_streaming_response_add(self, async_client: AsyncOnlyFansAPI) -> N
async def test_path_params_add(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.media.vault.lists.media.with_raw_response.add(
- list_id="hic",
+ list_id="temporibus",
account="",
media_ids=["string"],
)
@@ -201,7 +201,7 @@ async def test_path_params_add(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_remove(self, async_client: AsyncOnlyFansAPI) -> None:
media = await async_client.media.vault.lists.media.remove(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
)
@@ -211,7 +211,7 @@ async def test_method_remove(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_raw_response_remove(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.media.vault.lists.media.with_raw_response.remove(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
)
@@ -225,7 +225,7 @@ async def test_raw_response_remove(self, async_client: AsyncOnlyFansAPI) -> None
@parametrize
async def test_streaming_response_remove(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.media.vault.lists.media.with_streaming_response.remove(
- list_id="hic",
+ list_id="temporibus",
account="acct_XXXXXXXXXXXXXXX",
media_ids=["string"],
) as response:
@@ -242,7 +242,7 @@ async def test_streaming_response_remove(self, async_client: AsyncOnlyFansAPI) -
async def test_path_params_remove(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.media.vault.lists.media.with_raw_response.remove(
- list_id="hic",
+ list_id="temporibus",
account="",
media_ids=["string"],
)
diff --git a/tests/api_resources/media/vault/test_lists.py b/tests/api_resources/media/vault/test_lists.py
index 2602218..a3fa304 100644
--- a/tests/api_resources/media/vault/test_lists.py
+++ b/tests/api_resources/media/vault/test_lists.py
@@ -127,6 +127,7 @@ def test_method_update(self, client: OnlyFansAPI) -> None:
list_ = client.media.vault.lists.update(
list_id="123",
account="acct_XXXXXXXXXXXXXXX",
+ name="My renamed list",
)
assert_matches_type(ListUpdateResponse, list_, path=["response"])
@@ -136,6 +137,7 @@ def test_raw_response_update(self, client: OnlyFansAPI) -> None:
response = client.media.vault.lists.with_raw_response.update(
list_id="123",
account="acct_XXXXXXXXXXXXXXX",
+ name="My renamed list",
)
assert response.is_closed is True
@@ -149,6 +151,7 @@ def test_streaming_response_update(self, client: OnlyFansAPI) -> None:
with client.media.vault.lists.with_streaming_response.update(
list_id="123",
account="acct_XXXXXXXXXXXXXXX",
+ name="My renamed list",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -165,12 +168,14 @@ def test_path_params_update(self, client: OnlyFansAPI) -> None:
client.media.vault.lists.with_raw_response.update(
list_id="123",
account="",
+ name="My renamed list",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
client.media.vault.lists.with_raw_response.update(
list_id="",
account="acct_XXXXXXXXXXXXXXX",
+ name="My renamed list",
)
@pytest.mark.skip(reason="Mock server tests are disabled")
@@ -388,6 +393,7 @@ async def test_method_update(self, async_client: AsyncOnlyFansAPI) -> None:
list_ = await async_client.media.vault.lists.update(
list_id="123",
account="acct_XXXXXXXXXXXXXXX",
+ name="My renamed list",
)
assert_matches_type(ListUpdateResponse, list_, path=["response"])
@@ -397,6 +403,7 @@ async def test_raw_response_update(self, async_client: AsyncOnlyFansAPI) -> None
response = await async_client.media.vault.lists.with_raw_response.update(
list_id="123",
account="acct_XXXXXXXXXXXXXXX",
+ name="My renamed list",
)
assert response.is_closed is True
@@ -410,6 +417,7 @@ async def test_streaming_response_update(self, async_client: AsyncOnlyFansAPI) -
async with async_client.media.vault.lists.with_streaming_response.update(
list_id="123",
account="acct_XXXXXXXXXXXXXXX",
+ name="My renamed list",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -426,12 +434,14 @@ async def test_path_params_update(self, async_client: AsyncOnlyFansAPI) -> None:
await async_client.media.vault.lists.with_raw_response.update(
list_id="123",
account="",
+ name="My renamed list",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"):
await async_client.media.vault.lists.with_raw_response.update(
list_id="",
account="acct_XXXXXXXXXXXXXXX",
+ name="My renamed list",
)
@pytest.mark.skip(reason="Mock server tests are disabled")
diff --git a/tests/api_resources/posts/test_comments.py b/tests/api_resources/posts/test_comments.py
index 297ac0a..f374e50 100644
--- a/tests/api_resources/posts/test_comments.py
+++ b/tests/api_resources/posts/test_comments.py
@@ -29,7 +29,7 @@ class TestComments:
@parametrize
def test_method_create(self, client: OnlyFansAPI) -> None:
comment = client.posts.comments.create(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
text="This is a comment.",
)
@@ -39,7 +39,7 @@ def test_method_create(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_create_with_all_params(self, client: OnlyFansAPI) -> None:
comment = client.posts.comments.create(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
text="This is a comment.",
answer_to=123,
@@ -51,7 +51,7 @@ def test_method_create_with_all_params(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_create(self, client: OnlyFansAPI) -> None:
response = client.posts.comments.with_raw_response.create(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
text="This is a comment.",
)
@@ -65,7 +65,7 @@ def test_raw_response_create(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_create(self, client: OnlyFansAPI) -> None:
with client.posts.comments.with_streaming_response.create(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
text="This is a comment.",
) as response:
@@ -82,7 +82,7 @@ def test_streaming_response_create(self, client: OnlyFansAPI) -> None:
def test_path_params_create(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.posts.comments.with_raw_response.create(
- post_id="dicta",
+ post_id="et",
account="",
text="This is a comment.",
)
@@ -98,7 +98,7 @@ def test_path_params_create(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list(self, client: OnlyFansAPI) -> None:
comment = client.posts.comments.list(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(CommentListResponse, comment, path=["response"])
@@ -107,7 +107,7 @@ def test_method_list(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_with_all_params(self, client: OnlyFansAPI) -> None:
comment = client.posts.comments.list(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
offset=0,
@@ -119,7 +119,7 @@ def test_method_list_with_all_params(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_list(self, client: OnlyFansAPI) -> None:
response = client.posts.comments.with_raw_response.list(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -132,7 +132,7 @@ def test_raw_response_list(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_list(self, client: OnlyFansAPI) -> None:
with client.posts.comments.with_streaming_response.list(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -148,7 +148,7 @@ def test_streaming_response_list(self, client: OnlyFansAPI) -> None:
def test_path_params_list(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.posts.comments.with_raw_response.list(
- post_id="dicta",
+ post_id="et",
account="",
)
@@ -418,7 +418,7 @@ class TestAsyncComments:
@parametrize
async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None:
comment = await async_client.posts.comments.create(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
text="This is a comment.",
)
@@ -428,7 +428,7 @@ async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
comment = await async_client.posts.comments.create(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
text="This is a comment.",
answer_to=123,
@@ -440,7 +440,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOnlyFansAP
@parametrize
async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.posts.comments.with_raw_response.create(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
text="This is a comment.",
)
@@ -454,7 +454,7 @@ async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None
@parametrize
async def test_streaming_response_create(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.posts.comments.with_streaming_response.create(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
text="This is a comment.",
) as response:
@@ -471,7 +471,7 @@ async def test_streaming_response_create(self, async_client: AsyncOnlyFansAPI) -
async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.posts.comments.with_raw_response.create(
- post_id="dicta",
+ post_id="et",
account="",
text="This is a comment.",
)
@@ -487,7 +487,7 @@ async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_list(self, async_client: AsyncOnlyFansAPI) -> None:
comment = await async_client.posts.comments.list(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(CommentListResponse, comment, path=["response"])
@@ -496,7 +496,7 @@ async def test_method_list(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
comment = await async_client.posts.comments.list(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
offset=0,
@@ -508,7 +508,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOnlyFansAPI)
@parametrize
async def test_raw_response_list(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.posts.comments.with_raw_response.list(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -521,7 +521,7 @@ async def test_raw_response_list(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.posts.comments.with_streaming_response.list(
- post_id="dicta",
+ post_id="et",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -537,7 +537,7 @@ async def test_streaming_response_list(self, async_client: AsyncOnlyFansAPI) ->
async def test_path_params_list(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.posts.comments.with_raw_response.list(
- post_id="dicta",
+ post_id="et",
account="",
)
diff --git a/tests/api_resources/saved_for_later/messages/test_settings.py b/tests/api_resources/saved_for_later/messages/test_settings.py
index aa735c9..a62ccbd 100644
--- a/tests/api_resources/saved_for_later/messages/test_settings.py
+++ b/tests/api_resources/saved_for_later/messages/test_settings.py
@@ -110,7 +110,7 @@ def test_path_params_disable_automatic_messaging(self, client: OnlyFansAPI) -> N
def test_method_enable_or_update_automatic_messaging(self, client: OnlyFansAPI) -> None:
setting = client.saved_for_later.messages.settings.enable_or_update_automatic_messaging(
account="acct_XXXXXXXXXXXXXXX",
- period=48,
+ period=24,
)
assert_matches_type(SettingEnableOrUpdateAutomaticMessagingResponse, setting, path=["response"])
@@ -119,7 +119,7 @@ def test_method_enable_or_update_automatic_messaging(self, client: OnlyFansAPI)
def test_raw_response_enable_or_update_automatic_messaging(self, client: OnlyFansAPI) -> None:
response = client.saved_for_later.messages.settings.with_raw_response.enable_or_update_automatic_messaging(
account="acct_XXXXXXXXXXXXXXX",
- period=48,
+ period=24,
)
assert response.is_closed is True
@@ -132,7 +132,7 @@ def test_raw_response_enable_or_update_automatic_messaging(self, client: OnlyFan
def test_streaming_response_enable_or_update_automatic_messaging(self, client: OnlyFansAPI) -> None:
with client.saved_for_later.messages.settings.with_streaming_response.enable_or_update_automatic_messaging(
account="acct_XXXXXXXXXXXXXXX",
- period=48,
+ period=24,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -148,7 +148,7 @@ def test_path_params_enable_or_update_automatic_messaging(self, client: OnlyFans
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.saved_for_later.messages.settings.with_raw_response.enable_or_update_automatic_messaging(
account="",
- period=48,
+ period=24,
)
@@ -246,7 +246,7 @@ async def test_path_params_disable_automatic_messaging(self, async_client: Async
async def test_method_enable_or_update_automatic_messaging(self, async_client: AsyncOnlyFansAPI) -> None:
setting = await async_client.saved_for_later.messages.settings.enable_or_update_automatic_messaging(
account="acct_XXXXXXXXXXXXXXX",
- period=48,
+ period=24,
)
assert_matches_type(SettingEnableOrUpdateAutomaticMessagingResponse, setting, path=["response"])
@@ -256,7 +256,7 @@ async def test_raw_response_enable_or_update_automatic_messaging(self, async_cli
response = (
await async_client.saved_for_later.messages.settings.with_raw_response.enable_or_update_automatic_messaging(
account="acct_XXXXXXXXXXXXXXX",
- period=48,
+ period=24,
)
)
@@ -273,7 +273,7 @@ async def test_streaming_response_enable_or_update_automatic_messaging(
async with (
async_client.saved_for_later.messages.settings.with_streaming_response.enable_or_update_automatic_messaging(
account="acct_XXXXXXXXXXXXXXX",
- period=48,
+ period=24,
)
) as response:
assert not response.is_closed
@@ -290,5 +290,5 @@ async def test_path_params_enable_or_update_automatic_messaging(self, async_clie
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.saved_for_later.messages.settings.with_raw_response.enable_or_update_automatic_messaging(
account="",
- period=48,
+ period=24,
)
diff --git a/tests/api_resources/saved_for_later/posts/test_settings.py b/tests/api_resources/saved_for_later/posts/test_settings.py
index b5f3d61..9c80483 100644
--- a/tests/api_resources/saved_for_later/posts/test_settings.py
+++ b/tests/api_resources/saved_for_later/posts/test_settings.py
@@ -110,7 +110,7 @@ def test_path_params_disable_automatic_posting(self, client: OnlyFansAPI) -> Non
def test_method_enable_or_update_automatic_posting(self, client: OnlyFansAPI) -> None:
setting = client.saved_for_later.posts.settings.enable_or_update_automatic_posting(
account="acct_XXXXXXXXXXXXXXX",
- period=24,
+ period=48,
)
assert_matches_type(SettingEnableOrUpdateAutomaticPostingResponse, setting, path=["response"])
@@ -119,7 +119,7 @@ def test_method_enable_or_update_automatic_posting(self, client: OnlyFansAPI) ->
def test_raw_response_enable_or_update_automatic_posting(self, client: OnlyFansAPI) -> None:
response = client.saved_for_later.posts.settings.with_raw_response.enable_or_update_automatic_posting(
account="acct_XXXXXXXXXXXXXXX",
- period=24,
+ period=48,
)
assert response.is_closed is True
@@ -132,7 +132,7 @@ def test_raw_response_enable_or_update_automatic_posting(self, client: OnlyFansA
def test_streaming_response_enable_or_update_automatic_posting(self, client: OnlyFansAPI) -> None:
with client.saved_for_later.posts.settings.with_streaming_response.enable_or_update_automatic_posting(
account="acct_XXXXXXXXXXXXXXX",
- period=24,
+ period=48,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -148,7 +148,7 @@ def test_path_params_enable_or_update_automatic_posting(self, client: OnlyFansAP
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.saved_for_later.posts.settings.with_raw_response.enable_or_update_automatic_posting(
account="",
- period=24,
+ period=48,
)
@@ -246,7 +246,7 @@ async def test_path_params_disable_automatic_posting(self, async_client: AsyncOn
async def test_method_enable_or_update_automatic_posting(self, async_client: AsyncOnlyFansAPI) -> None:
setting = await async_client.saved_for_later.posts.settings.enable_or_update_automatic_posting(
account="acct_XXXXXXXXXXXXXXX",
- period=24,
+ period=48,
)
assert_matches_type(SettingEnableOrUpdateAutomaticPostingResponse, setting, path=["response"])
@@ -256,7 +256,7 @@ async def test_raw_response_enable_or_update_automatic_posting(self, async_clien
response = (
await async_client.saved_for_later.posts.settings.with_raw_response.enable_or_update_automatic_posting(
account="acct_XXXXXXXXXXXXXXX",
- period=24,
+ period=48,
)
)
@@ -271,7 +271,7 @@ async def test_streaming_response_enable_or_update_automatic_posting(self, async
async with (
async_client.saved_for_later.posts.settings.with_streaming_response.enable_or_update_automatic_posting(
account="acct_XXXXXXXXXXXXXXX",
- period=24,
+ period=48,
)
) as response:
assert not response.is_closed
@@ -288,5 +288,5 @@ async def test_path_params_enable_or_update_automatic_posting(self, async_client
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.saved_for_later.posts.settings.with_raw_response.enable_or_update_automatic_posting(
account="",
- period=24,
+ period=48,
)
diff --git a/tests/api_resources/stories/test_highlights.py b/tests/api_resources/stories/test_highlights.py
index 06d474b..cf15eaa 100644
--- a/tests/api_resources/stories/test_highlights.py
+++ b/tests/api_resources/stories/test_highlights.py
@@ -285,7 +285,7 @@ def test_path_params_delete(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_add_story(self, client: OnlyFansAPI) -> None:
highlight = client.stories.highlights.add_story(
- path_story_id="autem",
+ path_story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
body_story_id=2345678901,
@@ -296,7 +296,7 @@ def test_method_add_story(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_add_story(self, client: OnlyFansAPI) -> None:
response = client.stories.highlights.with_raw_response.add_story(
- path_story_id="autem",
+ path_story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
body_story_id=2345678901,
@@ -311,7 +311,7 @@ def test_raw_response_add_story(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_add_story(self, client: OnlyFansAPI) -> None:
with client.stories.highlights.with_streaming_response.add_story(
- path_story_id="autem",
+ path_story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
body_story_id=2345678901,
@@ -329,7 +329,7 @@ def test_streaming_response_add_story(self, client: OnlyFansAPI) -> None:
def test_path_params_add_story(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.stories.highlights.with_raw_response.add_story(
- path_story_id="autem",
+ path_story_id="quos",
account="",
highlight_id=1234567890,
body_story_id=2345678901,
@@ -347,7 +347,7 @@ def test_path_params_add_story(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_remove_story(self, client: OnlyFansAPI) -> None:
highlight = client.stories.highlights.remove_story(
- story_id="autem",
+ story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
)
@@ -357,7 +357,7 @@ def test_method_remove_story(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_remove_story(self, client: OnlyFansAPI) -> None:
response = client.stories.highlights.with_raw_response.remove_story(
- story_id="autem",
+ story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
)
@@ -371,7 +371,7 @@ def test_raw_response_remove_story(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_remove_story(self, client: OnlyFansAPI) -> None:
with client.stories.highlights.with_streaming_response.remove_story(
- story_id="autem",
+ story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
) as response:
@@ -388,7 +388,7 @@ def test_streaming_response_remove_story(self, client: OnlyFansAPI) -> None:
def test_path_params_remove_story(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.stories.highlights.with_raw_response.remove_story(
- story_id="autem",
+ story_id="quos",
account="",
highlight_id=1234567890,
)
@@ -666,7 +666,7 @@ async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_add_story(self, async_client: AsyncOnlyFansAPI) -> None:
highlight = await async_client.stories.highlights.add_story(
- path_story_id="autem",
+ path_story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
body_story_id=2345678901,
@@ -677,7 +677,7 @@ async def test_method_add_story(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_raw_response_add_story(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.stories.highlights.with_raw_response.add_story(
- path_story_id="autem",
+ path_story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
body_story_id=2345678901,
@@ -692,7 +692,7 @@ async def test_raw_response_add_story(self, async_client: AsyncOnlyFansAPI) -> N
@parametrize
async def test_streaming_response_add_story(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.stories.highlights.with_streaming_response.add_story(
- path_story_id="autem",
+ path_story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
body_story_id=2345678901,
@@ -710,7 +710,7 @@ async def test_streaming_response_add_story(self, async_client: AsyncOnlyFansAPI
async def test_path_params_add_story(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.stories.highlights.with_raw_response.add_story(
- path_story_id="autem",
+ path_story_id="quos",
account="",
highlight_id=1234567890,
body_story_id=2345678901,
@@ -728,7 +728,7 @@ async def test_path_params_add_story(self, async_client: AsyncOnlyFansAPI) -> No
@parametrize
async def test_method_remove_story(self, async_client: AsyncOnlyFansAPI) -> None:
highlight = await async_client.stories.highlights.remove_story(
- story_id="autem",
+ story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
)
@@ -738,7 +738,7 @@ async def test_method_remove_story(self, async_client: AsyncOnlyFansAPI) -> None
@parametrize
async def test_raw_response_remove_story(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.stories.highlights.with_raw_response.remove_story(
- story_id="autem",
+ story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
)
@@ -752,7 +752,7 @@ async def test_raw_response_remove_story(self, async_client: AsyncOnlyFansAPI) -
@parametrize
async def test_streaming_response_remove_story(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.stories.highlights.with_streaming_response.remove_story(
- story_id="autem",
+ story_id="quos",
account="acct_XXXXXXXXXXXXXXX",
highlight_id=1234567890,
) as response:
@@ -769,7 +769,7 @@ async def test_streaming_response_remove_story(self, async_client: AsyncOnlyFans
async def test_path_params_remove_story(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.stories.highlights.with_raw_response.remove_story(
- story_id="autem",
+ story_id="quos",
account="",
highlight_id=1234567890,
)
diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py
index 02cf31a..761219e 100644
--- a/tests/api_resources/test_accounts.py
+++ b/tests/api_resources/test_accounts.py
@@ -59,7 +59,7 @@ def test_streaming_response_list(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_disconnect(self, client: OnlyFansAPI) -> None:
account = client.accounts.disconnect(
- "sed",
+ "perspiciatis",
)
assert_matches_type(Optional[AccountDisconnectResponse], account, path=["response"])
@@ -67,7 +67,7 @@ def test_method_disconnect(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_disconnect(self, client: OnlyFansAPI) -> None:
response = client.accounts.with_raw_response.disconnect(
- "sed",
+ "perspiciatis",
)
assert response.is_closed is True
@@ -79,7 +79,7 @@ def test_raw_response_disconnect(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_disconnect(self, client: OnlyFansAPI) -> None:
with client.accounts.with_streaming_response.disconnect(
- "sed",
+ "perspiciatis",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -145,7 +145,7 @@ async def test_streaming_response_list(self, async_client: AsyncOnlyFansAPI) ->
@parametrize
async def test_method_disconnect(self, async_client: AsyncOnlyFansAPI) -> None:
account = await async_client.accounts.disconnect(
- "sed",
+ "perspiciatis",
)
assert_matches_type(Optional[AccountDisconnectResponse], account, path=["response"])
@@ -153,7 +153,7 @@ async def test_method_disconnect(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_raw_response_disconnect(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.accounts.with_raw_response.disconnect(
- "sed",
+ "perspiciatis",
)
assert response.is_closed is True
@@ -165,7 +165,7 @@ async def test_raw_response_disconnect(self, async_client: AsyncOnlyFansAPI) ->
@parametrize
async def test_streaming_response_disconnect(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.accounts.with_streaming_response.disconnect(
- "sed",
+ "perspiciatis",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/test_authenticate.py b/tests/api_resources/test_authenticate.py
index 6d4a3d4..b5af615 100644
--- a/tests/api_resources/test_authenticate.py
+++ b/tests/api_resources/test_authenticate.py
@@ -159,22 +159,22 @@ def test_method_start(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_start_with_all_params(self, client: OnlyFansAPI) -> None:
authenticate = client.authenticate.start(
- auth_id="aut",
- auth_type="raw_data",
- cookies="nihil",
+ auth_id="cum",
+ auth_type="mobile_app",
+ cookies="quam",
custom_proxy={
"host": "proxy.example.com",
- "password": "]%<>fO None:
@parametrize
async def test_method_start_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
authenticate = await async_client.authenticate.start(
- auth_id="aut",
- auth_type="raw_data",
- cookies="nihil",
+ auth_id="cum",
+ auth_type="mobile_app",
+ cookies="quam",
custom_proxy={
"host": "proxy.example.com",
- "password": "]%<>fO None:
client_session = client.client_sessions.create(
display_name="STRLCxGLVC Agency / Model: Stella",
client_reference_id="my_crm_model_12345",
- proxy_country="uk",
+ proxy_country="us",
)
assert_matches_type(ClientSessionCreateResponse, client_session, path=["response"])
@@ -81,7 +81,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOnlyFansAP
client_session = await async_client.client_sessions.create(
display_name="STRLCxGLVC Agency / Model: Stella",
client_reference_id="my_crm_model_12345",
- proxy_country="uk",
+ proxy_country="us",
)
assert_matches_type(ClientSessionCreateResponse, client_session, path=["response"])
diff --git a/tests/api_resources/test_media.py b/tests/api_resources/test_media.py
index 3bba819..75dab9a 100644
--- a/tests/api_resources/test_media.py
+++ b/tests/api_resources/test_media.py
@@ -9,10 +9,7 @@
from onlyfansapi import OnlyFansAPI, AsyncOnlyFansAPI
from tests.utils import assert_matches_type
-from onlyfansapi.types import (
- MediaScrapeResponse,
- MediaUploadResponse,
-)
+from onlyfansapi.types import MediaScrapeResponse, MediaUploadResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -27,7 +24,7 @@ def test_method_download(self, client: OnlyFansAPI) -> None:
cdn_url="cdnUrl",
account="acct_XXXXXXXXXXXXXXX",
)
- assert_matches_type(str, media, path=["response"])
+ assert media is None
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -40,7 +37,7 @@ def test_raw_response_download(self, client: OnlyFansAPI) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
media = response.parse()
- assert_matches_type(str, media, path=["response"])
+ assert media is None
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -53,7 +50,7 @@ def test_streaming_response_download(self, client: OnlyFansAPI) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
media = response.parse()
- assert_matches_type(str, media, path=["response"])
+ assert media is None
assert cast(Any, response.is_closed) is True
@@ -194,7 +191,7 @@ async def test_method_download(self, async_client: AsyncOnlyFansAPI) -> None:
cdn_url="cdnUrl",
account="acct_XXXXXXXXXXXXXXX",
)
- assert_matches_type(str, media, path=["response"])
+ assert media is None
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -207,7 +204,7 @@ async def test_raw_response_download(self, async_client: AsyncOnlyFansAPI) -> No
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
media = await response.parse()
- assert_matches_type(str, media, path=["response"])
+ assert media is None
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -220,7 +217,7 @@ async def test_streaming_response_download(self, async_client: AsyncOnlyFansAPI)
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
media = await response.parse()
- assert_matches_type(str, media, path=["response"])
+ assert media is None
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_notifications.py b/tests/api_resources/test_notifications.py
index 280e3de..b215885 100644
--- a/tests/api_resources/test_notifications.py
+++ b/tests/api_resources/test_notifications.py
@@ -38,7 +38,7 @@ def test_method_list_with_all_params(self, client: OnlyFansAPI) -> None:
from_id=123,
limit=10,
skip_users="all",
- type="comments",
+ type="purchases",
)
assert_matches_type(NotificationListResponse, notification, path=["response"])
@@ -228,7 +228,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOnlyFansAPI)
from_id=123,
limit=10,
skip_users="all",
- type="comments",
+ type="purchases",
)
assert_matches_type(NotificationListResponse, notification, path=["response"])
diff --git a/tests/api_resources/test_smart_link_postbacks.py b/tests/api_resources/test_smart_link_postbacks.py
index 5a5ea6f..29c028a 100644
--- a/tests/api_resources/test_smart_link_postbacks.py
+++ b/tests/api_resources/test_smart_link_postbacks.py
@@ -29,7 +29,7 @@ def test_method_create(self, client: OnlyFansAPI) -> None:
smart_link_postback = client.smart_link_postbacks.create(
conversion_types=["new_subscriber", "new_transaction"],
smart_link_scope="campaign_specific",
- url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}",
)
assert_matches_type(SmartLinkPostbackCreateResponse, smart_link_postback, path=["response"])
@@ -39,7 +39,15 @@ def test_method_create_with_all_params(self, client: OnlyFansAPI) -> None:
smart_link_postback = client.smart_link_postbacks.create(
conversion_types=["new_subscriber", "new_transaction"],
smart_link_scope="campaign_specific",
- url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}",
+ body='{"click_id":"{click_id}","value":"{amount_gross}"}',
+ headers=[
+ {
+ "name": "Authorization",
+ "value": "Bearer token",
+ }
+ ],
+ http_method="POST",
smart_link_ids=["01JTESTLINK000000000000001"],
)
assert_matches_type(SmartLinkPostbackCreateResponse, smart_link_postback, path=["response"])
@@ -50,7 +58,7 @@ def test_raw_response_create(self, client: OnlyFansAPI) -> None:
response = client.smart_link_postbacks.with_raw_response.create(
conversion_types=["new_subscriber", "new_transaction"],
smart_link_scope="campaign_specific",
- url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}",
)
assert response.is_closed is True
@@ -64,7 +72,7 @@ def test_streaming_response_create(self, client: OnlyFansAPI) -> None:
with client.smart_link_postbacks.with_streaming_response.create(
conversion_types=["new_subscriber", "new_transaction"],
smart_link_scope="campaign_specific",
- url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -115,7 +123,7 @@ def test_method_update(self, client: OnlyFansAPI) -> None:
postback_id=123,
conversion_types=["new_subscriber"],
smart_link_scope="global",
- url="https://example.com/postback?click={click_id}&type={conversion_type}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}",
)
assert_matches_type(SmartLinkPostbackUpdateResponse, smart_link_postback, path=["response"])
@@ -126,7 +134,15 @@ def test_method_update_with_all_params(self, client: OnlyFansAPI) -> None:
postback_id=123,
conversion_types=["new_subscriber"],
smart_link_scope="global",
- url="https://example.com/postback?click={click_id}&type={conversion_type}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}",
+ body='{"click_id":"{click_id}","value":"{amount_gross}"}',
+ headers=[
+ {
+ "name": "Authorization",
+ "value": "Bearer token",
+ }
+ ],
+ http_method="POST",
smart_link_ids=["01JTESTLINK000000000000001"],
)
assert_matches_type(SmartLinkPostbackUpdateResponse, smart_link_postback, path=["response"])
@@ -138,7 +154,7 @@ def test_raw_response_update(self, client: OnlyFansAPI) -> None:
postback_id=123,
conversion_types=["new_subscriber"],
smart_link_scope="global",
- url="https://example.com/postback?click={click_id}&type={conversion_type}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}",
)
assert response.is_closed is True
@@ -153,7 +169,7 @@ def test_streaming_response_update(self, client: OnlyFansAPI) -> None:
postback_id=123,
conversion_types=["new_subscriber"],
smart_link_scope="global",
- url="https://example.com/postback?click={click_id}&type={conversion_type}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -237,7 +253,7 @@ async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link_postback = await async_client.smart_link_postbacks.create(
conversion_types=["new_subscriber", "new_transaction"],
smart_link_scope="campaign_specific",
- url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}",
)
assert_matches_type(SmartLinkPostbackCreateResponse, smart_link_postback, path=["response"])
@@ -247,7 +263,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncOnlyFansAP
smart_link_postback = await async_client.smart_link_postbacks.create(
conversion_types=["new_subscriber", "new_transaction"],
smart_link_scope="campaign_specific",
- url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}",
+ body='{"click_id":"{click_id}","value":"{amount_gross}"}',
+ headers=[
+ {
+ "name": "Authorization",
+ "value": "Bearer token",
+ }
+ ],
+ http_method="POST",
smart_link_ids=["01JTESTLINK000000000000001"],
)
assert_matches_type(SmartLinkPostbackCreateResponse, smart_link_postback, path=["response"])
@@ -258,7 +282,7 @@ async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None
response = await async_client.smart_link_postbacks.with_raw_response.create(
conversion_types=["new_subscriber", "new_transaction"],
smart_link_scope="campaign_specific",
- url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}",
)
assert response.is_closed is True
@@ -272,7 +296,7 @@ async def test_streaming_response_create(self, async_client: AsyncOnlyFansAPI) -
async with async_client.smart_link_postbacks.with_streaming_response.create(
conversion_types=["new_subscriber", "new_transaction"],
smart_link_scope="campaign_specific",
- url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -323,7 +347,7 @@ async def test_method_update(self, async_client: AsyncOnlyFansAPI) -> None:
postback_id=123,
conversion_types=["new_subscriber"],
smart_link_scope="global",
- url="https://example.com/postback?click={click_id}&type={conversion_type}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}",
)
assert_matches_type(SmartLinkPostbackUpdateResponse, smart_link_postback, path=["response"])
@@ -334,7 +358,15 @@ async def test_method_update_with_all_params(self, async_client: AsyncOnlyFansAP
postback_id=123,
conversion_types=["new_subscriber"],
smart_link_scope="global",
- url="https://example.com/postback?click={click_id}&type={conversion_type}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}",
+ body='{"click_id":"{click_id}","value":"{amount_gross}"}',
+ headers=[
+ {
+ "name": "Authorization",
+ "value": "Bearer token",
+ }
+ ],
+ http_method="POST",
smart_link_ids=["01JTESTLINK000000000000001"],
)
assert_matches_type(SmartLinkPostbackUpdateResponse, smart_link_postback, path=["response"])
@@ -346,7 +378,7 @@ async def test_raw_response_update(self, async_client: AsyncOnlyFansAPI) -> None
postback_id=123,
conversion_types=["new_subscriber"],
smart_link_scope="global",
- url="https://example.com/postback?click={click_id}&type={conversion_type}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}",
)
assert response.is_closed is True
@@ -361,7 +393,7 @@ async def test_streaming_response_update(self, async_client: AsyncOnlyFansAPI) -
postback_id=123,
conversion_types=["new_subscriber"],
smart_link_scope="global",
- url="https://example.com/postback?click={click_id}&type={conversion_type}",
+ url="https://example.com/postback?click={external_click_id}&type={conversion_type}",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/test_smart_links.py b/tests/api_resources/test_smart_links.py
index 267abb6..dfb6323 100644
--- a/tests/api_resources/test_smart_links.py
+++ b/tests/api_resources/test_smart_links.py
@@ -131,10 +131,12 @@ def test_method_list(self, client: OnlyFansAPI) -> None:
def test_method_list_with_all_params(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.list(
account_ids="acct_abc123,acct_def456",
+ filter={"tags": ["vdourbabcorxulddydttmbr"]},
limit=50,
meta_pixel_ids="1,2",
name="Instagram",
offset=0,
+ pixel_ids="1,2",
)
assert_matches_type(SmartLinkListResponse, smart_link, path=["response"])
@@ -206,7 +208,7 @@ def test_path_params_delete(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_clicks(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.list_clicks(
- smart_link_id="illum",
+ smart_link_id="culpa",
)
assert_matches_type(SmartLinkListClicksResponse, smart_link, path=["response"])
@@ -214,7 +216,7 @@ def test_method_list_clicks(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_clicks_with_all_params(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.list_clicks(
- smart_link_id="illum",
+ smart_link_id="culpa",
date_end="2026-01-07T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
include_bots=True,
@@ -228,7 +230,7 @@ def test_method_list_clicks_with_all_params(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_list_clicks(self, client: OnlyFansAPI) -> None:
response = client.smart_links.with_raw_response.list_clicks(
- smart_link_id="illum",
+ smart_link_id="culpa",
)
assert response.is_closed is True
@@ -240,7 +242,7 @@ def test_raw_response_list_clicks(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_list_clicks(self, client: OnlyFansAPI) -> None:
with client.smart_links.with_streaming_response.list_clicks(
- smart_link_id="illum",
+ smart_link_id="culpa",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -262,7 +264,7 @@ def test_path_params_list_clicks(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_conversions(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.list_conversions(
- smart_link_id="fugiat",
+ smart_link_id="nemo",
)
assert_matches_type(SmartLinkListConversionsResponse, smart_link, path=["response"])
@@ -270,7 +272,7 @@ def test_method_list_conversions(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_conversions_with_all_params(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.list_conversions(
- smart_link_id="fugiat",
+ smart_link_id="nemo",
conversion_type="new_transaction",
date_end="2026-01-07T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
@@ -286,7 +288,7 @@ def test_method_list_conversions_with_all_params(self, client: OnlyFansAPI) -> N
@parametrize
def test_raw_response_list_conversions(self, client: OnlyFansAPI) -> None:
response = client.smart_links.with_raw_response.list_conversions(
- smart_link_id="fugiat",
+ smart_link_id="nemo",
)
assert response.is_closed is True
@@ -298,7 +300,7 @@ def test_raw_response_list_conversions(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_list_conversions(self, client: OnlyFansAPI) -> None:
with client.smart_links.with_streaming_response.list_conversions(
- smart_link_id="fugiat",
+ smart_link_id="nemo",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -320,7 +322,7 @@ def test_path_params_list_conversions(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_fans(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.list_fans(
- smart_link_id="autem",
+ smart_link_id="ab",
)
assert_matches_type(SmartLinkListFansResponse, smart_link, path=["response"])
@@ -328,7 +330,7 @@ def test_method_list_fans(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_fans_with_all_params(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.list_fans(
- smart_link_id="autem",
+ smart_link_id="ab",
has_messages=True,
limit=100,
min_messages_sent_by_fan=3,
@@ -343,7 +345,7 @@ def test_method_list_fans_with_all_params(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_list_fans(self, client: OnlyFansAPI) -> None:
response = client.smart_links.with_raw_response.list_fans(
- smart_link_id="autem",
+ smart_link_id="ab",
)
assert response.is_closed is True
@@ -355,7 +357,7 @@ def test_raw_response_list_fans(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_list_fans(self, client: OnlyFansAPI) -> None:
with client.smart_links.with_streaming_response.list_fans(
- smart_link_id="autem",
+ smart_link_id="ab",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -377,7 +379,7 @@ def test_path_params_list_fans(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_spenders(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.list_spenders(
- smart_link_id="cum",
+ smart_link_id="nobis",
)
assert_matches_type(SmartLinkListSpendersResponse, smart_link, path=["response"])
@@ -385,7 +387,7 @@ def test_method_list_spenders(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_spenders_with_all_params(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.list_spenders(
- smart_link_id="cum",
+ smart_link_id="nobis",
limit=50,
min_spend=1,
offset=0,
@@ -396,7 +398,7 @@ def test_method_list_spenders_with_all_params(self, client: OnlyFansAPI) -> None
@parametrize
def test_raw_response_list_spenders(self, client: OnlyFansAPI) -> None:
response = client.smart_links.with_raw_response.list_spenders(
- smart_link_id="cum",
+ smart_link_id="nobis",
)
assert response.is_closed is True
@@ -408,7 +410,7 @@ def test_raw_response_list_spenders(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_list_spenders(self, client: OnlyFansAPI) -> None:
with client.smart_links.with_streaming_response.list_spenders(
- smart_link_id="cum",
+ smart_link_id="nobis",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -430,7 +432,7 @@ def test_path_params_list_spenders(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.retrieve_cohort_arps(
- smart_link_id="consequatur",
+ smart_link_id="praesentium",
)
assert smart_link is None
@@ -438,7 +440,7 @@ def test_method_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve_cohort_arps_with_all_params(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.retrieve_cohort_arps(
- smart_link_id="consequatur",
+ smart_link_id="praesentium",
acquisition_end="2026-01-31T23:59:59Z",
acquisition_start="2026-01-01T00:00:00Z",
revenue_basis="net",
@@ -449,7 +451,7 @@ def test_method_retrieve_cohort_arps_with_all_params(self, client: OnlyFansAPI)
@parametrize
def test_raw_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
response = client.smart_links.with_raw_response.retrieve_cohort_arps(
- smart_link_id="consequatur",
+ smart_link_id="praesentium",
)
assert response.is_closed is True
@@ -461,7 +463,7 @@ def test_raw_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
with client.smart_links.with_streaming_response.retrieve_cohort_arps(
- smart_link_id="consequatur",
+ smart_link_id="praesentium",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -483,7 +485,7 @@ def test_path_params_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve_stats(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.retrieve_stats(
- smart_link_id="et",
+ smart_link_id="quo",
)
assert_matches_type(SmartLinkRetrieveStatsResponse, smart_link, path=["response"])
@@ -491,7 +493,7 @@ def test_method_retrieve_stats(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve_stats_with_all_params(self, client: OnlyFansAPI) -> None:
smart_link = client.smart_links.retrieve_stats(
- smart_link_id="et",
+ smart_link_id="quo",
date_end="2026-01-31T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
)
@@ -501,7 +503,7 @@ def test_method_retrieve_stats_with_all_params(self, client: OnlyFansAPI) -> Non
@parametrize
def test_raw_response_retrieve_stats(self, client: OnlyFansAPI) -> None:
response = client.smart_links.with_raw_response.retrieve_stats(
- smart_link_id="et",
+ smart_link_id="quo",
)
assert response.is_closed is True
@@ -513,7 +515,7 @@ def test_raw_response_retrieve_stats(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_retrieve_stats(self, client: OnlyFansAPI) -> None:
with client.smart_links.with_streaming_response.retrieve_stats(
- smart_link_id="et",
+ smart_link_id="quo",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -641,10 +643,12 @@ async def test_method_list(self, async_client: AsyncOnlyFansAPI) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.list(
account_ids="acct_abc123,acct_def456",
+ filter={"tags": ["vdourbabcorxulddydttmbr"]},
limit=50,
meta_pixel_ids="1,2",
name="Instagram",
offset=0,
+ pixel_ids="1,2",
)
assert_matches_type(SmartLinkListResponse, smart_link, path=["response"])
@@ -716,7 +720,7 @@ async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_list_clicks(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.list_clicks(
- smart_link_id="illum",
+ smart_link_id="culpa",
)
assert_matches_type(SmartLinkListClicksResponse, smart_link, path=["response"])
@@ -724,7 +728,7 @@ async def test_method_list_clicks(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_list_clicks_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.list_clicks(
- smart_link_id="illum",
+ smart_link_id="culpa",
date_end="2026-01-07T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
include_bots=True,
@@ -738,7 +742,7 @@ async def test_method_list_clicks_with_all_params(self, async_client: AsyncOnlyF
@parametrize
async def test_raw_response_list_clicks(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.smart_links.with_raw_response.list_clicks(
- smart_link_id="illum",
+ smart_link_id="culpa",
)
assert response.is_closed is True
@@ -750,7 +754,7 @@ async def test_raw_response_list_clicks(self, async_client: AsyncOnlyFansAPI) ->
@parametrize
async def test_streaming_response_list_clicks(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.smart_links.with_streaming_response.list_clicks(
- smart_link_id="illum",
+ smart_link_id="culpa",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -772,7 +776,7 @@ async def test_path_params_list_clicks(self, async_client: AsyncOnlyFansAPI) ->
@parametrize
async def test_method_list_conversions(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.list_conversions(
- smart_link_id="fugiat",
+ smart_link_id="nemo",
)
assert_matches_type(SmartLinkListConversionsResponse, smart_link, path=["response"])
@@ -780,7 +784,7 @@ async def test_method_list_conversions(self, async_client: AsyncOnlyFansAPI) ->
@parametrize
async def test_method_list_conversions_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.list_conversions(
- smart_link_id="fugiat",
+ smart_link_id="nemo",
conversion_type="new_transaction",
date_end="2026-01-07T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
@@ -796,7 +800,7 @@ async def test_method_list_conversions_with_all_params(self, async_client: Async
@parametrize
async def test_raw_response_list_conversions(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.smart_links.with_raw_response.list_conversions(
- smart_link_id="fugiat",
+ smart_link_id="nemo",
)
assert response.is_closed is True
@@ -808,7 +812,7 @@ async def test_raw_response_list_conversions(self, async_client: AsyncOnlyFansAP
@parametrize
async def test_streaming_response_list_conversions(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.smart_links.with_streaming_response.list_conversions(
- smart_link_id="fugiat",
+ smart_link_id="nemo",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -830,7 +834,7 @@ async def test_path_params_list_conversions(self, async_client: AsyncOnlyFansAPI
@parametrize
async def test_method_list_fans(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.list_fans(
- smart_link_id="autem",
+ smart_link_id="ab",
)
assert_matches_type(SmartLinkListFansResponse, smart_link, path=["response"])
@@ -838,7 +842,7 @@ async def test_method_list_fans(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_list_fans_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.list_fans(
- smart_link_id="autem",
+ smart_link_id="ab",
has_messages=True,
limit=100,
min_messages_sent_by_fan=3,
@@ -853,7 +857,7 @@ async def test_method_list_fans_with_all_params(self, async_client: AsyncOnlyFan
@parametrize
async def test_raw_response_list_fans(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.smart_links.with_raw_response.list_fans(
- smart_link_id="autem",
+ smart_link_id="ab",
)
assert response.is_closed is True
@@ -865,7 +869,7 @@ async def test_raw_response_list_fans(self, async_client: AsyncOnlyFansAPI) -> N
@parametrize
async def test_streaming_response_list_fans(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.smart_links.with_streaming_response.list_fans(
- smart_link_id="autem",
+ smart_link_id="ab",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -887,7 +891,7 @@ async def test_path_params_list_fans(self, async_client: AsyncOnlyFansAPI) -> No
@parametrize
async def test_method_list_spenders(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.list_spenders(
- smart_link_id="cum",
+ smart_link_id="nobis",
)
assert_matches_type(SmartLinkListSpendersResponse, smart_link, path=["response"])
@@ -895,7 +899,7 @@ async def test_method_list_spenders(self, async_client: AsyncOnlyFansAPI) -> Non
@parametrize
async def test_method_list_spenders_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.list_spenders(
- smart_link_id="cum",
+ smart_link_id="nobis",
limit=50,
min_spend=1,
offset=0,
@@ -906,7 +910,7 @@ async def test_method_list_spenders_with_all_params(self, async_client: AsyncOnl
@parametrize
async def test_raw_response_list_spenders(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.smart_links.with_raw_response.list_spenders(
- smart_link_id="cum",
+ smart_link_id="nobis",
)
assert response.is_closed is True
@@ -918,7 +922,7 @@ async def test_raw_response_list_spenders(self, async_client: AsyncOnlyFansAPI)
@parametrize
async def test_streaming_response_list_spenders(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.smart_links.with_streaming_response.list_spenders(
- smart_link_id="cum",
+ smart_link_id="nobis",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -940,7 +944,7 @@ async def test_path_params_list_spenders(self, async_client: AsyncOnlyFansAPI) -
@parametrize
async def test_method_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.retrieve_cohort_arps(
- smart_link_id="consequatur",
+ smart_link_id="praesentium",
)
assert smart_link is None
@@ -948,7 +952,7 @@ async def test_method_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI)
@parametrize
async def test_method_retrieve_cohort_arps_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.retrieve_cohort_arps(
- smart_link_id="consequatur",
+ smart_link_id="praesentium",
acquisition_end="2026-01-31T23:59:59Z",
acquisition_start="2026-01-01T00:00:00Z",
revenue_basis="net",
@@ -959,7 +963,7 @@ async def test_method_retrieve_cohort_arps_with_all_params(self, async_client: A
@parametrize
async def test_raw_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.smart_links.with_raw_response.retrieve_cohort_arps(
- smart_link_id="consequatur",
+ smart_link_id="praesentium",
)
assert response.is_closed is True
@@ -971,7 +975,7 @@ async def test_raw_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFa
@parametrize
async def test_streaming_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.smart_links.with_streaming_response.retrieve_cohort_arps(
- smart_link_id="consequatur",
+ smart_link_id="praesentium",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -993,7 +997,7 @@ async def test_path_params_retrieve_cohort_arps(self, async_client: AsyncOnlyFan
@parametrize
async def test_method_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.retrieve_stats(
- smart_link_id="et",
+ smart_link_id="quo",
)
assert_matches_type(SmartLinkRetrieveStatsResponse, smart_link, path=["response"])
@@ -1001,7 +1005,7 @@ async def test_method_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> No
@parametrize
async def test_method_retrieve_stats_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
smart_link = await async_client.smart_links.retrieve_stats(
- smart_link_id="et",
+ smart_link_id="quo",
date_end="2026-01-31T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
)
@@ -1011,7 +1015,7 @@ async def test_method_retrieve_stats_with_all_params(self, async_client: AsyncOn
@parametrize
async def test_raw_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.smart_links.with_raw_response.retrieve_stats(
- smart_link_id="et",
+ smart_link_id="quo",
)
assert response.is_closed is True
@@ -1023,7 +1027,7 @@ async def test_raw_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI)
@parametrize
async def test_streaming_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.smart_links.with_streaming_response.retrieve_stats(
- smart_link_id="et",
+ smart_link_id="quo",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/test_stored.py b/tests/api_resources/test_stored.py
index 39aab6d..09e171f 100644
--- a/tests/api_resources/test_stored.py
+++ b/tests/api_resources/test_stored.py
@@ -36,8 +36,8 @@ def test_method_list_shared_tracking_links_with_all_params(self, client: OnlyFan
stored = client.stored.list_shared_tracking_links(
account="acct_XXXXXXXXXXXXXXX",
filter={
- "search": "wawukmfhpsfhwlhgdjcyu",
- "tags": ["iizfurnvqqubrcpiuiou"],
+ "search": "ry",
+ "tags": ["cjemwamcbtyr"],
},
limit=10,
offset=0,
@@ -92,8 +92,8 @@ def test_method_list_shared_trial_links_with_all_params(self, client: OnlyFansAP
stored = client.stored.list_shared_trial_links(
account="acct_XXXXXXXXXXXXXXX",
filter={
- "search": "wqhvnrc",
- "tags": ["uul"],
+ "search": "njigsjwdljnxqrcj",
+ "tags": ["vbhnpixelrgucwsizwpddy"],
},
limit=10,
offset=0,
@@ -149,8 +149,8 @@ def test_method_list_tracking_links_with_all_params(self, client: OnlyFansAPI) -
account="acct_XXXXXXXXXXXXXXX",
filter={
"include_smart_links": False,
- "search": "pbtzgckzvatqptslffi",
- "tags": ["retewknszoajldmmjdmbfwi"],
+ "search": "iexiqorn",
+ "tags": ["gxzdfmlureiljunfswc"],
},
limit=10,
offset=0,
@@ -206,8 +206,8 @@ def test_method_list_trial_links_with_all_params(self, client: OnlyFansAPI) -> N
account="acct_XXXXXXXXXXXXXXX",
filter={
"include_smart_links": False,
- "search": "aazxbzoyffqvxas",
- "tags": ["mbztc"],
+ "search": "x",
+ "tags": ["nkxovprx"],
},
limit=10,
offset=0,
@@ -268,8 +268,8 @@ async def test_method_list_shared_tracking_links_with_all_params(self, async_cli
stored = await async_client.stored.list_shared_tracking_links(
account="acct_XXXXXXXXXXXXXXX",
filter={
- "search": "wawukmfhpsfhwlhgdjcyu",
- "tags": ["iizfurnvqqubrcpiuiou"],
+ "search": "ry",
+ "tags": ["cjemwamcbtyr"],
},
limit=10,
offset=0,
@@ -324,8 +324,8 @@ async def test_method_list_shared_trial_links_with_all_params(self, async_client
stored = await async_client.stored.list_shared_trial_links(
account="acct_XXXXXXXXXXXXXXX",
filter={
- "search": "wqhvnrc",
- "tags": ["uul"],
+ "search": "njigsjwdljnxqrcj",
+ "tags": ["vbhnpixelrgucwsizwpddy"],
},
limit=10,
offset=0,
@@ -381,8 +381,8 @@ async def test_method_list_tracking_links_with_all_params(self, async_client: As
account="acct_XXXXXXXXXXXXXXX",
filter={
"include_smart_links": False,
- "search": "pbtzgckzvatqptslffi",
- "tags": ["retewknszoajldmmjdmbfwi"],
+ "search": "iexiqorn",
+ "tags": ["gxzdfmlureiljunfswc"],
},
limit=10,
offset=0,
@@ -438,8 +438,8 @@ async def test_method_list_trial_links_with_all_params(self, async_client: Async
account="acct_XXXXXXXXXXXXXXX",
filter={
"include_smart_links": False,
- "search": "aazxbzoyffqvxas",
- "tags": ["mbztc"],
+ "search": "x",
+ "tags": ["nkxovprx"],
},
limit=10,
offset=0,
diff --git a/tests/api_resources/test_tracking_links.py b/tests/api_resources/test_tracking_links.py
index 41243f2..b057b66 100644
--- a/tests/api_resources/test_tracking_links.py
+++ b/tests/api_resources/test_tracking_links.py
@@ -85,7 +85,7 @@ def test_path_params_create(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve(self, client: OnlyFansAPI) -> None:
tracking_link = client.tracking_links.retrieve(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrackingLinkRetrieveResponse, tracking_link, path=["response"])
@@ -94,7 +94,7 @@ def test_method_retrieve(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_retrieve(self, client: OnlyFansAPI) -> None:
response = client.tracking_links.with_raw_response.retrieve(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -107,7 +107,7 @@ def test_raw_response_retrieve(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_retrieve(self, client: OnlyFansAPI) -> None:
with client.tracking_links.with_streaming_response.retrieve(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -123,7 +123,7 @@ def test_streaming_response_retrieve(self, client: OnlyFansAPI) -> None:
def test_path_params_retrieve(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.tracking_links.with_raw_response.retrieve(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="",
)
@@ -195,7 +195,7 @@ def test_path_params_list(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_delete(self, client: OnlyFansAPI) -> None:
tracking_link = client.tracking_links.delete(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrackingLinkDeleteResponse, tracking_link, path=["response"])
@@ -204,7 +204,7 @@ def test_method_delete(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_delete(self, client: OnlyFansAPI) -> None:
response = client.tracking_links.with_raw_response.delete(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -217,7 +217,7 @@ def test_raw_response_delete(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_delete(self, client: OnlyFansAPI) -> None:
with client.tracking_links.with_streaming_response.delete(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -233,7 +233,7 @@ def test_streaming_response_delete(self, client: OnlyFansAPI) -> None:
def test_path_params_delete(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.tracking_links.with_raw_response.delete(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="",
)
@@ -247,7 +247,7 @@ def test_path_params_delete(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_get_cohort_arps(self, client: OnlyFansAPI) -> None:
tracking_link = client.tracking_links.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="acct_XXXXXXXXXXXXXXX",
)
assert tracking_link is None
@@ -256,7 +256,7 @@ def test_method_get_cohort_arps(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_get_cohort_arps_with_all_params(self, client: OnlyFansAPI) -> None:
tracking_link = client.tracking_links.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="acct_XXXXXXXXXXXXXXX",
acquisition_end="2026-01-31T23:59:59Z",
acquisition_start="2026-01-01T00:00:00Z",
@@ -268,7 +268,7 @@ def test_method_get_cohort_arps_with_all_params(self, client: OnlyFansAPI) -> No
@parametrize
def test_raw_response_get_cohort_arps(self, client: OnlyFansAPI) -> None:
response = client.tracking_links.with_raw_response.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -281,7 +281,7 @@ def test_raw_response_get_cohort_arps(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_get_cohort_arps(self, client: OnlyFansAPI) -> None:
with client.tracking_links.with_streaming_response.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -297,7 +297,7 @@ def test_streaming_response_get_cohort_arps(self, client: OnlyFansAPI) -> None:
def test_path_params_get_cohort_arps(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.tracking_links.with_raw_response.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="",
)
@@ -311,7 +311,7 @@ def test_path_params_get_cohort_arps(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_get_stats(self, client: OnlyFansAPI) -> None:
tracking_link = client.tracking_links.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrackingLinkGetStatsResponse, tracking_link, path=["response"])
@@ -320,7 +320,7 @@ def test_method_get_stats(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_get_stats_with_all_params(self, client: OnlyFansAPI) -> None:
tracking_link = client.tracking_links.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="acct_XXXXXXXXXXXXXXX",
date_end="2026-01-31T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
@@ -331,7 +331,7 @@ def test_method_get_stats_with_all_params(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_get_stats(self, client: OnlyFansAPI) -> None:
response = client.tracking_links.with_raw_response.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -344,7 +344,7 @@ def test_raw_response_get_stats(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_get_stats(self, client: OnlyFansAPI) -> None:
with client.tracking_links.with_streaming_response.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -360,7 +360,7 @@ def test_streaming_response_get_stats(self, client: OnlyFansAPI) -> None:
def test_path_params_get_stats(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.tracking_links.with_raw_response.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="",
)
@@ -562,7 +562,7 @@ async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
tracking_link = await async_client.tracking_links.retrieve(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrackingLinkRetrieveResponse, tracking_link, path=["response"])
@@ -571,7 +571,7 @@ async def test_method_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.tracking_links.with_raw_response.retrieve(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -584,7 +584,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> No
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.tracking_links.with_streaming_response.retrieve(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -600,7 +600,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncOnlyFansAPI)
async def test_path_params_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.tracking_links.with_raw_response.retrieve(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="",
)
@@ -672,7 +672,7 @@ async def test_path_params_list(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_delete(self, async_client: AsyncOnlyFansAPI) -> None:
tracking_link = await async_client.tracking_links.delete(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrackingLinkDeleteResponse, tracking_link, path=["response"])
@@ -681,7 +681,7 @@ async def test_method_delete(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_raw_response_delete(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.tracking_links.with_raw_response.delete(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -694,7 +694,7 @@ async def test_raw_response_delete(self, async_client: AsyncOnlyFansAPI) -> None
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.tracking_links.with_streaming_response.delete(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -710,7 +710,7 @@ async def test_streaming_response_delete(self, async_client: AsyncOnlyFansAPI) -
async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.tracking_links.with_raw_response.delete(
- tracking_link_id="consectetur",
+ tracking_link_id="tempora",
account="",
)
@@ -724,7 +724,7 @@ async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
tracking_link = await async_client.tracking_links.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="acct_XXXXXXXXXXXXXXX",
)
assert tracking_link is None
@@ -733,7 +733,7 @@ async def test_method_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> N
@parametrize
async def test_method_get_cohort_arps_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
tracking_link = await async_client.tracking_links.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="acct_XXXXXXXXXXXXXXX",
acquisition_end="2026-01-31T23:59:59Z",
acquisition_start="2026-01-01T00:00:00Z",
@@ -745,7 +745,7 @@ async def test_method_get_cohort_arps_with_all_params(self, async_client: AsyncO
@parametrize
async def test_raw_response_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.tracking_links.with_raw_response.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -758,7 +758,7 @@ async def test_raw_response_get_cohort_arps(self, async_client: AsyncOnlyFansAPI
@parametrize
async def test_streaming_response_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.tracking_links.with_streaming_response.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -774,7 +774,7 @@ async def test_streaming_response_get_cohort_arps(self, async_client: AsyncOnlyF
async def test_path_params_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.tracking_links.with_raw_response.get_cohort_arps(
- tracking_link_id="ratione",
+ tracking_link_id="rerum",
account="",
)
@@ -788,7 +788,7 @@ async def test_path_params_get_cohort_arps(self, async_client: AsyncOnlyFansAPI)
@parametrize
async def test_method_get_stats(self, async_client: AsyncOnlyFansAPI) -> None:
tracking_link = await async_client.tracking_links.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrackingLinkGetStatsResponse, tracking_link, path=["response"])
@@ -797,7 +797,7 @@ async def test_method_get_stats(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_get_stats_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
tracking_link = await async_client.tracking_links.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="acct_XXXXXXXXXXXXXXX",
date_end="2026-01-31T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
@@ -808,7 +808,7 @@ async def test_method_get_stats_with_all_params(self, async_client: AsyncOnlyFan
@parametrize
async def test_raw_response_get_stats(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.tracking_links.with_raw_response.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -821,7 +821,7 @@ async def test_raw_response_get_stats(self, async_client: AsyncOnlyFansAPI) -> N
@parametrize
async def test_streaming_response_get_stats(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.tracking_links.with_streaming_response.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -837,7 +837,7 @@ async def test_streaming_response_get_stats(self, async_client: AsyncOnlyFansAPI
async def test_path_params_get_stats(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.tracking_links.with_raw_response.get_stats(
- tracking_link_id="reiciendis",
+ tracking_link_id="in",
account="",
)
diff --git a/tests/api_resources/test_trial_links.py b/tests/api_resources/test_trial_links.py
index 2b6fc57..913cbd5 100644
--- a/tests/api_resources/test_trial_links.py
+++ b/tests/api_resources/test_trial_links.py
@@ -96,7 +96,7 @@ def test_path_params_create(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve(self, client: OnlyFansAPI) -> None:
trial_link = client.trial_links.retrieve(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrialLinkRetrieveResponse, trial_link, path=["response"])
@@ -105,7 +105,7 @@ def test_method_retrieve(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_retrieve(self, client: OnlyFansAPI) -> None:
response = client.trial_links.with_raw_response.retrieve(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -118,7 +118,7 @@ def test_raw_response_retrieve(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_retrieve(self, client: OnlyFansAPI) -> None:
with client.trial_links.with_streaming_response.retrieve(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -134,7 +134,7 @@ def test_streaming_response_retrieve(self, client: OnlyFansAPI) -> None:
def test_path_params_retrieve(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.trial_links.with_raw_response.retrieve(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="",
)
@@ -211,7 +211,7 @@ def test_path_params_list(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_delete(self, client: OnlyFansAPI) -> None:
trial_link = client.trial_links.delete(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrialLinkDeleteResponse, trial_link, path=["response"])
@@ -220,7 +220,7 @@ def test_method_delete(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_delete(self, client: OnlyFansAPI) -> None:
response = client.trial_links.with_raw_response.delete(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -233,7 +233,7 @@ def test_raw_response_delete(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_delete(self, client: OnlyFansAPI) -> None:
with client.trial_links.with_streaming_response.delete(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -249,7 +249,7 @@ def test_streaming_response_delete(self, client: OnlyFansAPI) -> None:
def test_path_params_delete(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.trial_links.with_raw_response.delete(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="",
)
@@ -327,7 +327,7 @@ def test_path_params_list_spenders(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_list_subscribers(self, client: OnlyFansAPI) -> None:
trial_link = client.trial_links.list_subscribers(
- trial_link_id="ut",
+ trial_link_id="iusto",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
offset=0,
@@ -338,7 +338,7 @@ def test_method_list_subscribers(self, client: OnlyFansAPI) -> None:
@parametrize
def test_raw_response_list_subscribers(self, client: OnlyFansAPI) -> None:
response = client.trial_links.with_raw_response.list_subscribers(
- trial_link_id="ut",
+ trial_link_id="iusto",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
offset=0,
@@ -353,7 +353,7 @@ def test_raw_response_list_subscribers(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_list_subscribers(self, client: OnlyFansAPI) -> None:
with client.trial_links.with_streaming_response.list_subscribers(
- trial_link_id="ut",
+ trial_link_id="iusto",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
offset=0,
@@ -371,7 +371,7 @@ def test_streaming_response_list_subscribers(self, client: OnlyFansAPI) -> None:
def test_path_params_list_subscribers(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.trial_links.with_raw_response.list_subscribers(
- trial_link_id="ut",
+ trial_link_id="iusto",
account="",
limit=10,
offset=0,
@@ -389,7 +389,7 @@ def test_path_params_list_subscribers(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
trial_link = client.trial_links.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="acct_XXXXXXXXXXXXXXX",
)
assert trial_link is None
@@ -398,7 +398,7 @@ def test_method_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve_cohort_arps_with_all_params(self, client: OnlyFansAPI) -> None:
trial_link = client.trial_links.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="acct_XXXXXXXXXXXXXXX",
acquisition_end="2026-01-31T23:59:59Z",
acquisition_start="2026-01-01T00:00:00Z",
@@ -410,7 +410,7 @@ def test_method_retrieve_cohort_arps_with_all_params(self, client: OnlyFansAPI)
@parametrize
def test_raw_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
response = client.trial_links.with_raw_response.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -423,7 +423,7 @@ def test_raw_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
with client.trial_links.with_streaming_response.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -439,7 +439,7 @@ def test_streaming_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> N
def test_path_params_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.trial_links.with_raw_response.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="",
)
@@ -453,7 +453,7 @@ def test_path_params_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve_stats(self, client: OnlyFansAPI) -> None:
trial_link = client.trial_links.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrialLinkRetrieveStatsResponse, trial_link, path=["response"])
@@ -462,7 +462,7 @@ def test_method_retrieve_stats(self, client: OnlyFansAPI) -> None:
@parametrize
def test_method_retrieve_stats_with_all_params(self, client: OnlyFansAPI) -> None:
trial_link = client.trial_links.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="acct_XXXXXXXXXXXXXXX",
date_end="2026-01-31T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
@@ -473,7 +473,7 @@ def test_method_retrieve_stats_with_all_params(self, client: OnlyFansAPI) -> Non
@parametrize
def test_raw_response_retrieve_stats(self, client: OnlyFansAPI) -> None:
response = client.trial_links.with_raw_response.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -486,7 +486,7 @@ def test_raw_response_retrieve_stats(self, client: OnlyFansAPI) -> None:
@parametrize
def test_streaming_response_retrieve_stats(self, client: OnlyFansAPI) -> None:
with client.trial_links.with_streaming_response.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -502,7 +502,7 @@ def test_streaming_response_retrieve_stats(self, client: OnlyFansAPI) -> None:
def test_path_params_retrieve_stats(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.trial_links.with_raw_response.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="",
)
@@ -589,7 +589,7 @@ async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
trial_link = await async_client.trial_links.retrieve(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrialLinkRetrieveResponse, trial_link, path=["response"])
@@ -598,7 +598,7 @@ async def test_method_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.trial_links.with_raw_response.retrieve(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -611,7 +611,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> No
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.trial_links.with_streaming_response.retrieve(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -627,7 +627,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncOnlyFansAPI)
async def test_path_params_retrieve(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.trial_links.with_raw_response.retrieve(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="",
)
@@ -704,7 +704,7 @@ async def test_path_params_list(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_method_delete(self, async_client: AsyncOnlyFansAPI) -> None:
trial_link = await async_client.trial_links.delete(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrialLinkDeleteResponse, trial_link, path=["response"])
@@ -713,7 +713,7 @@ async def test_method_delete(self, async_client: AsyncOnlyFansAPI) -> None:
@parametrize
async def test_raw_response_delete(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.trial_links.with_raw_response.delete(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -726,7 +726,7 @@ async def test_raw_response_delete(self, async_client: AsyncOnlyFansAPI) -> None
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.trial_links.with_streaming_response.delete(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -742,7 +742,7 @@ async def test_streaming_response_delete(self, async_client: AsyncOnlyFansAPI) -
async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.trial_links.with_raw_response.delete(
- trial_link_id="quisquam",
+ trial_link_id="adipisci",
account="",
)
@@ -820,7 +820,7 @@ async def test_path_params_list_spenders(self, async_client: AsyncOnlyFansAPI) -
@parametrize
async def test_method_list_subscribers(self, async_client: AsyncOnlyFansAPI) -> None:
trial_link = await async_client.trial_links.list_subscribers(
- trial_link_id="ut",
+ trial_link_id="iusto",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
offset=0,
@@ -831,7 +831,7 @@ async def test_method_list_subscribers(self, async_client: AsyncOnlyFansAPI) ->
@parametrize
async def test_raw_response_list_subscribers(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.trial_links.with_raw_response.list_subscribers(
- trial_link_id="ut",
+ trial_link_id="iusto",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
offset=0,
@@ -846,7 +846,7 @@ async def test_raw_response_list_subscribers(self, async_client: AsyncOnlyFansAP
@parametrize
async def test_streaming_response_list_subscribers(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.trial_links.with_streaming_response.list_subscribers(
- trial_link_id="ut",
+ trial_link_id="iusto",
account="acct_XXXXXXXXXXXXXXX",
limit=10,
offset=0,
@@ -864,7 +864,7 @@ async def test_streaming_response_list_subscribers(self, async_client: AsyncOnly
async def test_path_params_list_subscribers(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.trial_links.with_raw_response.list_subscribers(
- trial_link_id="ut",
+ trial_link_id="iusto",
account="",
limit=10,
offset=0,
@@ -882,7 +882,7 @@ async def test_path_params_list_subscribers(self, async_client: AsyncOnlyFansAPI
@parametrize
async def test_method_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
trial_link = await async_client.trial_links.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="acct_XXXXXXXXXXXXXXX",
)
assert trial_link is None
@@ -891,7 +891,7 @@ async def test_method_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI)
@parametrize
async def test_method_retrieve_cohort_arps_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
trial_link = await async_client.trial_links.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="acct_XXXXXXXXXXXXXXX",
acquisition_end="2026-01-31T23:59:59Z",
acquisition_start="2026-01-01T00:00:00Z",
@@ -903,7 +903,7 @@ async def test_method_retrieve_cohort_arps_with_all_params(self, async_client: A
@parametrize
async def test_raw_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.trial_links.with_raw_response.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -916,7 +916,7 @@ async def test_raw_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFa
@parametrize
async def test_streaming_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.trial_links.with_streaming_response.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -932,7 +932,7 @@ async def test_streaming_response_retrieve_cohort_arps(self, async_client: Async
async def test_path_params_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.trial_links.with_raw_response.retrieve_cohort_arps(
- trial_link_id="sapiente",
+ trial_link_id="minus",
account="",
)
@@ -946,7 +946,7 @@ async def test_path_params_retrieve_cohort_arps(self, async_client: AsyncOnlyFan
@parametrize
async def test_method_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None:
trial_link = await async_client.trial_links.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="acct_XXXXXXXXXXXXXXX",
)
assert_matches_type(TrialLinkRetrieveStatsResponse, trial_link, path=["response"])
@@ -955,7 +955,7 @@ async def test_method_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> No
@parametrize
async def test_method_retrieve_stats_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None:
trial_link = await async_client.trial_links.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="acct_XXXXXXXXXXXXXXX",
date_end="2026-01-31T23:59:59Z",
date_start="2026-01-01T00:00:00Z",
@@ -966,7 +966,7 @@ async def test_method_retrieve_stats_with_all_params(self, async_client: AsyncOn
@parametrize
async def test_raw_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.trial_links.with_raw_response.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="acct_XXXXXXXXXXXXXXX",
)
@@ -979,7 +979,7 @@ async def test_raw_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI)
@parametrize
async def test_streaming_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.trial_links.with_streaming_response.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="acct_XXXXXXXXXXXXXXX",
) as response:
assert not response.is_closed
@@ -995,7 +995,7 @@ async def test_streaming_response_retrieve_stats(self, async_client: AsyncOnlyFa
async def test_path_params_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.trial_links.with_raw_response.retrieve_stats(
- trial_link_id="esse",
+ trial_link_id="ut",
account="",
)
diff --git a/tests/api_resources/test_user_lists.py b/tests/api_resources/test_user_lists.py
index 3675e36..3ddfe6a 100644
--- a/tests/api_resources/test_user_lists.py
+++ b/tests/api_resources/test_user_lists.py
@@ -28,7 +28,7 @@ class TestUserLists:
def test_method_create(self, client: OnlyFansAPI) -> None:
user_list = client.user_lists.create(
account="acct_XXXXXXXXXXXXXXX",
- name="qrruxylgb",
+ name="vpdeabzxzht",
)
assert_matches_type(UserListCreateResponse, user_list, path=["response"])
@@ -37,7 +37,7 @@ def test_method_create(self, client: OnlyFansAPI) -> None:
def test_raw_response_create(self, client: OnlyFansAPI) -> None:
response = client.user_lists.with_raw_response.create(
account="acct_XXXXXXXXXXXXXXX",
- name="qrruxylgb",
+ name="vpdeabzxzht",
)
assert response.is_closed is True
@@ -50,7 +50,7 @@ def test_raw_response_create(self, client: OnlyFansAPI) -> None:
def test_streaming_response_create(self, client: OnlyFansAPI) -> None:
with client.user_lists.with_streaming_response.create(
account="acct_XXXXXXXXXXXXXXX",
- name="qrruxylgb",
+ name="vpdeabzxzht",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -66,7 +66,7 @@ def test_path_params_create(self, client: OnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
client.user_lists.with_raw_response.create(
account="",
- name="qrruxylgb",
+ name="vpdeabzxzht",
)
@pytest.mark.skip(reason="Mock server tests are disabled")
@@ -304,7 +304,7 @@ class TestAsyncUserLists:
async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None:
user_list = await async_client.user_lists.create(
account="acct_XXXXXXXXXXXXXXX",
- name="qrruxylgb",
+ name="vpdeabzxzht",
)
assert_matches_type(UserListCreateResponse, user_list, path=["response"])
@@ -313,7 +313,7 @@ async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None:
async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None:
response = await async_client.user_lists.with_raw_response.create(
account="acct_XXXXXXXXXXXXXXX",
- name="qrruxylgb",
+ name="vpdeabzxzht",
)
assert response.is_closed is True
@@ -326,7 +326,7 @@ async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None
async def test_streaming_response_create(self, async_client: AsyncOnlyFansAPI) -> None:
async with async_client.user_lists.with_streaming_response.create(
account="acct_XXXXXXXXXXXXXXX",
- name="qrruxylgb",
+ name="vpdeabzxzht",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -342,7 +342,7 @@ async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"):
await async_client.user_lists.with_raw_response.create(
account="",
- name="qrruxylgb",
+ name="vpdeabzxzht",
)
@pytest.mark.skip(reason="Mock server tests are disabled")