gcore 0.13.0__py3-none-any.whl → 0.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/__init__.py +3 -1
- gcore/_base_client.py +9 -9
- gcore/_client.py +25 -10
- gcore/_models.py +10 -4
- gcore/_qs.py +7 -7
- gcore/_types.py +18 -11
- gcore/_utils/_transform.py +2 -2
- gcore/_utils/_utils.py +4 -4
- gcore/_version.py +1 -1
- gcore/pagination.py +137 -0
- gcore/resources/__init__.py +14 -0
- gcore/resources/cdn/__init__.py +201 -0
- gcore/resources/cdn/audit_log.py +406 -0
- gcore/resources/cdn/cdn.py +957 -0
- gcore/resources/cdn/certificates.py +1062 -0
- gcore/resources/cdn/ip_ranges.py +224 -0
- gcore/resources/cdn/logs/__init__.py +33 -0
- gcore/resources/cdn/logs/logs.py +1424 -0
- gcore/resources/cdn/logs/settings.py +1081 -0
- gcore/resources/cdn/logs_uploader/__init__.py +61 -0
- gcore/resources/cdn/logs_uploader/configs.py +868 -0
- gcore/resources/cdn/logs_uploader/logs_uploader.py +166 -0
- gcore/resources/cdn/logs_uploader/policies.py +1060 -0
- gcore/resources/cdn/logs_uploader/targets.py +811 -0
- gcore/resources/cdn/metrics.py +419 -0
- gcore/resources/cdn/network_capacity.py +139 -0
- gcore/resources/cdn/origin_groups.py +1496 -0
- gcore/resources/cdn/resources/__init__.py +47 -0
- gcore/resources/cdn/resources/resources.py +2060 -0
- gcore/resources/cdn/resources/rules.py +1027 -0
- gcore/resources/cdn/resources/shield.py +259 -0
- gcore/resources/cdn/rule_templates.py +883 -0
- gcore/resources/cdn/shields.py +139 -0
- gcore/resources/cdn/statistics.py +1408 -0
- gcore/resources/cdn/trusted_ca_certificates.py +592 -0
- gcore/resources/cloud/audit_logs.py +33 -29
- gcore/resources/cloud/baremetal/flavors.py +21 -17
- gcore/resources/cloud/baremetal/images.py +19 -15
- gcore/resources/cloud/baremetal/servers.py +141 -119
- gcore/resources/cloud/billing_reservations.py +41 -33
- gcore/resources/cloud/cloud.py +24 -0
- gcore/resources/cloud/cost_reports.py +149 -119
- gcore/resources/cloud/file_shares/access_rules.py +25 -13
- gcore/resources/cloud/file_shares/file_shares.py +107 -71
- gcore/resources/cloud/floating_ips.py +101 -59
- gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +13 -9
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +275 -65
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +69 -53
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +9 -5
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +151 -127
- gcore/resources/cloud/inference/api_keys.py +51 -31
- gcore/resources/cloud/inference/applications/deployments.py +49 -31
- gcore/resources/cloud/inference/applications/templates.py +17 -9
- gcore/resources/cloud/inference/deployments/deployments.py +171 -139
- gcore/resources/cloud/inference/deployments/logs.py +17 -13
- gcore/resources/cloud/inference/flavors.py +21 -13
- gcore/resources/cloud/inference/inference.py +9 -5
- gcore/resources/cloud/inference/registry_credentials.py +45 -25
- gcore/resources/cloud/inference/secrets.py +45 -25
- gcore/resources/cloud/instances/flavors.py +17 -13
- gcore/resources/cloud/instances/images.py +153 -129
- gcore/resources/cloud/instances/instances.py +287 -213
- gcore/resources/cloud/instances/interfaces.py +165 -161
- gcore/resources/cloud/instances/metrics.py +9 -5
- gcore/resources/cloud/ip_ranges.py +25 -15
- gcore/resources/cloud/k8s/clusters/clusters.py +151 -87
- gcore/resources/cloud/k8s/clusters/nodes.py +19 -11
- gcore/resources/cloud/k8s/clusters/pools/nodes.py +19 -11
- gcore/resources/cloud/k8s/clusters/pools/pools.py +83 -59
- gcore/resources/cloud/k8s/flavors.py +13 -9
- gcore/resources/cloud/k8s/k8s.py +9 -5
- gcore/resources/cloud/load_balancers/flavors.py +11 -7
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +103 -83
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +77 -57
- gcore/resources/cloud/load_balancers/listeners.py +125 -105
- gcore/resources/cloud/load_balancers/load_balancers.py +155 -123
- gcore/resources/cloud/load_balancers/metrics.py +9 -5
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +25 -17
- gcore/resources/cloud/load_balancers/pools/members.py +31 -23
- gcore/resources/cloud/load_balancers/pools/pools.py +155 -129
- gcore/resources/cloud/load_balancers/statuses.py +17 -9
- gcore/resources/cloud/networks/networks.py +79 -55
- gcore/resources/cloud/networks/routers.py +75 -47
- gcore/resources/cloud/networks/subnets.py +109 -87
- gcore/resources/cloud/placement_groups.py +33 -17
- gcore/resources/cloud/projects.py +53 -41
- gcore/resources/cloud/quotas/quotas.py +25 -13
- gcore/resources/cloud/quotas/requests.py +41 -25
- gcore/resources/cloud/regions.py +25 -23
- gcore/resources/cloud/registries/artifacts.py +17 -9
- gcore/resources/cloud/registries/registries.py +55 -29
- gcore/resources/cloud/registries/repositories.py +17 -9
- gcore/resources/cloud/registries/tags.py +9 -5
- gcore/resources/cloud/registries/users.py +65 -35
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +233 -108
- gcore/resources/cloud/reserved_fixed_ips/vip.py +45 -25
- gcore/resources/cloud/secrets.py +43 -27
- gcore/resources/cloud/security_groups/rules.py +55 -43
- gcore/resources/cloud/security_groups/security_groups.py +79 -47
- gcore/resources/cloud/ssh_keys.py +51 -31
- gcore/resources/cloud/tasks.py +57 -45
- gcore/resources/cloud/usage_reports.py +27 -23
- gcore/resources/cloud/users/role_assignments.py +49 -33
- gcore/resources/cloud/volumes.py +237 -201
- gcore/resources/dns/dns.py +17 -13
- gcore/resources/dns/locations.py +29 -17
- gcore/resources/dns/metrics.py +13 -9
- gcore/resources/dns/pickers/pickers.py +5 -5
- gcore/resources/dns/pickers/presets.py +9 -5
- gcore/resources/dns/zones/dnssec.py +19 -11
- gcore/resources/dns/zones/rrsets.py +149 -91
- gcore/resources/dns/zones/zones.py +245 -187
- gcore/resources/fastedge/apps/apps.py +105 -89
- gcore/resources/fastedge/apps/logs.py +25 -21
- gcore/resources/fastedge/binaries.py +33 -17
- gcore/resources/fastedge/fastedge.py +5 -5
- gcore/resources/fastedge/kv_stores.py +43 -31
- gcore/resources/fastedge/secrets.py +69 -45
- gcore/resources/fastedge/statistics.py +25 -17
- gcore/resources/fastedge/templates.py +59 -39
- gcore/resources/iam/api_tokens.py +47 -29
- gcore/resources/iam/iam.py +5 -5
- gcore/resources/iam/users.py +97 -65
- gcore/resources/security/bgp_announces.py +27 -19
- gcore/resources/security/events.py +23 -19
- gcore/resources/security/profile_templates.py +9 -5
- gcore/resources/security/profiles.py +69 -45
- gcore/resources/storage/buckets/buckets.py +37 -25
- gcore/resources/storage/buckets/cors.py +19 -11
- gcore/resources/storage/buckets/lifecycle.py +19 -11
- gcore/resources/storage/buckets/policy.py +25 -13
- gcore/resources/storage/credentials.py +19 -15
- gcore/resources/storage/locations.py +13 -9
- gcore/resources/storage/statistics.py +39 -31
- gcore/resources/storage/storage.py +105 -69
- gcore/resources/streaming/ai_tasks.py +307 -197
- gcore/resources/streaming/broadcasts.py +63 -35
- gcore/resources/streaming/directories.py +65 -39
- gcore/resources/streaming/players.py +47 -31
- gcore/resources/streaming/playlists.py +189 -123
- gcore/resources/streaming/quality_sets.py +69 -39
- gcore/resources/streaming/restreams.py +47 -27
- gcore/resources/streaming/statistics.py +613 -407
- gcore/resources/streaming/streams/overlays.py +107 -67
- gcore/resources/streaming/streams/streams.py +403 -263
- gcore/resources/streaming/videos/subtitles.py +131 -75
- gcore/resources/streaming/videos/videos.py +429 -279
- gcore/resources/waap/advanced_rules.py +9 -5
- gcore/resources/waap/custom_page_sets.py +99 -75
- gcore/resources/waap/domains/advanced_rules.py +157 -99
- gcore/resources/waap/domains/api_discovery.py +71 -47
- gcore/resources/waap/domains/api_path_groups.py +9 -5
- gcore/resources/waap/domains/api_paths.py +79 -83
- gcore/resources/waap/domains/custom_rules.py +89 -59
- gcore/resources/waap/domains/domains.py +59 -41
- gcore/resources/waap/domains/firewall_rules.py +83 -55
- gcore/resources/waap/domains/insight_silences.py +59 -39
- gcore/resources/waap/domains/insights.py +39 -27
- gcore/resources/waap/domains/settings.py +21 -13
- gcore/resources/waap/domains/statistics.py +99 -75
- gcore/resources/waap/insights.py +23 -21
- gcore/resources/waap/ip_info/ip_info.py +65 -33
- gcore/resources/waap/ip_info/metrics.py +11 -7
- gcore/resources/waap/organizations.py +17 -13
- gcore/resources/waap/statistics.py +9 -5
- gcore/resources/waap/tags.py +17 -17
- gcore/resources/waap/waap.py +5 -5
- gcore/types/cdn/__init__.py +80 -0
- gcore/types/cdn/audit_log_list_params.py +73 -0
- gcore/types/cdn/ca_certificate.py +53 -0
- gcore/types/cdn/ca_certificate_list.py +10 -0
- gcore/types/cdn/cdn_account.py +86 -0
- gcore/types/cdn/cdn_account_limits.py +27 -0
- gcore/types/cdn/cdn_audit_log_entry.py +66 -0
- gcore/types/cdn/cdn_available_features.py +46 -0
- gcore/types/cdn/cdn_list_purge_statuses_params.py +67 -0
- gcore/types/cdn/cdn_log_entry.py +70 -0
- gcore/types/cdn/cdn_metrics.py +22 -0
- gcore/types/cdn/cdn_metrics_groups.py +13 -0
- gcore/types/cdn/cdn_metrics_values.py +19 -0
- gcore/types/cdn/cdn_resource.py +1997 -0
- gcore/types/cdn/cdn_resource_list.py +10 -0
- gcore/types/cdn/cdn_update_account_params.py +15 -0
- gcore/types/cdn/certificate_create_params.py +51 -0
- gcore/types/cdn/certificate_get_status_params.py +14 -0
- gcore/types/cdn/certificate_list_params.py +29 -0
- gcore/types/cdn/certificate_replace_params.py +39 -0
- gcore/types/cdn/log_download_params.py +279 -0
- gcore/types/cdn/log_list_params.py +273 -0
- gcore/types/cdn/logs/__init__.py +7 -0
- gcore/types/cdn/logs/log_settings.py +172 -0
- gcore/types/cdn/logs/setting_create_params.py +200 -0
- gcore/types/cdn/logs/setting_update_params.py +200 -0
- gcore/types/cdn/logs_aggregated_stats.py +23 -0
- gcore/types/cdn/logs_uploader/__init__.py +23 -0
- gcore/types/cdn/logs_uploader/config_create_params.py +32 -0
- gcore/types/cdn/logs_uploader/config_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/config_replace_params.py +32 -0
- gcore/types/cdn/logs_uploader/config_update_params.py +32 -0
- gcore/types/cdn/logs_uploader/logs_uploader_config.py +51 -0
- gcore/types/cdn/logs_uploader/logs_uploader_config_list.py +10 -0
- gcore/types/cdn/logs_uploader/logs_uploader_policy.py +73 -0
- gcore/types/cdn/logs_uploader/logs_uploader_policy_list.py +10 -0
- gcore/types/cdn/logs_uploader/logs_uploader_target.py +236 -0
- gcore/types/cdn/logs_uploader/logs_uploader_target_list.py +10 -0
- gcore/types/cdn/logs_uploader/policy_create_params.py +61 -0
- gcore/types/cdn/logs_uploader/policy_list_fields_response.py +8 -0
- gcore/types/cdn/logs_uploader/policy_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/policy_replace_params.py +61 -0
- gcore/types/cdn/logs_uploader/policy_update_params.py +61 -0
- gcore/types/cdn/logs_uploader/target_create_params.py +249 -0
- gcore/types/cdn/logs_uploader/target_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/target_replace_params.py +249 -0
- gcore/types/cdn/logs_uploader/target_update_params.py +249 -0
- gcore/types/cdn/logs_uploader_validation.py +23 -0
- gcore/types/cdn/metric_list_params.py +168 -0
- gcore/types/cdn/network_capacity.py +22 -0
- gcore/types/cdn/origin_group_create_params.py +184 -0
- gcore/types/cdn/origin_group_list_params.py +24 -0
- gcore/types/cdn/origin_group_replace_params.py +190 -0
- gcore/types/cdn/origin_group_update_params.py +190 -0
- gcore/types/cdn/origin_groups.py +212 -0
- gcore/types/cdn/origin_groups_list.py +10 -0
- gcore/types/cdn/public_ip_list.py +15 -0
- gcore/types/cdn/public_network_list.py +15 -0
- gcore/types/cdn/purge_status.py +55 -0
- gcore/types/cdn/resource_aggregated_stats.py +80 -0
- gcore/types/cdn/resource_create_params.py +1845 -0
- gcore/types/cdn/resource_list_params.py +107 -0
- gcore/types/cdn/resource_prefetch_params.py +17 -0
- gcore/types/cdn/resource_purge_params.py +71 -0
- gcore/types/cdn/resource_replace_params.py +1823 -0
- gcore/types/cdn/resource_update_params.py +1814 -0
- gcore/types/cdn/resource_usage_stats.py +111 -0
- gcore/types/cdn/resources/__init__.py +11 -0
- gcore/types/cdn/resources/cdn_resource_rule.py +1715 -0
- gcore/types/cdn/resources/origin_shielding.py +15 -0
- gcore/types/cdn/resources/rule_create_params.py +1672 -0
- gcore/types/cdn/resources/rule_list_response.py +10 -0
- gcore/types/cdn/resources/rule_replace_params.py +1674 -0
- gcore/types/cdn/resources/rule_update_params.py +1674 -0
- gcore/types/cdn/resources/shield_replace_params.py +16 -0
- gcore/types/cdn/rule_template.py +1686 -0
- gcore/types/cdn/rule_template_create_params.py +1656 -0
- gcore/types/cdn/rule_template_list.py +10 -0
- gcore/types/cdn/rule_template_replace_params.py +1656 -0
- gcore/types/cdn/rule_template_update_params.py +1656 -0
- gcore/types/cdn/shield_aggregated_stats.py +23 -0
- gcore/types/cdn/shield_list_response.py +25 -0
- gcore/types/cdn/ssl_detail.py +62 -0
- gcore/types/cdn/ssl_detail_list.py +10 -0
- gcore/types/cdn/ssl_request_status.py +135 -0
- gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +42 -0
- gcore/types/cdn/statistic_get_logs_usage_series_params.py +35 -0
- gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +151 -0
- gcore/types/cdn/statistic_get_resource_usage_series_params.py +131 -0
- gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +42 -0
- gcore/types/cdn/statistic_get_shield_usage_series_params.py +25 -0
- gcore/types/cdn/trusted_ca_certificate_create_params.py +23 -0
- gcore/types/cdn/trusted_ca_certificate_list_params.py +29 -0
- gcore/types/cdn/trusted_ca_certificate_replace_params.py +15 -0
- gcore/types/cdn/usage_series_stats.py +31 -0
- gcore/types/cloud/__init__.py +2 -0
- gcore/types/cloud/file_share.py +4 -0
- gcore/types/cloud/file_share_create_params.py +20 -0
- gcore/types/cloud/file_share_update_params.py +40 -3
- gcore/types/cloud/floating_ip_update_params.py +3 -1
- gcore/types/cloud/gpu_baremetal_cluster_action_params.py +46 -0
- gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_flavor.py +12 -0
- gcore/types/cloud/inference/inference_deployment.py +3 -1
- gcore/types/cloud/instance_create_params.py +3 -1
- gcore/types/cloud/k8s/cluster_create_params.py +46 -4
- gcore/types/cloud/k8s/cluster_update_params.py +60 -6
- gcore/types/cloud/k8s/clusters/pool_update_params.py +1 -1
- gcore/types/cloud/k8s/k8s_cluster.py +40 -3
- gcore/types/cloud/load_balancer_update_params.py +3 -1
- gcore/types/cloud/network_update_params.py +3 -1
- gcore/types/cloud/networks/subnet_update_params.py +3 -1
- gcore/types/cloud/quota_get_all_response.py +8 -8
- gcore/types/cloud/quota_get_by_region_response.py +8 -8
- gcore/types/cloud/quotas/request_create_params.py +4 -4
- gcore/types/cloud/quotas/request_get_response.py +4 -4
- gcore/types/cloud/quotas/request_list_response.py +4 -4
- gcore/types/cloud/registries/user_create_multiple_params.py +5 -3
- gcore/types/cloud/registries/user_create_params.py +5 -3
- gcore/types/cloud/registry_create_params.py +5 -3
- gcore/types/cloud/reserved_fixed_ip_update_params.py +16 -0
- gcore/types/cloud/security_group_update_params.py +3 -1
- gcore/types/cloud/ssh_key_created.py +6 -3
- gcore/types/cloud/volume_update_params.py +3 -1
- gcore/types/dns/zone_get_statistics_params.py +12 -9
- gcore/types/dns/zone_get_statistics_response.py +3 -1
- gcore/types/dns/zone_import_params.py +21 -15
- gcore/types/dns/zones/dns_output_rrset.py +7 -3
- gcore/types/iam/account_overview.py +31 -28
- gcore/types/iam/api_token.py +24 -24
- gcore/types/iam/api_token_create_params.py +2 -1
- gcore/types/iam/api_token_list.py +24 -24
- gcore/types/iam/user.py +7 -2
- gcore/types/iam/user_detailed.py +22 -17
- gcore/types/iam/user_invite.py +2 -4
- gcore/types/iam/user_invite_params.py +4 -1
- gcore/types/iam/user_update.py +22 -17
- gcore/types/iam/user_update_params.py +7 -2
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +6 -4
- gcore/types/streaming/ai_contentmoderation_nsfw.py +6 -4
- gcore/types/streaming/ai_contentmoderation_softnudity.py +6 -4
- gcore/types/streaming/ai_contentmoderation_sport.py +6 -4
- gcore/types/streaming/ai_task.py +20 -11
- gcore/types/streaming/ai_task_create_params.py +20 -11
- gcore/types/streaming/ai_task_get_response.py +5 -4
- gcore/types/streaming/ai_task_list_params.py +11 -5
- gcore/types/streaming/clip.py +33 -22
- gcore/types/streaming/create_video_param.py +75 -43
- gcore/types/streaming/playlist.py +7 -5
- gcore/types/streaming/playlist_create_params.py +7 -5
- gcore/types/streaming/playlist_update_params.py +7 -5
- gcore/types/streaming/playlist_video.py +75 -43
- gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +7 -4
- gcore/types/streaming/stream.py +207 -136
- gcore/types/streaming/stream_create_clip_params.py +33 -22
- gcore/types/streaming/stream_create_params.py +41 -24
- gcore/types/streaming/stream_update_params.py +41 -24
- gcore/types/streaming/video.py +138 -76
- gcore/types/streaming/video_list_params.py +4 -2
- gcore/types/streaming/video_update_params.py +75 -43
- gcore/types/waap/domain_update_params.py +2 -2
- gcore/types/waap/domains/advanced_rule_create_params.py +26 -18
- gcore/types/waap/domains/advanced_rule_list_params.py +10 -7
- gcore/types/waap/domains/advanced_rule_update_params.py +22 -17
- gcore/types/waap/domains/api_path_create_params.py +0 -3
- gcore/types/waap/domains/api_path_update_params.py +1 -3
- gcore/types/waap/domains/custom_rule_create_params.py +36 -35
- gcore/types/waap/domains/custom_rule_update_params.py +31 -33
- gcore/types/waap/domains/firewall_rule_create_params.py +6 -6
- gcore/types/waap/domains/firewall_rule_update_params.py +5 -5
- gcore/types/waap/domains/waap_advanced_rule.py +17 -9
- gcore/types/waap/domains/waap_custom_rule.py +5 -2
- gcore/types/waap/domains/waap_firewall_rule.py +1 -1
- gcore/types/waap/domains/waap_insight.py +1 -1
- gcore/types/waap/insight_list_types_params.py +1 -1
- {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/METADATA +1 -1
- {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/RECORD +345 -224
- {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/WHEEL +0 -0
- {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -7,7 +7,7 @@ from typing_extensions import Literal
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ..._types import
|
|
10
|
+
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
|
|
11
11
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from ..._compat import cached_property
|
|
13
13
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -50,31 +50,33 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
50
50
|
def create(
|
|
51
51
|
self,
|
|
52
52
|
*,
|
|
53
|
-
active: bool |
|
|
54
|
-
ad_id: int |
|
|
55
|
-
client_id: int |
|
|
56
|
-
client_user_id: int |
|
|
57
|
-
countdown: bool |
|
|
58
|
-
hls_cmaf_url: str |
|
|
59
|
-
hls_url: str |
|
|
60
|
-
iframe_url: str |
|
|
61
|
-
loop: bool |
|
|
62
|
-
name: str |
|
|
63
|
-
player_id: int |
|
|
64
|
-
playlist_type: Literal["live", "vod"] |
|
|
65
|
-
start_time: str |
|
|
66
|
-
video_ids: Iterable[int] |
|
|
53
|
+
active: bool | Omit = omit,
|
|
54
|
+
ad_id: int | Omit = omit,
|
|
55
|
+
client_id: int | Omit = omit,
|
|
56
|
+
client_user_id: int | Omit = omit,
|
|
57
|
+
countdown: bool | Omit = omit,
|
|
58
|
+
hls_cmaf_url: str | Omit = omit,
|
|
59
|
+
hls_url: str | Omit = omit,
|
|
60
|
+
iframe_url: str | Omit = omit,
|
|
61
|
+
loop: bool | Omit = omit,
|
|
62
|
+
name: str | Omit = omit,
|
|
63
|
+
player_id: int | Omit = omit,
|
|
64
|
+
playlist_type: Literal["live", "vod"] | Omit = omit,
|
|
65
|
+
start_time: str | Omit = omit,
|
|
66
|
+
video_ids: Iterable[int] | Omit = omit,
|
|
67
67
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
68
68
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
69
69
|
extra_headers: Headers | None = None,
|
|
70
70
|
extra_query: Query | None = None,
|
|
71
71
|
extra_body: Body | None = None,
|
|
72
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
72
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
73
73
|
) -> PlaylistCreate:
|
|
74
74
|
"""
|
|
75
75
|
Playlist is a curated collection of video content organized in a sequential
|
|
76
|
-
manner.
|
|
77
|
-
|
|
76
|
+
manner.
|
|
77
|
+
|
|
78
|
+
This method offers several advantages and features that are typical of live
|
|
79
|
+
streaming but with more control over the content. Here's how it works:
|
|
78
80
|
|
|
79
81
|
- Playlist always consists only of static VOD videos you previously uploaded to
|
|
80
82
|
the system.
|
|
@@ -84,24 +86,33 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
84
86
|
- Playlist can be looped endlessly. In this case, all the videos in the list
|
|
85
87
|
will be constantly repeated through the list.
|
|
86
88
|
- Playlist can be programmed to be played at a specific time in the future. In
|
|
87
|
-
that case, before the start time there will be empty manifest.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
that case, before the start time there will be empty manifest.
|
|
90
|
+
|
|
91
|
+
You can add new videos to the list, remove unnecessary videos, or change the
|
|
92
|
+
order of videos in the list. But please pay attention to when the video list
|
|
93
|
+
changes, it is updated instantly on the server. This means that after saving the
|
|
94
|
+
changed list, the playlist will be reloaded for all users and it will start
|
|
95
|
+
plays from the very first element.
|
|
96
|
+
|
|
97
|
+
Maximum video limit = 128 videos in a row.
|
|
93
98
|
|
|
94
99
|
Examples of usage:
|
|
95
100
|
|
|
96
101
|
- Looped video playback
|
|
97
|
-
- Scheduled playback
|
|
98
|
-
|
|
102
|
+
- Scheduled playback
|
|
103
|
+
|
|
104
|
+
**Looped video playback**
|
|
105
|
+
|
|
106
|
+
It can be used to simulate TV channel pre-programmed behaviour.
|
|
107
|
+
|
|
99
108
|
- Selection: Choose a series of videos, such as TV show episodes, movies,
|
|
100
109
|
tutorials, or any other relevant content.
|
|
101
110
|
- Order: Arrange the selected videos in the desired sequence, much like setting
|
|
102
111
|
a broadcast schedule.
|
|
103
112
|
- Looping: Optionally, the playlist can be set to loop, replaying the sequence
|
|
104
|
-
once it finishes to maintain a continuous stream.
|
|
113
|
+
once it finishes to maintain a continuous stream.
|
|
114
|
+
|
|
115
|
+
Example:
|
|
105
116
|
|
|
106
117
|
```
|
|
107
118
|
active: true
|
|
@@ -109,9 +120,11 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
109
120
|
name: "Playlist: TV channel 'The world around us' (Programmed broadcast for 24 hours)"
|
|
110
121
|
```
|
|
111
122
|
|
|
112
|
-
**Scheduled playback**
|
|
113
|
-
|
|
114
|
-
|
|
123
|
+
**Scheduled playback**
|
|
124
|
+
|
|
125
|
+
It can be used to simulate live events such as virtual concerts, webinars, or
|
|
126
|
+
any special broadcasts without the logistical challenges of an actual live
|
|
127
|
+
stream.
|
|
115
128
|
|
|
116
129
|
- Timing: Set specific start time, creating the illusion of a live broadcast
|
|
117
130
|
schedule.
|
|
@@ -172,8 +185,10 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
172
185
|
|
|
173
186
|
iframe_url: A URL to a built-in HTML video player with the video inside. It can be inserted
|
|
174
187
|
into an iframe on your website and the video will automatically play in all
|
|
175
|
-
browsers.
|
|
176
|
-
|
|
188
|
+
browsers.
|
|
189
|
+
|
|
190
|
+
The player can be opened or shared via this direct link. Also the video player
|
|
191
|
+
can be integrated into your web pages using the Iframe tag.
|
|
177
192
|
|
|
178
193
|
Please see the details in `iframe_url` attribute of /videos/{id} method.
|
|
179
194
|
|
|
@@ -193,7 +208,9 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
193
208
|
Datetime in ISO 8601 format.
|
|
194
209
|
|
|
195
210
|
video_ids: A list of VOD IDs included in the playlist. Order of videos in a playlist
|
|
196
|
-
reflects the order of IDs in the array.
|
|
211
|
+
reflects the order of IDs in the array.
|
|
212
|
+
|
|
213
|
+
Maximum video limit = 128.
|
|
197
214
|
|
|
198
215
|
extra_headers: Send extra headers
|
|
199
216
|
|
|
@@ -204,7 +221,9 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
204
221
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
205
222
|
"""
|
|
206
223
|
return self._post(
|
|
207
|
-
"/streaming/playlists"
|
|
224
|
+
"/streaming/playlists"
|
|
225
|
+
if self._client._base_url_overridden
|
|
226
|
+
else "https://api.gcore.com//streaming/playlists",
|
|
208
227
|
body=maybe_transform(
|
|
209
228
|
{
|
|
210
229
|
"active": active,
|
|
@@ -234,26 +253,26 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
234
253
|
self,
|
|
235
254
|
playlist_id: int,
|
|
236
255
|
*,
|
|
237
|
-
active: bool |
|
|
238
|
-
ad_id: int |
|
|
239
|
-
client_id: int |
|
|
240
|
-
client_user_id: int |
|
|
241
|
-
countdown: bool |
|
|
242
|
-
hls_cmaf_url: str |
|
|
243
|
-
hls_url: str |
|
|
244
|
-
iframe_url: str |
|
|
245
|
-
loop: bool |
|
|
246
|
-
name: str |
|
|
247
|
-
player_id: int |
|
|
248
|
-
playlist_type: Literal["live", "vod"] |
|
|
249
|
-
start_time: str |
|
|
250
|
-
video_ids: Iterable[int] |
|
|
256
|
+
active: bool | Omit = omit,
|
|
257
|
+
ad_id: int | Omit = omit,
|
|
258
|
+
client_id: int | Omit = omit,
|
|
259
|
+
client_user_id: int | Omit = omit,
|
|
260
|
+
countdown: bool | Omit = omit,
|
|
261
|
+
hls_cmaf_url: str | Omit = omit,
|
|
262
|
+
hls_url: str | Omit = omit,
|
|
263
|
+
iframe_url: str | Omit = omit,
|
|
264
|
+
loop: bool | Omit = omit,
|
|
265
|
+
name: str | Omit = omit,
|
|
266
|
+
player_id: int | Omit = omit,
|
|
267
|
+
playlist_type: Literal["live", "vod"] | Omit = omit,
|
|
268
|
+
start_time: str | Omit = omit,
|
|
269
|
+
video_ids: Iterable[int] | Omit = omit,
|
|
251
270
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
252
271
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
253
272
|
extra_headers: Headers | None = None,
|
|
254
273
|
extra_query: Query | None = None,
|
|
255
274
|
extra_body: Body | None = None,
|
|
256
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
275
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
257
276
|
) -> Playlist:
|
|
258
277
|
"""Change playlist
|
|
259
278
|
|
|
@@ -303,8 +322,10 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
303
322
|
|
|
304
323
|
iframe_url: A URL to a built-in HTML video player with the video inside. It can be inserted
|
|
305
324
|
into an iframe on your website and the video will automatically play in all
|
|
306
|
-
browsers.
|
|
307
|
-
|
|
325
|
+
browsers.
|
|
326
|
+
|
|
327
|
+
The player can be opened or shared via this direct link. Also the video player
|
|
328
|
+
can be integrated into your web pages using the Iframe tag.
|
|
308
329
|
|
|
309
330
|
Please see the details in `iframe_url` attribute of /videos/{id} method.
|
|
310
331
|
|
|
@@ -324,7 +345,9 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
324
345
|
Datetime in ISO 8601 format.
|
|
325
346
|
|
|
326
347
|
video_ids: A list of VOD IDs included in the playlist. Order of videos in a playlist
|
|
327
|
-
reflects the order of IDs in the array.
|
|
348
|
+
reflects the order of IDs in the array.
|
|
349
|
+
|
|
350
|
+
Maximum video limit = 128.
|
|
328
351
|
|
|
329
352
|
extra_headers: Send extra headers
|
|
330
353
|
|
|
@@ -335,7 +358,9 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
335
358
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
336
359
|
"""
|
|
337
360
|
return self._patch(
|
|
338
|
-
f"/streaming/playlists/{playlist_id}"
|
|
361
|
+
f"/streaming/playlists/{playlist_id}"
|
|
362
|
+
if self._client._base_url_overridden
|
|
363
|
+
else f"https://api.gcore.com//streaming/playlists/{playlist_id}",
|
|
339
364
|
body=maybe_transform(
|
|
340
365
|
{
|
|
341
366
|
"active": active,
|
|
@@ -364,13 +389,13 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
364
389
|
def list(
|
|
365
390
|
self,
|
|
366
391
|
*,
|
|
367
|
-
page: int |
|
|
392
|
+
page: int | Omit = omit,
|
|
368
393
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
369
394
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
370
395
|
extra_headers: Headers | None = None,
|
|
371
396
|
extra_query: Query | None = None,
|
|
372
397
|
extra_body: Body | None = None,
|
|
373
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
398
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
374
399
|
) -> SyncPageStreaming[Playlist]:
|
|
375
400
|
"""Returns a list of created playlists
|
|
376
401
|
|
|
@@ -388,7 +413,9 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
388
413
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
389
414
|
"""
|
|
390
415
|
return self._get_api_list(
|
|
391
|
-
"/streaming/playlists"
|
|
416
|
+
"/streaming/playlists"
|
|
417
|
+
if self._client._base_url_overridden
|
|
418
|
+
else "https://api.gcore.com//streaming/playlists",
|
|
392
419
|
page=SyncPageStreaming[Playlist],
|
|
393
420
|
options=make_request_options(
|
|
394
421
|
extra_headers=extra_headers,
|
|
@@ -409,7 +436,7 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
409
436
|
extra_headers: Headers | None = None,
|
|
410
437
|
extra_query: Query | None = None,
|
|
411
438
|
extra_body: Body | None = None,
|
|
412
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
439
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
413
440
|
) -> None:
|
|
414
441
|
"""
|
|
415
442
|
Delete playlist
|
|
@@ -425,7 +452,9 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
425
452
|
"""
|
|
426
453
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
427
454
|
return self._delete(
|
|
428
|
-
f"/streaming/playlists/{playlist_id}"
|
|
455
|
+
f"/streaming/playlists/{playlist_id}"
|
|
456
|
+
if self._client._base_url_overridden
|
|
457
|
+
else f"https://api.gcore.com//streaming/playlists/{playlist_id}",
|
|
429
458
|
options=make_request_options(
|
|
430
459
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
431
460
|
),
|
|
@@ -441,7 +470,7 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
441
470
|
extra_headers: Headers | None = None,
|
|
442
471
|
extra_query: Query | None = None,
|
|
443
472
|
extra_body: Body | None = None,
|
|
444
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
473
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
445
474
|
) -> Playlist:
|
|
446
475
|
"""
|
|
447
476
|
Returns a playlist details
|
|
@@ -456,7 +485,9 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
456
485
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
457
486
|
"""
|
|
458
487
|
return self._get(
|
|
459
|
-
f"/streaming/playlists/{playlist_id}"
|
|
488
|
+
f"/streaming/playlists/{playlist_id}"
|
|
489
|
+
if self._client._base_url_overridden
|
|
490
|
+
else f"https://api.gcore.com//streaming/playlists/{playlist_id}",
|
|
460
491
|
options=make_request_options(
|
|
461
492
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
462
493
|
),
|
|
@@ -472,7 +503,7 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
472
503
|
extra_headers: Headers | None = None,
|
|
473
504
|
extra_query: Query | None = None,
|
|
474
505
|
extra_body: Body | None = None,
|
|
475
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
506
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
476
507
|
) -> PlaylistListVideosResponse:
|
|
477
508
|
"""
|
|
478
509
|
Shows ordered array of playlist videos
|
|
@@ -487,7 +518,9 @@ class PlaylistsResource(SyncAPIResource):
|
|
|
487
518
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
488
519
|
"""
|
|
489
520
|
return self._get(
|
|
490
|
-
f"/streaming/playlists/{playlist_id}/videos"
|
|
521
|
+
f"/streaming/playlists/{playlist_id}/videos"
|
|
522
|
+
if self._client._base_url_overridden
|
|
523
|
+
else f"https://api.gcore.com//streaming/playlists/{playlist_id}/videos",
|
|
491
524
|
options=make_request_options(
|
|
492
525
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
493
526
|
),
|
|
@@ -518,31 +551,33 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
518
551
|
async def create(
|
|
519
552
|
self,
|
|
520
553
|
*,
|
|
521
|
-
active: bool |
|
|
522
|
-
ad_id: int |
|
|
523
|
-
client_id: int |
|
|
524
|
-
client_user_id: int |
|
|
525
|
-
countdown: bool |
|
|
526
|
-
hls_cmaf_url: str |
|
|
527
|
-
hls_url: str |
|
|
528
|
-
iframe_url: str |
|
|
529
|
-
loop: bool |
|
|
530
|
-
name: str |
|
|
531
|
-
player_id: int |
|
|
532
|
-
playlist_type: Literal["live", "vod"] |
|
|
533
|
-
start_time: str |
|
|
534
|
-
video_ids: Iterable[int] |
|
|
554
|
+
active: bool | Omit = omit,
|
|
555
|
+
ad_id: int | Omit = omit,
|
|
556
|
+
client_id: int | Omit = omit,
|
|
557
|
+
client_user_id: int | Omit = omit,
|
|
558
|
+
countdown: bool | Omit = omit,
|
|
559
|
+
hls_cmaf_url: str | Omit = omit,
|
|
560
|
+
hls_url: str | Omit = omit,
|
|
561
|
+
iframe_url: str | Omit = omit,
|
|
562
|
+
loop: bool | Omit = omit,
|
|
563
|
+
name: str | Omit = omit,
|
|
564
|
+
player_id: int | Omit = omit,
|
|
565
|
+
playlist_type: Literal["live", "vod"] | Omit = omit,
|
|
566
|
+
start_time: str | Omit = omit,
|
|
567
|
+
video_ids: Iterable[int] | Omit = omit,
|
|
535
568
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
536
569
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
537
570
|
extra_headers: Headers | None = None,
|
|
538
571
|
extra_query: Query | None = None,
|
|
539
572
|
extra_body: Body | None = None,
|
|
540
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
573
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
541
574
|
) -> PlaylistCreate:
|
|
542
575
|
"""
|
|
543
576
|
Playlist is a curated collection of video content organized in a sequential
|
|
544
|
-
manner.
|
|
545
|
-
|
|
577
|
+
manner.
|
|
578
|
+
|
|
579
|
+
This method offers several advantages and features that are typical of live
|
|
580
|
+
streaming but with more control over the content. Here's how it works:
|
|
546
581
|
|
|
547
582
|
- Playlist always consists only of static VOD videos you previously uploaded to
|
|
548
583
|
the system.
|
|
@@ -552,24 +587,33 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
552
587
|
- Playlist can be looped endlessly. In this case, all the videos in the list
|
|
553
588
|
will be constantly repeated through the list.
|
|
554
589
|
- Playlist can be programmed to be played at a specific time in the future. In
|
|
555
|
-
that case, before the start time there will be empty manifest.
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
590
|
+
that case, before the start time there will be empty manifest.
|
|
591
|
+
|
|
592
|
+
You can add new videos to the list, remove unnecessary videos, or change the
|
|
593
|
+
order of videos in the list. But please pay attention to when the video list
|
|
594
|
+
changes, it is updated instantly on the server. This means that after saving the
|
|
595
|
+
changed list, the playlist will be reloaded for all users and it will start
|
|
596
|
+
plays from the very first element.
|
|
597
|
+
|
|
598
|
+
Maximum video limit = 128 videos in a row.
|
|
561
599
|
|
|
562
600
|
Examples of usage:
|
|
563
601
|
|
|
564
602
|
- Looped video playback
|
|
565
|
-
- Scheduled playback
|
|
566
|
-
|
|
603
|
+
- Scheduled playback
|
|
604
|
+
|
|
605
|
+
**Looped video playback**
|
|
606
|
+
|
|
607
|
+
It can be used to simulate TV channel pre-programmed behaviour.
|
|
608
|
+
|
|
567
609
|
- Selection: Choose a series of videos, such as TV show episodes, movies,
|
|
568
610
|
tutorials, or any other relevant content.
|
|
569
611
|
- Order: Arrange the selected videos in the desired sequence, much like setting
|
|
570
612
|
a broadcast schedule.
|
|
571
613
|
- Looping: Optionally, the playlist can be set to loop, replaying the sequence
|
|
572
|
-
once it finishes to maintain a continuous stream.
|
|
614
|
+
once it finishes to maintain a continuous stream.
|
|
615
|
+
|
|
616
|
+
Example:
|
|
573
617
|
|
|
574
618
|
```
|
|
575
619
|
active: true
|
|
@@ -577,9 +621,11 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
577
621
|
name: "Playlist: TV channel 'The world around us' (Programmed broadcast for 24 hours)"
|
|
578
622
|
```
|
|
579
623
|
|
|
580
|
-
**Scheduled playback**
|
|
581
|
-
|
|
582
|
-
|
|
624
|
+
**Scheduled playback**
|
|
625
|
+
|
|
626
|
+
It can be used to simulate live events such as virtual concerts, webinars, or
|
|
627
|
+
any special broadcasts without the logistical challenges of an actual live
|
|
628
|
+
stream.
|
|
583
629
|
|
|
584
630
|
- Timing: Set specific start time, creating the illusion of a live broadcast
|
|
585
631
|
schedule.
|
|
@@ -640,8 +686,10 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
640
686
|
|
|
641
687
|
iframe_url: A URL to a built-in HTML video player with the video inside. It can be inserted
|
|
642
688
|
into an iframe on your website and the video will automatically play in all
|
|
643
|
-
browsers.
|
|
644
|
-
|
|
689
|
+
browsers.
|
|
690
|
+
|
|
691
|
+
The player can be opened or shared via this direct link. Also the video player
|
|
692
|
+
can be integrated into your web pages using the Iframe tag.
|
|
645
693
|
|
|
646
694
|
Please see the details in `iframe_url` attribute of /videos/{id} method.
|
|
647
695
|
|
|
@@ -661,7 +709,9 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
661
709
|
Datetime in ISO 8601 format.
|
|
662
710
|
|
|
663
711
|
video_ids: A list of VOD IDs included in the playlist. Order of videos in a playlist
|
|
664
|
-
reflects the order of IDs in the array.
|
|
712
|
+
reflects the order of IDs in the array.
|
|
713
|
+
|
|
714
|
+
Maximum video limit = 128.
|
|
665
715
|
|
|
666
716
|
extra_headers: Send extra headers
|
|
667
717
|
|
|
@@ -672,7 +722,9 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
672
722
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
673
723
|
"""
|
|
674
724
|
return await self._post(
|
|
675
|
-
"/streaming/playlists"
|
|
725
|
+
"/streaming/playlists"
|
|
726
|
+
if self._client._base_url_overridden
|
|
727
|
+
else "https://api.gcore.com//streaming/playlists",
|
|
676
728
|
body=await async_maybe_transform(
|
|
677
729
|
{
|
|
678
730
|
"active": active,
|
|
@@ -702,26 +754,26 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
702
754
|
self,
|
|
703
755
|
playlist_id: int,
|
|
704
756
|
*,
|
|
705
|
-
active: bool |
|
|
706
|
-
ad_id: int |
|
|
707
|
-
client_id: int |
|
|
708
|
-
client_user_id: int |
|
|
709
|
-
countdown: bool |
|
|
710
|
-
hls_cmaf_url: str |
|
|
711
|
-
hls_url: str |
|
|
712
|
-
iframe_url: str |
|
|
713
|
-
loop: bool |
|
|
714
|
-
name: str |
|
|
715
|
-
player_id: int |
|
|
716
|
-
playlist_type: Literal["live", "vod"] |
|
|
717
|
-
start_time: str |
|
|
718
|
-
video_ids: Iterable[int] |
|
|
757
|
+
active: bool | Omit = omit,
|
|
758
|
+
ad_id: int | Omit = omit,
|
|
759
|
+
client_id: int | Omit = omit,
|
|
760
|
+
client_user_id: int | Omit = omit,
|
|
761
|
+
countdown: bool | Omit = omit,
|
|
762
|
+
hls_cmaf_url: str | Omit = omit,
|
|
763
|
+
hls_url: str | Omit = omit,
|
|
764
|
+
iframe_url: str | Omit = omit,
|
|
765
|
+
loop: bool | Omit = omit,
|
|
766
|
+
name: str | Omit = omit,
|
|
767
|
+
player_id: int | Omit = omit,
|
|
768
|
+
playlist_type: Literal["live", "vod"] | Omit = omit,
|
|
769
|
+
start_time: str | Omit = omit,
|
|
770
|
+
video_ids: Iterable[int] | Omit = omit,
|
|
719
771
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
720
772
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
721
773
|
extra_headers: Headers | None = None,
|
|
722
774
|
extra_query: Query | None = None,
|
|
723
775
|
extra_body: Body | None = None,
|
|
724
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
776
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
725
777
|
) -> Playlist:
|
|
726
778
|
"""Change playlist
|
|
727
779
|
|
|
@@ -771,8 +823,10 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
771
823
|
|
|
772
824
|
iframe_url: A URL to a built-in HTML video player with the video inside. It can be inserted
|
|
773
825
|
into an iframe on your website and the video will automatically play in all
|
|
774
|
-
browsers.
|
|
775
|
-
|
|
826
|
+
browsers.
|
|
827
|
+
|
|
828
|
+
The player can be opened or shared via this direct link. Also the video player
|
|
829
|
+
can be integrated into your web pages using the Iframe tag.
|
|
776
830
|
|
|
777
831
|
Please see the details in `iframe_url` attribute of /videos/{id} method.
|
|
778
832
|
|
|
@@ -792,7 +846,9 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
792
846
|
Datetime in ISO 8601 format.
|
|
793
847
|
|
|
794
848
|
video_ids: A list of VOD IDs included in the playlist. Order of videos in a playlist
|
|
795
|
-
reflects the order of IDs in the array.
|
|
849
|
+
reflects the order of IDs in the array.
|
|
850
|
+
|
|
851
|
+
Maximum video limit = 128.
|
|
796
852
|
|
|
797
853
|
extra_headers: Send extra headers
|
|
798
854
|
|
|
@@ -803,7 +859,9 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
803
859
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
804
860
|
"""
|
|
805
861
|
return await self._patch(
|
|
806
|
-
f"/streaming/playlists/{playlist_id}"
|
|
862
|
+
f"/streaming/playlists/{playlist_id}"
|
|
863
|
+
if self._client._base_url_overridden
|
|
864
|
+
else f"https://api.gcore.com//streaming/playlists/{playlist_id}",
|
|
807
865
|
body=await async_maybe_transform(
|
|
808
866
|
{
|
|
809
867
|
"active": active,
|
|
@@ -832,13 +890,13 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
832
890
|
def list(
|
|
833
891
|
self,
|
|
834
892
|
*,
|
|
835
|
-
page: int |
|
|
893
|
+
page: int | Omit = omit,
|
|
836
894
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
837
895
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
838
896
|
extra_headers: Headers | None = None,
|
|
839
897
|
extra_query: Query | None = None,
|
|
840
898
|
extra_body: Body | None = None,
|
|
841
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
899
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
842
900
|
) -> AsyncPaginator[Playlist, AsyncPageStreaming[Playlist]]:
|
|
843
901
|
"""Returns a list of created playlists
|
|
844
902
|
|
|
@@ -856,7 +914,9 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
856
914
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
857
915
|
"""
|
|
858
916
|
return self._get_api_list(
|
|
859
|
-
"/streaming/playlists"
|
|
917
|
+
"/streaming/playlists"
|
|
918
|
+
if self._client._base_url_overridden
|
|
919
|
+
else "https://api.gcore.com//streaming/playlists",
|
|
860
920
|
page=AsyncPageStreaming[Playlist],
|
|
861
921
|
options=make_request_options(
|
|
862
922
|
extra_headers=extra_headers,
|
|
@@ -877,7 +937,7 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
877
937
|
extra_headers: Headers | None = None,
|
|
878
938
|
extra_query: Query | None = None,
|
|
879
939
|
extra_body: Body | None = None,
|
|
880
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
940
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
881
941
|
) -> None:
|
|
882
942
|
"""
|
|
883
943
|
Delete playlist
|
|
@@ -893,7 +953,9 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
893
953
|
"""
|
|
894
954
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
895
955
|
return await self._delete(
|
|
896
|
-
f"/streaming/playlists/{playlist_id}"
|
|
956
|
+
f"/streaming/playlists/{playlist_id}"
|
|
957
|
+
if self._client._base_url_overridden
|
|
958
|
+
else f"https://api.gcore.com//streaming/playlists/{playlist_id}",
|
|
897
959
|
options=make_request_options(
|
|
898
960
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
899
961
|
),
|
|
@@ -909,7 +971,7 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
909
971
|
extra_headers: Headers | None = None,
|
|
910
972
|
extra_query: Query | None = None,
|
|
911
973
|
extra_body: Body | None = None,
|
|
912
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
974
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
913
975
|
) -> Playlist:
|
|
914
976
|
"""
|
|
915
977
|
Returns a playlist details
|
|
@@ -924,7 +986,9 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
924
986
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
925
987
|
"""
|
|
926
988
|
return await self._get(
|
|
927
|
-
f"/streaming/playlists/{playlist_id}"
|
|
989
|
+
f"/streaming/playlists/{playlist_id}"
|
|
990
|
+
if self._client._base_url_overridden
|
|
991
|
+
else f"https://api.gcore.com//streaming/playlists/{playlist_id}",
|
|
928
992
|
options=make_request_options(
|
|
929
993
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
930
994
|
),
|
|
@@ -940,7 +1004,7 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
940
1004
|
extra_headers: Headers | None = None,
|
|
941
1005
|
extra_query: Query | None = None,
|
|
942
1006
|
extra_body: Body | None = None,
|
|
943
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1007
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
944
1008
|
) -> PlaylistListVideosResponse:
|
|
945
1009
|
"""
|
|
946
1010
|
Shows ordered array of playlist videos
|
|
@@ -955,7 +1019,9 @@ class AsyncPlaylistsResource(AsyncAPIResource):
|
|
|
955
1019
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
956
1020
|
"""
|
|
957
1021
|
return await self._get(
|
|
958
|
-
f"/streaming/playlists/{playlist_id}/videos"
|
|
1022
|
+
f"/streaming/playlists/{playlist_id}/videos"
|
|
1023
|
+
if self._client._base_url_overridden
|
|
1024
|
+
else f"https://api.gcore.com//streaming/playlists/{playlist_id}/videos",
|
|
959
1025
|
options=make_request_options(
|
|
960
1026
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
961
1027
|
),
|