Skip to content
Merged
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
40 changes: 33 additions & 7 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,44 @@ jobs:
# version bump and changelog must also land back on scalar-next, or the next
# release PR would propose this release again. A real merge (never a plain
# commit push) so a squash- or rebase-merged release PR syncs just as well; the
# non-conventional message keeps the sync commit out of future changelogs. Plain
# (non-force) push on purpose: losing a race against a concurrent regeneration
# push fails loudly here, and the platform's next sync re-converges.
# non-conventional message keeps the sync commit out of future changelogs.
#
# The Scalar platform merges main into scalar-next itself when the release
# PR merges, so this step routinely races it. The sync is done once the release commit
# is an ancestor of scalar-next, whoever merged it, so that is checked before every
# attempt. A rejected push retries from a fresh fetch rather than failing the release
# run. Plain (non-force) push on purpose: a concurrent regeneration push is never
# discarded, and a sync that still cannot land after the retries fails loudly.
- name: Sync release back to scalar-next
if: ${{ steps.release.outputs.release_created == 'true' }}
env:
RELEASE_SHA: ${{ steps.release.outputs.sha }}
RELEASE_TAG: ${{ steps.release.outputs.tag_name }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin scalar-next
git checkout -B scalar-next origin/scalar-next
git merge --no-edit -m "Sync release ${{ steps.release.outputs.tag_name }} back to scalar-next" "${{ steps.release.outputs.sha }}"
git push origin scalar-next
# Explicit `|| return 1`s because `set -e` does not apply inside a function called
# as a condition, and a failed merge must never fall through to a no-op push.
sync_release() {
git fetch origin scalar-next || return 1
if git merge-base --is-ancestor "$RELEASE_SHA" origin/scalar-next; then
echo "$RELEASE_TAG is already on scalar-next."
return 0
fi
git checkout -B scalar-next origin/scalar-next || return 1
if ! git merge --no-edit -m "Sync release $RELEASE_TAG back to scalar-next" "$RELEASE_SHA"; then
git merge --abort
return 1
fi
git push origin scalar-next
}
for attempt in 1 2 3; do
if sync_release; then exit 0; fi
echo "Attempt $attempt of 3 to sync $RELEASE_TAG back to scalar-next failed."
if [ "$attempt" -lt 3 ]; then sleep $((attempt * 5)); fi
done
echo "::error::Could not sync $RELEASE_TAG back to scalar-next after 3 attempts."
exit 1
publish:
needs: release-please
# `!cancelled()` keeps publishing even when the back-sync to the integration branch
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 @@
{
".": "1.2.1"
".": "1.2.2"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [1.2.2](https://github.com/gumlet/python-sdk/compare/v1.2.1...v1.2.2) (2026-10-15)


### Chores

* **api:** regenerate SDK ([ab7321f](https://github.com/gumlet/python-sdk/commit/ab7321f04a407bf2f38decc49e5f55c99aab778f))
* **api:** update generated SDK content ([0a32835](https://github.com/gumlet/python-sdk/commit/0a3283563935151c50fca48554e99fd2d28b98a2))

## [1.2.1](https://github.com/gumlet/python-sdk/compare/v1.2.0...v1.2.1) (2026-10-12)


Expand Down
4 changes: 2 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ This endpoint retrieves viewer analytics data. This endpoint is use for deep ins

```python
video_analytic = client.video_analytics.chart_data(
metrics=[""],
metrics=["views"],
date_range={"start_at": "2024-01-01", "end_at": "2024-01-01"},
group_by="daily",
)
Expand Down Expand Up @@ -1485,7 +1485,7 @@ This endpoint retrieves aggregated data of the given metrics.
video_analytic = client.video_analytics.aggregated_data(
aggregate=[{"metric": "views", "function": "sum"}],
workspace_id="",
timeframe={},
timeframe={"start_at": "2024-01-01", "end_at": "2024-01-01"},
)
```

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 = "gumlet"
version = "1.2.1" # x-release-please-version
version = "1.2.2" # x-release-please-version
description = "Gumlet helps developers deliver online video and images. This API encompasses Gumlet Video, Image and Video Analytics functionality to help you build your products better and faster than ever before."
readme = "README.md"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion scalar-sdk.manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Gumlet",
"slug": "gumlet",
"generatorVersion": "0.36.3",
"generatorVersion": "0.36.5",
"servers": [
"https://api.gumlet.com/v1"
],
Expand Down
2 changes: 1 addition & 1 deletion src/gumlet/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Scalar. See README.md for details.

__title__ = "gumlet"
__version__ = "1.2.1" # x-release-please-version
__version__ = "1.2.2" # x-release-please-version
4 changes: 2 additions & 2 deletions src/gumlet/resources/image_usage_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def retrieve(
This endpoint helps you get image analytics data like bandwidth consumption, request count, CDN hit ratio, etc.

Args:
metrics: Define the metric you need the data for. Currently we support `bandwidth_consumption`, `requests_count`, `status_4xx`, `status_5xx`, and `avg_response_time`.
metrics: Define the metric you need the data for. Supported values: `bandwidth_consumption`, `requests_count`, `transformations_count`, `bandwidth_savings`, `origin_hit_rate`, `avg_transformation_response_time`, `status_4xx`, `status_5xx`, `cdn_hit_rate`, `content_type`, `status_2xx`, `avg_response_time`, `top_assets`, `bandwidth_consumption_by_source`, and `ai_credit_usage`.
date_range: The timeframe to get the data for. Currently we only support a maximum of 30 days between `start_at` and `end_at`.
group_by: Body parameter.
filters: Body parameter.
Expand Down Expand Up @@ -153,7 +153,7 @@ async def retrieve(
This endpoint helps you get image analytics data like bandwidth consumption, request count, CDN hit ratio, etc.

Args:
metrics: Define the metric you need the data for. Currently we support `bandwidth_consumption`, `requests_count`, `status_4xx`, `status_5xx`, and `avg_response_time`.
metrics: Define the metric you need the data for. Supported values: `bandwidth_consumption`, `requests_count`, `transformations_count`, `bandwidth_savings`, `origin_hit_rate`, `avg_transformation_response_time`, `status_4xx`, `status_5xx`, `cdn_hit_rate`, `content_type`, `status_2xx`, `avg_response_time`, `top_assets`, `bandwidth_consumption_by_source`, and `ai_credit_usage`.
date_range: The timeframe to get the data for. Currently we only support a maximum of 30 days between `start_at` and `end_at`.
group_by: Body parameter.
filters: Body parameter.
Expand Down
53 changes: 37 additions & 16 deletions src/gumlet/resources/video_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

import httpx

from typing import Iterable
from typing import Iterable, List
from typing_extensions import Literal
from .._types import SequenceNotStr

from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
Expand Down Expand Up @@ -43,7 +42,18 @@ def with_streaming_response(self) -> VideoAnalyticsResourceWithStreamingResponse
def chart_data(
self,
*,
metrics: SequenceNotStr[str],
metrics: List[
Literal[
"views",
"unique_views",
"impressions",
"completion_percent_by_views",
"playing_time",
"concurrent_users",
"widget_form_submitted",
"cta_clicks",
]
],
workspace_id: str | Omit = omit,
date_range: video_analytic_chart_data_params.DateRange,
filters: Iterable[video_analytic_chart_data_params.Filter] | Omit = omit,
Expand All @@ -61,9 +71,9 @@ def chart_data(
This endpoint retrieves viewer analytics data. This endpoint is use for deep insights on the analytics data.

Args:
metrics: Get data for one or more `metrics` in the same request. Please add any of these metrics. `views`, `unique_views`, `impressions`. `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, `cta_clicks`
metrics: Get data for one or more metrics in the same request. Supported values: `views`, `unique_views`, `impressions`, `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, and `cta_clicks`.
workspace_id: Gumlet workspace ID
date_range: The timeframe to get the data for.
date_range: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Build *segments* of users using multiple filters on the data, `value` should be an *exact match*
group_by: Data can be grouped by `daily`, `weekly` or `monthly`.
chart_dimension: Group metrics by the selected dimension. You can select up to 3 dimensions for nested category results; results follow the selection order.
Expand All @@ -79,7 +89,7 @@ def chart_data(
Example:
```python
video_analytic = client.video_analytics.chart_data(
metrics=[""],
metrics=["views"],
date_range={"start_at": "2024-01-01", "end_at": "2024-01-01"},
group_by="daily",
)
Expand Down Expand Up @@ -123,7 +133,7 @@ def breakdown_data(
This endpoint retrieves breakdown data of the given metrics by given breakdown field

Args:
date_range: The timeframe to get the data for.
date_range: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Build *segments* of users using multiple filters on the data, `value` should be an *exact match*
breakdowns: Breakdown fields and metrics to retrieve data for. Supports 1 to 3 breakdowns per request.
workspace_id: The five to ten character unique identifier of the Gumlet workspace ID available on the Video Workspaces.
Expand Down Expand Up @@ -185,7 +195,7 @@ def aggregated_data(
Args:
aggregate: Aggregate multiple metrics at the same time
workspace_id: The unique identifier of the Gumlet workspace ID available on the Video Workspaces.
timeframe: The timeframe to get the data for. Currently we only support maximum difference between `start_at` and `end_at` to be *60 days*
timeframe: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Get aggregations for metrics with multiple filters, `value` should be an exact match
extra_headers: Send extra headers with the request.
extra_query: Send extra query parameters with the request.
Expand All @@ -200,7 +210,7 @@ def aggregated_data(
video_analytic = client.video_analytics.aggregated_data(
aggregate=[{"metric": "views", "function": "sum"}],
workspace_id="",
timeframe={},
timeframe={"start_at": "2024-01-01", "end_at": "2024-01-01"},
)
```
"""
Expand Down Expand Up @@ -234,7 +244,18 @@ def with_streaming_response(self) -> AsyncVideoAnalyticsResourceWithStreamingRes
async def chart_data(
self,
*,
metrics: SequenceNotStr[str],
metrics: List[
Literal[
"views",
"unique_views",
"impressions",
"completion_percent_by_views",
"playing_time",
"concurrent_users",
"widget_form_submitted",
"cta_clicks",
]
],
workspace_id: str | Omit = omit,
date_range: video_analytic_chart_data_params.DateRange,
filters: Iterable[video_analytic_chart_data_params.Filter] | Omit = omit,
Expand All @@ -252,9 +273,9 @@ async def chart_data(
This endpoint retrieves viewer analytics data. This endpoint is use for deep insights on the analytics data.

Args:
metrics: Get data for one or more `metrics` in the same request. Please add any of these metrics. `views`, `unique_views`, `impressions`. `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, `cta_clicks`
metrics: Get data for one or more metrics in the same request. Supported values: `views`, `unique_views`, `impressions`, `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, and `cta_clicks`.
workspace_id: Gumlet workspace ID
date_range: The timeframe to get the data for.
date_range: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Build *segments* of users using multiple filters on the data, `value` should be an *exact match*
group_by: Data can be grouped by `daily`, `weekly` or `monthly`.
chart_dimension: Group metrics by the selected dimension. You can select up to 3 dimensions for nested category results; results follow the selection order.
Expand All @@ -270,7 +291,7 @@ async def chart_data(
Example:
```python
video_analytic = await client.video_analytics.chart_data(
metrics=[""],
metrics=["views"],
date_range={"start_at": "2024-01-01", "end_at": "2024-01-01"},
group_by="daily",
)
Expand Down Expand Up @@ -314,7 +335,7 @@ async def breakdown_data(
This endpoint retrieves breakdown data of the given metrics by given breakdown field

Args:
date_range: The timeframe to get the data for.
date_range: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Build *segments* of users using multiple filters on the data, `value` should be an *exact match*
breakdowns: Breakdown fields and metrics to retrieve data for. Supports 1 to 3 breakdowns per request.
workspace_id: The five to ten character unique identifier of the Gumlet workspace ID available on the Video Workspaces.
Expand Down Expand Up @@ -376,7 +397,7 @@ async def aggregated_data(
Args:
aggregate: Aggregate multiple metrics at the same time
workspace_id: The unique identifier of the Gumlet workspace ID available on the Video Workspaces.
timeframe: The timeframe to get the data for. Currently we only support maximum difference between `start_at` and `end_at` to be *60 days*
timeframe: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Get aggregations for metrics with multiple filters, `value` should be an exact match
extra_headers: Send extra headers with the request.
extra_query: Send extra query parameters with the request.
Expand All @@ -391,7 +412,7 @@ async def aggregated_data(
video_analytic = await client.video_analytics.aggregated_data(
aggregate=[{"metric": "views", "function": "sum"}],
workspace_id="",
timeframe={},
timeframe={"start_at": "2024-01-01", "end_at": "2024-01-01"},
)
```
"""
Expand Down
19 changes: 10 additions & 9 deletions src/gumlet/resources/video_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

import httpx

from typing import Dict, Iterable, List
from typing import Dict, Iterable, List, Union
from datetime import date
from typing_extensions import Literal
from .._types import SequenceNotStr

Expand Down Expand Up @@ -630,8 +631,8 @@ def list(
status: str | Omit = omit,
tag: str | Omit = omit,
playlist_id: str | Omit = omit,
start_date: str | Omit = omit,
end_date: str | Omit = omit,
start_date: Union[str, date] | Omit = omit,
end_date: Union[str, date] | Omit = omit,
min_duration: float | Omit = omit,
max_duration: float | Omit = omit,
sort_by: Literal["title", "duration", "uploaded_at", "created_at"] | Omit = omit,
Expand All @@ -658,8 +659,8 @@ def list(
status: Comma-separated asset status values.
tag: Comma-separated asset tags.
playlist_id: Filter assets to a playlist.
start_date: Asset created_at lower bound.
end_date: Asset created_at upper bound.
start_date: Asset created_at lower bound. Date in yyyy-MM-dd format.
end_date: Asset created_at upper bound. Date in yyyy-MM-dd format.
min_duration: Minimum asset duration in seconds.
max_duration: Maximum asset duration in seconds.
sort_by: Sort assets by a supported field.
Expand Down Expand Up @@ -1571,8 +1572,8 @@ async def list(
status: str | Omit = omit,
tag: str | Omit = omit,
playlist_id: str | Omit = omit,
start_date: str | Omit = omit,
end_date: str | Omit = omit,
start_date: Union[str, date] | Omit = omit,
end_date: Union[str, date] | Omit = omit,
min_duration: float | Omit = omit,
max_duration: float | Omit = omit,
sort_by: Literal["title", "duration", "uploaded_at", "created_at"] | Omit = omit,
Expand All @@ -1599,8 +1600,8 @@ async def list(
status: Comma-separated asset status values.
tag: Comma-separated asset tags.
playlist_id: Filter assets to a playlist.
start_date: Asset created_at lower bound.
end_date: Asset created_at upper bound.
start_date: Asset created_at lower bound. Date in yyyy-MM-dd format.
end_date: Asset created_at upper bound. Date in yyyy-MM-dd format.
min_duration: Minimum asset duration in seconds.
max_duration: Maximum asset duration in seconds.
sort_by: Sort assets by a supported field.
Expand Down
Loading
Loading