Skip to content

Commit 07752f8

Browse files
committed
v0.2.4
1 parent a382de6 commit 07752f8

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

ensembledata/api/_async_client.py

+17-4
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,23 @@ async def channel_shorts(
543543
params = {k: v for k, v in params.items() if not (v is None or v is USE_DEFAULT)}
544544
return await self.requester.get("/youtube/channel/shorts", params=params, timeout=timeout)
545545

546+
async def channel_streams(
547+
self,
548+
*,
549+
channel_id: str,
550+
depth: int,
551+
extra_params: Mapping[str, Any] | None = None,
552+
timeout: float | None = None,
553+
) -> EDResponse:
554+
params: dict[str, Any] = {
555+
"browseId": channel_id,
556+
"depth": depth,
557+
}
558+
if extra_params is not None:
559+
params = {**extra_params, **params}
560+
params = {k: v for k, v in params.items() if not (v is None or v is USE_DEFAULT)}
561+
return await self.requester.get("/youtube/channel/streams", params=params, timeout=timeout)
562+
546563
async def video_details(
547564
self,
548565
*,
@@ -813,18 +830,14 @@ async def hashtag_posts(
813830
*,
814831
hashtag: str,
815832
cursor: str | UseDefault = USE_DEFAULT,
816-
chunk_size: int | UseDefault = USE_DEFAULT,
817833
get_author_info: bool | UseDefault = USE_DEFAULT,
818-
alternative_method: bool | UseDefault = USE_DEFAULT,
819834
extra_params: Mapping[str, Any] | None = None,
820835
timeout: float | None = None,
821836
) -> EDResponse:
822837
params: dict[str, Any] = {
823838
"name": hashtag,
824839
"cursor": cursor,
825-
"chunk_size": chunk_size,
826840
"get_author_info": get_author_info,
827-
"alternative_method": alternative_method,
828841
}
829842
if extra_params is not None:
830843
params = {**extra_params, **params}

ensembledata/api/_client.py

+17-4
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,23 @@ def channel_shorts(
541541
params = {k: v for k, v in params.items() if not (v is None or v is USE_DEFAULT)}
542542
return self.requester.get("/youtube/channel/shorts", params=params, timeout=timeout)
543543

544+
def channel_streams(
545+
self,
546+
*,
547+
channel_id: str,
548+
depth: int,
549+
extra_params: Mapping[str, Any] | None = None,
550+
timeout: float | None = None,
551+
) -> EDResponse:
552+
params: dict[str, Any] = {
553+
"browseId": channel_id,
554+
"depth": depth,
555+
}
556+
if extra_params is not None:
557+
params = {**extra_params, **params}
558+
params = {k: v for k, v in params.items() if not (v is None or v is USE_DEFAULT)}
559+
return self.requester.get("/youtube/channel/streams", params=params, timeout=timeout)
560+
544561
def video_details(
545562
self,
546563
*,
@@ -797,18 +814,14 @@ def hashtag_posts(
797814
*,
798815
hashtag: str,
799816
cursor: str | UseDefault = USE_DEFAULT,
800-
chunk_size: int | UseDefault = USE_DEFAULT,
801817
get_author_info: bool | UseDefault = USE_DEFAULT,
802-
alternative_method: bool | UseDefault = USE_DEFAULT,
803818
extra_params: Mapping[str, Any] | None = None,
804819
timeout: float | None = None,
805820
) -> EDResponse:
806821
params: dict[str, Any] = {
807822
"name": hashtag,
808823
"cursor": cursor,
809-
"chunk_size": chunk_size,
810824
"get_author_info": get_author_info,
811-
"alternative_method": alternative_method,
812825
}
813826
if extra_params is not None:
814827
params = {**extra_params, **params}

ensembledata/api/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.2.3"
1+
version = "0.2.4"

0 commit comments

Comments
 (0)