Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/whopsdk-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Rye
run: |
Expand All @@ -46,7 +46,7 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/whopsdk-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Rye
run: |
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/whopsdk-python'
id: github-oidc
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand All @@ -83,7 +83,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/whopsdk-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'whopio/whopsdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check release environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.39"
".": "0.1.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 212
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc/whopsdk-da82dade0c316b9abd0320bf7b1b5f3472c265106a1c53ffbb78611eacc16617.yml
openapi_spec_hash: 2454acce3b15eaed1c5ad8554c0d4a2e
config_hash: b4bea15093f9a57475d1d98f9b8464ca
configured_endpoints: 216
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc/whopsdk-77d442782c147823e694535b49ff86e2da9fb6ffc967b4da744515d124542ee0.yml
openapi_spec_hash: 47acea152482ed8697146d2c00952aa7
config_hash: 64788a41b95ec090d1222da96d7c46d4
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 0.1.0 (2026-05-21)

Full Changelog: [v0.0.39...v0.1.0](https://github.com/whopio/whopsdk-python/compare/v0.0.39...v0.1.0)

### Features

* **api:** api update ([597a090](https://github.com/whopio/whopsdk-python/commit/597a090c3b9fb3d0c0bcbd2651cd6ed844a531dc))
* **api:** api update ([f7f9255](https://github.com/whopio/whopsdk-python/commit/f7f92557d76ebcc308c7391784e5274da99dd4ca))
* **api:** api update ([f24dd5c](https://github.com/whopio/whopsdk-python/commit/f24dd5c1ce252c81c6194563ed0f06146e0723fa))
* **api:** api update ([4329164](https://github.com/whopio/whopsdk-python/commit/4329164d5d23c20362ee2dad2cab182a2637b449))
* **api:** api update ([686383a](https://github.com/whopio/whopsdk-python/commit/686383a7a800fdcd2df43f64145d6ef0ab377406))
* **api:** api update ([d6080a2](https://github.com/whopio/whopsdk-python/commit/d6080a2aff41da44fab43334f3279d8f08a26a70))
* **api:** api update ([8debdf1](https://github.com/whopio/whopsdk-python/commit/8debdf1e3c142c5c2421351378e54c6379e49b39))
* **api:** api update ([cdbeba1](https://github.com/whopio/whopsdk-python/commit/cdbeba15f45931f55299108192063c18f3afc17e))
* **api:** api update ([341bae2](https://github.com/whopio/whopsdk-python/commit/341bae28098d3a4561569ff89a599baf85d25717))
* **api:** manual updates ([2dff73b](https://github.com/whopio/whopsdk-python/commit/2dff73ba93aa8e9108c0f1fece5ca322246095e0))

## 0.0.39 (2026-05-12)

Full Changelog: [v0.0.38...v0.0.39](https://github.com/whopio/whopsdk-python/compare/v0.0.38...v0.0.39)
Expand Down
37 changes: 18 additions & 19 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ Methods:
Types:

```python
from whop_sdk.types import UploadStatus, FileCreateResponse, FileRetrieveResponse
from whop_sdk.types import FileVisibility, UploadStatus, FileCreateResponse, FileRetrieveResponse
```

Methods:
Expand Down Expand Up @@ -1005,55 +1005,54 @@ Methods:
Types:

```python
from whop_sdk.types import (
AdCampaignRetrieveResponse,
AdCampaignUpdateResponse,
AdCampaignListResponse,
AdCampaignPauseResponse,
AdCampaignUnpauseResponse,
)
from whop_sdk.types import AdCampaign, AdCampaignPlatform, AdCampaignStatus, AdCampaignListResponse
```

Methods:

- <code title="get /ad_campaigns/{id}">client.ad_campaigns.<a href="./src/whop_sdk/resources/ad_campaigns.py">retrieve</a>(id) -> <a href="./src/whop_sdk/types/ad_campaign_retrieve_response.py">AdCampaignRetrieveResponse</a></code>
- <code title="patch /ad_campaigns/{id}">client.ad_campaigns.<a href="./src/whop_sdk/resources/ad_campaigns.py">update</a>(id, \*\*<a href="src/whop_sdk/types/ad_campaign_update_params.py">params</a>) -> <a href="./src/whop_sdk/types/ad_campaign_update_response.py">AdCampaignUpdateResponse</a></code>
- <code title="get /ad_campaigns/{id}">client.ad_campaigns.<a href="./src/whop_sdk/resources/ad_campaigns.py">retrieve</a>(id) -> <a href="./src/whop_sdk/types/ad_campaign.py">AdCampaign</a></code>
- <code title="patch /ad_campaigns/{id}">client.ad_campaigns.<a href="./src/whop_sdk/resources/ad_campaigns.py">update</a>(id, \*\*<a href="src/whop_sdk/types/ad_campaign_update_params.py">params</a>) -> <a href="./src/whop_sdk/types/ad_campaign.py">AdCampaign</a></code>
- <code title="get /ad_campaigns">client.ad_campaigns.<a href="./src/whop_sdk/resources/ad_campaigns.py">list</a>(\*\*<a href="src/whop_sdk/types/ad_campaign_list_params.py">params</a>) -> <a href="./src/whop_sdk/types/ad_campaign_list_response.py">SyncCursorPage[AdCampaignListResponse]</a></code>
- <code title="post /ad_campaigns/{id}/pause">client.ad_campaigns.<a href="./src/whop_sdk/resources/ad_campaigns.py">pause</a>(id) -> <a href="./src/whop_sdk/types/ad_campaign_pause_response.py">AdCampaignPauseResponse</a></code>
- <code title="post /ad_campaigns/{id}/unpause">client.ad_campaigns.<a href="./src/whop_sdk/resources/ad_campaigns.py">unpause</a>(id) -> <a href="./src/whop_sdk/types/ad_campaign_unpause_response.py">AdCampaignUnpauseResponse</a></code>
- <code title="post /ad_campaigns/{id}/pause">client.ad_campaigns.<a href="./src/whop_sdk/resources/ad_campaigns.py">pause</a>(id) -> <a href="./src/whop_sdk/types/ad_campaign.py">AdCampaign</a></code>
- <code title="post /ad_campaigns/{id}/unpause">client.ad_campaigns.<a href="./src/whop_sdk/resources/ad_campaigns.py">unpause</a>(id) -> <a href="./src/whop_sdk/types/ad_campaign.py">AdCampaign</a></code>

# AdGroups

Types:

```python
from whop_sdk.types import (
AdGroupRetrieveResponse,
AdGroupUpdateResponse,
AdBudgetType,
AdGroup,
AdGroupStatus,
AdGroupListResponse,
AdGroupDeleteResponse,
)
```

Methods:

- <code title="get /ad_groups/{id}">client.ad_groups.<a href="./src/whop_sdk/resources/ad_groups.py">retrieve</a>(id) -> <a href="./src/whop_sdk/types/ad_group_retrieve_response.py">AdGroupRetrieveResponse</a></code>
- <code title="patch /ad_groups/{id}">client.ad_groups.<a href="./src/whop_sdk/resources/ad_groups.py">update</a>(id, \*\*<a href="src/whop_sdk/types/ad_group_update_params.py">params</a>) -> <a href="./src/whop_sdk/types/ad_group_update_response.py">AdGroupUpdateResponse</a></code>
- <code title="get /ad_groups/{id}">client.ad_groups.<a href="./src/whop_sdk/resources/ad_groups.py">retrieve</a>(id) -> <a href="./src/whop_sdk/types/ad_group.py">AdGroup</a></code>
- <code title="patch /ad_groups/{id}">client.ad_groups.<a href="./src/whop_sdk/resources/ad_groups.py">update</a>(id, \*\*<a href="src/whop_sdk/types/ad_group_update_params.py">params</a>) -> <a href="./src/whop_sdk/types/ad_group.py">AdGroup</a></code>
- <code title="get /ad_groups">client.ad_groups.<a href="./src/whop_sdk/resources/ad_groups.py">list</a>(\*\*<a href="src/whop_sdk/types/ad_group_list_params.py">params</a>) -> <a href="./src/whop_sdk/types/ad_group_list_response.py">SyncCursorPage[AdGroupListResponse]</a></code>
- <code title="delete /ad_groups/{id}">client.ad_groups.<a href="./src/whop_sdk/resources/ad_groups.py">delete</a>(id) -> <a href="./src/whop_sdk/types/ad_group_delete_response.py">AdGroupDeleteResponse</a></code>
- <code title="post /ad_groups/{id}/pause">client.ad_groups.<a href="./src/whop_sdk/resources/ad_groups.py">pause</a>(id) -> <a href="./src/whop_sdk/types/ad_group.py">AdGroup</a></code>
- <code title="post /ad_groups/{id}/unpause">client.ad_groups.<a href="./src/whop_sdk/resources/ad_groups.py">unpause</a>(id) -> <a href="./src/whop_sdk/types/ad_group.py">AdGroup</a></code>

# Ads

Types:

```python
from whop_sdk.types import AdRetrieveResponse, AdListResponse
from whop_sdk.types import Ad, ExternalAdStatus, AdListResponse
```

Methods:

- <code title="get /ads/{id}">client.ads.<a href="./src/whop_sdk/resources/ads.py">retrieve</a>(id) -> <a href="./src/whop_sdk/types/ad_retrieve_response.py">AdRetrieveResponse</a></code>
- <code title="get /ads/{id}">client.ads.<a href="./src/whop_sdk/resources/ads.py">retrieve</a>(id) -> <a href="./src/whop_sdk/types/ad.py">Ad</a></code>
- <code title="get /ads">client.ads.<a href="./src/whop_sdk/resources/ads.py">list</a>(\*\*<a href="src/whop_sdk/types/ad_list_params.py">params</a>) -> <a href="./src/whop_sdk/types/ad_list_response.py">SyncCursorPage[AdListResponse]</a></code>
- <code title="post /ads/{id}/pause">client.ads.<a href="./src/whop_sdk/resources/ads.py">pause</a>(id) -> <a href="./src/whop_sdk/types/ad.py">Ad</a></code>
- <code title="post /ads/{id}/unpause">client.ads.<a href="./src/whop_sdk/resources/ads.py">unpause</a>(id) -> <a href="./src/whop_sdk/types/ad.py">Ad</a></code>

# Conversions

Expand All @@ -1072,7 +1071,7 @@ Methods:
Types:

```python
from whop_sdk.types import AdReportRetrieveResponse
from whop_sdk.types import Granularities, ResultLabelKeys, AdReportRetrieveResponse
```

Methods:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "whop-sdk"
version = "0.0.39"
version = "0.1.0"
description = "The official Python library for the Whop API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/whop_sdk/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "whop_sdk"
__version__ = "0.0.39" # x-release-please-version
__version__ = "0.1.0" # x-release-please-version
45 changes: 21 additions & 24 deletions src/whop_sdk/resources/ad_campaigns.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

from typing import Union, Optional
from datetime import datetime
from typing_extensions import Literal

import httpx

from ..types import ad_campaign_list_params, ad_campaign_update_params
from ..types import AdCampaignStatus, ad_campaign_list_params, ad_campaign_update_params
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import path_template, maybe_transform, async_maybe_transform
from .._compat import cached_property
Expand All @@ -21,11 +20,9 @@
)
from ..pagination import SyncCursorPage, AsyncCursorPage
from .._base_client import AsyncPaginator, make_request_options
from ..types.ad_campaign import AdCampaign
from ..types.ad_campaign_status import AdCampaignStatus
from ..types.ad_campaign_list_response import AdCampaignListResponse
from ..types.ad_campaign_pause_response import AdCampaignPauseResponse
from ..types.ad_campaign_update_response import AdCampaignUpdateResponse
from ..types.ad_campaign_unpause_response import AdCampaignUnpauseResponse
from ..types.ad_campaign_retrieve_response import AdCampaignRetrieveResponse

__all__ = ["AdCampaignsResource", "AsyncAdCampaignsResource"]

Expand Down Expand Up @@ -62,7 +59,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AdCampaignRetrieveResponse:
) -> AdCampaign:
"""
Retrieves a single ad campaign by its unique identifier.

Expand All @@ -86,7 +83,7 @@ def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AdCampaignRetrieveResponse,
cast_to=AdCampaign,
)

def update(
Expand All @@ -100,7 +97,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AdCampaignUpdateResponse:
) -> AdCampaign:
"""
Updates an ad campaign synchronously.

Expand Down Expand Up @@ -128,7 +125,7 @@ def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AdCampaignUpdateResponse,
cast_to=AdCampaign,
)

def list(
Expand All @@ -142,7 +139,7 @@ def list(
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
query: Optional[str] | Omit = omit,
status: Optional[Literal["active", "paused", "payment_failed", "draft", "in_review", "flagged"]] | Omit = omit,
status: Optional[AdCampaignStatus] | 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,
Expand Down Expand Up @@ -221,7 +218,7 @@ def pause(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AdCampaignPauseResponse:
) -> AdCampaign:
"""
Pauses an ad campaign, optionally until a specific date.

Expand All @@ -245,7 +242,7 @@ def pause(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AdCampaignPauseResponse,
cast_to=AdCampaign,
)

def unpause(
Expand All @@ -258,7 +255,7 @@ def unpause(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AdCampaignUnpauseResponse:
) -> AdCampaign:
"""
Resumes a paused ad campaign.

Expand All @@ -282,7 +279,7 @@ def unpause(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AdCampaignUnpauseResponse,
cast_to=AdCampaign,
)


Expand Down Expand Up @@ -318,7 +315,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AdCampaignRetrieveResponse:
) -> AdCampaign:
"""
Retrieves a single ad campaign by its unique identifier.

Expand All @@ -342,7 +339,7 @@ async def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AdCampaignRetrieveResponse,
cast_to=AdCampaign,
)

async def update(
Expand All @@ -356,7 +353,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AdCampaignUpdateResponse:
) -> AdCampaign:
"""
Updates an ad campaign synchronously.

Expand Down Expand Up @@ -384,7 +381,7 @@ async def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AdCampaignUpdateResponse,
cast_to=AdCampaign,
)

def list(
Expand All @@ -398,7 +395,7 @@ def list(
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
query: Optional[str] | Omit = omit,
status: Optional[Literal["active", "paused", "payment_failed", "draft", "in_review", "flagged"]] | Omit = omit,
status: Optional[AdCampaignStatus] | 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,
Expand Down Expand Up @@ -477,7 +474,7 @@ async def pause(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AdCampaignPauseResponse:
) -> AdCampaign:
"""
Pauses an ad campaign, optionally until a specific date.

Expand All @@ -501,7 +498,7 @@ async def pause(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AdCampaignPauseResponse,
cast_to=AdCampaign,
)

async def unpause(
Expand All @@ -514,7 +511,7 @@ async def unpause(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AdCampaignUnpauseResponse:
) -> AdCampaign:
"""
Resumes a paused ad campaign.

Expand All @@ -538,7 +535,7 @@ async def unpause(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AdCampaignUnpauseResponse,
cast_to=AdCampaign,
)


Expand Down
Loading
Loading