Skip to content

Commit 985161f

Browse files
author
stlc-bot
committed
Build SDK
Stainless-Generated-From: 56c4724
1 parent e741c76 commit 985161f

16 files changed

Lines changed: 292 additions & 377 deletions

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 230
1+
configured_endpoints: 229

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ It is generated with [Stainless](https://www.stainless.com/).
1313

1414
Use the Whop MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
1515

16-
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40whop%2Fmcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB3aG9wL21jcCJdLCJlbnYiOnsiV0hPUF9BUElfS0VZIjoiTXkgQVBJIEtleSIsIldIT1BfV0VCSE9PS19TRUNSRVQiOiJNeSBXZWJob29rIEtleSIsIldIT1BfQVBQX0lEIjoiYXBwX3h4eHh4eHh4eHh4eHh4IiwiV0hPUF9BUElfVkVSU0lPTiI6IjIwMjYtMDYtMDgifX0)
17-
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40whop%2Fmcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40whop%2Fmcp%22%5D%2C%22env%22%3A%7B%22WHOP_API_KEY%22%3A%22My%20API%20Key%22%2C%22WHOP_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Key%22%2C%22WHOP_APP_ID%22%3A%22app_xxxxxxxxxxxxxx%22%2C%22WHOP_API_VERSION%22%3A%222026-06-08%22%7D%7D)
16+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40whop%2Fmcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB3aG9wL21jcCJdLCJlbnYiOnsiV0hPUF9BUElfS0VZIjoiTXkgQVBJIEtleSIsIldIT1BfV0VCSE9PS19TRUNSRVQiOiJNeSBXZWJob29rIEtleSIsIldIT1BfQVBQX0lEIjoiYXBwX3h4eHh4eHh4eHh4eHh4In19)
17+
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40whop%2Fmcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40whop%2Fmcp%22%5D%2C%22env%22%3A%7B%22WHOP_API_KEY%22%3A%22My%20API%20Key%22%2C%22WHOP_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Key%22%2C%22WHOP_APP_ID%22%3A%22app_xxxxxxxxxxxxxx%22%7D%7D)
1818

1919
> Note: You may need to set environment variables in your MCP client.
2020

‎api.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,16 +387,15 @@ Methods:
387387
Types:
388388

389389
```python
390-
from whop_sdk.types import User, UserCheckAccessResponse
390+
from whop_sdk.types import User, UserListResponse, UserCheckAccessResponse
391391
```
392392

393393
Methods:
394394

395395
- <code title="get /users/{id}">client.users.<a href="./src/whop_sdk/resources/users.py">retrieve</a>(id, \*\*<a href="src/whop_sdk/types/user_retrieve_params.py">params</a>) -> <a href="./src/whop_sdk/types/user.py">User</a></code>
396396
- <code title="patch /users/{id}">client.users.<a href="./src/whop_sdk/resources/users.py">update</a>(id, \*\*<a href="src/whop_sdk/types/user_update_params.py">params</a>) -> <a href="./src/whop_sdk/types/user.py">User</a></code>
397-
- <code title="get /users">client.users.<a href="./src/whop_sdk/resources/users.py">list</a>(\*\*<a href="src/whop_sdk/types/user_list_params.py">params</a>) -> <a href="./src/whop_sdk/types/user.py">SyncCursorPage[User]</a></code>
397+
- <code title="get /users">client.users.<a href="./src/whop_sdk/resources/users.py">list</a>(\*\*<a href="src/whop_sdk/types/user_list_params.py">params</a>) -> <a href="./src/whop_sdk/types/user_list_response.py">SyncCursorPage[UserListResponse]</a></code>
398398
- <code title="get /users/{id}/access/{resource_id}">client.users.<a href="./src/whop_sdk/resources/users.py">check_access</a>(resource_id, \*, id) -> <a href="./src/whop_sdk/types/user_check_access_response.py">UserCheckAccessResponse</a></code>
399-
- <code title="patch /users/me">client.users.<a href="./src/whop_sdk/resources/users.py">update_me</a>(\*\*<a href="src/whop_sdk/types/user_update_me_params.py">params</a>) -> <a href="./src/whop_sdk/types/user.py">User</a></code>
400399

