enconnect.youtube package#
Submodules#
enconnect.youtube.models module#
- class enconnect.youtube.models.YouTubeResult[source]#
Bases:
BaseModelContains information returned from the upstream response.
Fields# Field
Type
Required
Default
No
NoneNo
NoneNo
NoneLiteral[‘channel’, ‘playlist’, ‘video’]Yes
No
NoneYes
Yes
Yes
No
None- kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- channel: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- playlist: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- video: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- title: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- channel_title: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- class enconnect.youtube.models.YouTubeVideo[source]#
Bases:
BaseModelContains information returned from the upstream response.
Fields# Field
Type
Required
Default
No
NoneYes
Literal[‘channel’, ‘playlist’, ‘video’]Yes
Yes
Yes
Yes
Yes
- kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- channel: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- video: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- title: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
enconnect.youtube.params module#
- class enconnect.youtube.params.YouTubeParams[source]#
Bases:
BaseModelProcess and validate the class configuration parameters.
Fields# Field
Type
Required
Default
Constraints
No
Nonemin_length=1
No
TrueNo
30ge=1, le=300
Yes
min_length=1
- timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
- token: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
enconnect.youtube.youtube module#
- class enconnect.youtube.youtube.YouTube(params: YouTubeParams)[source]#
Bases:
objectInteract with the cloud service API with various methods.
- Parameters:
params – Parameters used to instantiate the class.
- property params: YouTubeParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- request_block(method: Literal['get'], path: str, params: dict[str, Any] | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
- Returns:
Response from upstream request to the server.
- async request_async(method: Literal['get'], path: str, params: dict[str, Any] | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
- Returns:
Response from upstream request to the server.
- search(params: dict[str, Any] | None = None) list[YouTubeResult][source]#
Return the results from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- search_block(params: dict[str, Any] | None = None) list[YouTubeResult][source]#
Return the results from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- async search_async(params: dict[str, Any] | None = None) list[YouTubeResult][source]#
Return the results from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- videos(params: dict[str, Any] | None = None) list[YouTubeVideo][source]#
Return the videos from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- videos_block(params: dict[str, Any] | None = None) list[YouTubeVideo][source]#
Return the videos from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- async videos_async(params: dict[str, Any] | None = None) list[YouTubeVideo][source]#
Return the videos from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- video(unique: str) YouTubeVideo[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- video_block(unique: str) YouTubeVideo[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- async video_async(unique: str) YouTubeVideo[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
Module contents#
- class enconnect.youtube.YouTube(params: YouTubeParams)[source]#
Bases:
objectInteract with the cloud service API with various methods.
- Parameters:
params – Parameters used to instantiate the class.
- property params: YouTubeParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- request_block(method: Literal['get'], path: str, params: dict[str, Any] | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
- Returns:
Response from upstream request to the server.
- async request_async(method: Literal['get'], path: str, params: dict[str, Any] | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
- Returns:
Response from upstream request to the server.
- search(params: dict[str, Any] | None = None) list[YouTubeResult][source]#
Return the results from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- search_block(params: dict[str, Any] | None = None) list[YouTubeResult][source]#
Return the results from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- async search_async(params: dict[str, Any] | None = None) list[YouTubeResult][source]#
Return the results from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- videos(params: dict[str, Any] | None = None) list[YouTubeVideo][source]#
Return the videos from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- videos_block(params: dict[str, Any] | None = None) list[YouTubeVideo][source]#
Return the videos from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- async videos_async(params: dict[str, Any] | None = None) list[YouTubeVideo][source]#
Return the videos from the provided search parameters.
- Parameters:
params – Optional parameters included in request.
- Returns:
Results from the provided search parameters.
- video(unique: str) YouTubeVideo[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- video_block(unique: str) YouTubeVideo[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- async video_async(unique: str) YouTubeVideo[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- class enconnect.youtube.YouTubeParams[source]#
Bases:
BaseModelProcess and validate the class configuration parameters.
Fields# Field
Type
Required
Default
Constraints
No
Nonemin_length=1
No
TrueNo
30ge=1, le=300
Yes
min_length=1
- timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
- token: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- class enconnect.youtube.YouTubeResult[source]#
Bases:
BaseModelContains information returned from the upstream response.
Fields# Field
Type
Required
Default
No
NoneNo
NoneNo
NoneLiteral[‘channel’, ‘playlist’, ‘video’]Yes
No
NoneYes
Yes
Yes
No
None- kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- channel: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- playlist: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- video: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- title: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- channel_title: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- class enconnect.youtube.YouTubeVideo[source]#
Bases:
BaseModelContains information returned from the upstream response.
Fields# Field
Type
Required
Default
No
NoneYes
Literal[‘channel’, ‘playlist’, ‘video’]Yes
Yes
Yes
Yes
Yes
- kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- channel: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- video: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- title: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#