enconnect.youtube package#
Subpackages#
Submodules#
enconnect.youtube.models module#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enconnect.youtube.models.YouTubeResult(*, kind: Literal['channel', 'playlist', 'video'], channel: str | None = None, playlist: str | None = None, video: str | None = None, title: str, about: str | None = None, channel_title: str | None = None, thumbnail: str, published: str)[source]#
Bases:
BaseModelContains information returned from the upstream response.
- about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- channel: 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')]#
- kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- model_config = {'extra': 'ignore'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- playlist: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- class enconnect.youtube.models.YouTubeVideo(*, kind: Literal['channel', 'playlist', 'video'], channel: str, video: str, title: str, about: str | None = None, thumbnail: str, published: str)[source]#
Bases:
BaseModelContains information returned from the upstream response.
- about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- channel: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- model_config = {'extra': 'ignore'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
enconnect.youtube.params module#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enconnect.youtube.params.YouTubeParams(*, timeout: Annotated[int, Ge(ge=1), Le(le=300)] = 30, token: Annotated[str, MinLen(min_length=1)], ssl_verify: bool = True, ssl_capem: Annotated[str | None, MinLen(min_length=1)] = None)[source]#
Bases:
BaseModelProcess and validate the class configuration parameters.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
- ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
enconnect.youtube.youtube module#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- 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 client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: YouTubeParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
Module contents#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- 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 client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: YouTubeParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- class enconnect.youtube.YouTubeParams(*, timeout: Annotated[int, Ge(ge=1), Le(le=300)] = 30, token: Annotated[str, MinLen(min_length=1)], ssl_verify: bool = True, ssl_capem: Annotated[str | None, MinLen(min_length=1)] = None)[source]#
Bases:
BaseModelProcess and validate the class configuration parameters.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
- ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
- class enconnect.youtube.YouTubeResult(*, kind: Literal['channel', 'playlist', 'video'], channel: str | None = None, playlist: str | None = None, video: str | None = None, title: str, about: str | None = None, channel_title: str | None = None, thumbnail: str, published: str)[source]#
Bases:
BaseModelContains information returned from the upstream response.
- about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- channel: 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')]#
- kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- model_config = {'extra': 'ignore'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- playlist: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- class enconnect.youtube.YouTubeVideo(*, kind: Literal['channel', 'playlist', 'video'], channel: str, video: str, title: str, about: str | None = None, thumbnail: str, published: str)[source]#
Bases:
BaseModelContains information returned from the upstream response.
- about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- channel: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- model_config = {'extra': 'ignore'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#