401400
# Payments
402401

‎src/whop_sdk/_client.py‎

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,13 @@ class Whop(SyncAPIClient):
180180
api_key: str
181181
webhook_key: str | None
182182
app_id: str | None
183-
version: str | None
184183

185184
def __init__(
186185
self,
187186
*,
188187
api_key: str | None = None,
189188
webhook_key: str | None = None,
190189
app_id: str | None = None,
191-
version: str | None = None,
192190
base_url: str | httpx.URL | None = None,
193191
timeout: float | Timeout | None | NotGiven = not_given,
194192
max_retries: int = DEFAULT_MAX_RETRIES,
@@ -214,7 +212,6 @@ def __init__(
214212
- `api_key` from `WHOP_API_KEY`
215213
- `webhook_key` from `WHOP_WEBHOOK_SECRET`
216214
- `app_id` from `WHOP_APP_ID`
217-
- `version` from `WHOP_API_VERSION`
218215
"""
219216
if api_key is None:
220217
api_key = os.environ.get("WHOP_API_KEY")
@@ -232,10 +229,6 @@ def __init__(
232229
app_id = os.environ.get("WHOP_APP_ID")
233230
self.app_id = app_id
234231

235-
if version is None:
236-
version = os.environ.get("WHOP_API_VERSION") or "2026-06-08"
237-
self.version = version
238-
239232
if base_url is None:
240233
base_url = os.environ.get("WHOP_BASE_URL")
241234
if base_url is None:
@@ -389,6 +382,7 @@ def chat_channels(self) -> ChatChannelsResource:
389382

390383
@cached_property
391384
def users(self) -> UsersResource:
385+
"""Users"""
392386
from .resources.users import UsersResource
393387

394388
return UsersResource(self)
@@ -729,7 +723,6 @@ def default_headers(self) -> dict[str, str | Omit]:
729723
**super().default_headers,
730724
"X-Stainless-Async": "false",
731725
"X-Whop-App-Id": self.app_id if self.app_id is not None else Omit(),
732-
"Api-Version-Date": self.version if self.version is not None else Omit(),
733726
**self._custom_headers,
734727
}
735728

@@ -739,7 +732,6 @@ def copy(
739732
api_key: str | None = None,
740733
webhook_key: str | None = None,
741734
app_id: str | None = None,
742-
version: str | None = None,
743735
base_url: str | httpx.URL | None = None,
744736
timeout: float | Timeout | None | NotGiven = not_given,
745737
http_client: httpx.Client | None = None,
@@ -776,7 +768,6 @@ def copy(
776768
api_key=api_key or self.api_key,
777769
webhook_key=webhook_key or self.webhook_key,
778770
app_id=app_id or self.app_id,
779-
version=version or self.version,
780771
base_url=base_url or self.base_url,
781772
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
782773
http_client=http_client,
@@ -829,15 +820,13 @@ class AsyncWhop(AsyncAPIClient):
829820
api_key: str
830821
webhook_key: str | None
831822
app_id: str | None
832-
version: str | None
833823

834824
def __init__(
835825
self,
836826
*,
837827
api_key: str | None = None,
838828
webhook_key: str | None = None,
839829
app_id: str | None = None,
840-
version: str | None = None,
841830
base_url: str | httpx.URL | None = None,
842831
timeout: float | Timeout | None | NotGiven = not_given,
843832
max_retries: int = DEFAULT_MAX_RETRIES,
@@ -863,7 +852,6 @@ def __init__(
863852
- `api_key` from `WHOP_API_KEY`
864853
- `webhook_key` from `WHOP_WEBHOOK_SECRET`
865854
- `app_id` from `WHOP_APP_ID`
866-
- `version` from `WHOP_API_VERSION`
867855
"""
868856
if api_key is None:
869857
api_key = os.environ.get("WHOP_API_KEY")
@@ -881,10 +869,6 @@ def __init__(
881869
app_id = os.environ.get("WHOP_APP_ID")
882870
self.app_id = app_id
883871

884-
if version is None:
885-
version = os.environ.get("WHOP_API_VERSION") or "2026-06-08"
886-
self.version = version
887-
888872
if base_url is None:
889873
base_url = os.environ.get("WHOP_BASE_URL")
890874
if base_url is None:
@@ -1038,6 +1022,7 @@ def chat_channels(self) -> AsyncChatChannelsResource:
10381022

10391023
@cached_property
10401024
def users(self) -> AsyncUsersResource:
1025+
"""Users"""
10411026
from .resources.users import AsyncUsersResource
10421027

10431028
return AsyncUsersResource(self)
@@ -1378,7 +1363,6 @@ def default_headers(self) -> dict[str, str | Omit]:
13781363
**super().default_headers,
13791364
"X-Stainless-Async": f"async:{get_async_library()}",
13801365
"X-Whop-App-Id": self.app_id if self.app_id is not None else Omit(),
1381-
"Api-Version-Date": self.version if self.version is not None else Omit(),
13821366
**self._custom_headers,
13831367
}
13841368

@@ -1388,7 +1372,6 @@ def copy(
13881372
api_key: str | None = None,
13891373
webhook_key: str | None = None,
13901374
app_id: str | None = None,
1391-
version: str | None = None,
13921375
base_url: str | httpx.URL | None = None,
13931376
timeout: float | Timeout | None | NotGiven = not_given,
13941377
http_client: httpx.AsyncClient | None = None,
@@ -1425,7 +1408,6 @@ def copy(
14251408
api_key=api_key or self.api_key,
14261409
webhook_key=webhook_key or self.webhook_key,
14271410
app_id=app_id or self.app_id,
1428-
version=version or self.version,
14291411
base_url=base_url or self.base_url,
14301412
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
14311413
http_client=http_client,
@@ -1607,6 +1589,7 @@ def chat_channels(self) -> chat_channels.ChatChannelsResourceWithRawResponse:
16071589

16081590
@cached_property
16091591
def users(self) -> users.UsersResourceWithRawResponse:
1592+
"""Users"""
16101593
from .resources.users import UsersResourceWithRawResponse
16111594

16121595
return UsersResourceWithRawResponse(self._client.users)
@@ -2058,6 +2041,7 @@ def chat_channels(self) -> chat_channels.AsyncChatChannelsResourceWithRawRespons
20582041

20592042
@cached_property
20602043
def users(self) -> users.AsyncUsersResourceWithRawResponse:
2044+
"""Users"""
20612045
from .resources.users import AsyncUsersResourceWithRawResponse
20622046

20632047
return AsyncUsersResourceWithRawResponse(self._client.users)
@@ -2511,6 +2495,7 @@ def chat_channels(self) -> chat_channels.ChatChannelsResourceWithStreamingRespon
25112495

25122496
@cached_property
25132497
def users(self) -> users.UsersResourceWithStreamingResponse:
2498+
"""Users"""
25142499
from .resources.users import UsersResourceWithStreamingResponse
25152500

25162501
return UsersResourceWithStreamingResponse(self._client.users)
@@ -2966,6 +2951,7 @@ def chat_channels(self) -> chat_channels.AsyncChatChannelsResourceWithStreamingR
29662951

29672952
@cached_property
29682953
def users(self) -> users.AsyncUsersResourceWithStreamingResponse:
2954+
"""Users"""
29692955
from .resources.users import AsyncUsersResourceWithStreamingResponse
29702956

29712957
return AsyncUsersResourceWithStreamingResponse(self._client.users)

‎src/whop_sdk/resources/conversions.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def create(
117117
118118
currency: The available currencies on the platform
119119
120-
custom_name: Custom event name when event_name is 'custom'.
120+
custom_name: Custom event name when event_name is 'custom'. Maximum 35 chars for this value.
121121
122122
duration: For 'leave' events: milliseconds the visitor spent on the page.
123123
@@ -275,7 +275,7 @@ async def create(
275275
276276
currency: The available currencies on the platform
277277
278-
custom_name: Custom event name when event_name is 'custom'.
278+
custom_name: Custom event name when event_name is 'custom'. Maximum 35 chars for this value.
279279
280280
duration: For 'leave' events: milliseconds the visitor spent on the page.
281281

0 commit comments

Comments
 (0)