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.
- pydantic model enconnect.youtube.models.YouTubeResult[source]#
Bases:
BaseModel
Contains information returned from the upstream response.
Show JSON schema
{ "title": "YouTubeResult", "description": "Contains information returned from the upstream response.", "type": "object", "properties": { "kind": { "description": "Value from the server response", "enum": [ "channel", "playlist", "video" ], "title": "Kind", "type": "string" }, "channel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Channel" }, "playlist": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Playlist" }, "video": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Video" }, "title": { "description": "Value from the server response", "title": "Title", "type": "string" }, "about": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "About" }, "channel_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Channel Title" }, "thumbnail": { "description": "Value from the server response", "title": "Thumbnail", "type": "string" }, "published": { "description": "Value from the server response", "title": "Published", "type": "string" } }, "required": [ "kind", "title", "thumbnail", "published" ] }
- Config:
extra: str = ignore
- Fields:
- field about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field channel: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field channel_title: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field playlist: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- pydantic model enconnect.youtube.models.YouTubeVideo[source]#
Bases:
BaseModel
Contains information returned from the upstream response.
Show JSON schema
{ "title": "YouTubeVideo", "description": "Contains information returned from the upstream response.", "type": "object", "properties": { "kind": { "description": "Value from the server response", "enum": [ "channel", "playlist", "video" ], "title": "Kind", "type": "string" }, "channel": { "description": "Value from the server response", "title": "Channel", "type": "string" }, "video": { "description": "Value from the server response", "title": "Video", "type": "string" }, "title": { "description": "Value from the server response", "title": "Title", "type": "string" }, "about": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "About" }, "thumbnail": { "description": "Value from the server response", "title": "Thumbnail", "type": "string" }, "published": { "description": "Value from the server response", "title": "Published", "type": "string" } }, "required": [ "kind", "channel", "video", "title", "thumbnail", "published" ] }
- Config:
extra: str = ignore
- Fields:
- field about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field channel: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
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.
- pydantic model enconnect.youtube.params.YouTubeParams[source]#
Bases:
BaseModel
Process and validate the class configuration parameters.
Show JSON schema
{ "title": "YouTubeParams", "description": "Process and validate the class configuration parameters.", "type": "object", "properties": { "timeout": { "default": 30, "description": "Timeout connecting to server", "maximum": 300, "minimum": 1, "title": "Timeout", "type": "integer" }, "token": { "description": "Parameter for the integration", "minLength": 1, "title": "Token", "type": "string" }, "ssl_verify": { "default": true, "description": "Verify the ceritifcate valid", "title": "Ssl Verify", "type": "boolean" }, "ssl_capem": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Verify the ceritifcate valid", "title": "Ssl Capem" } }, "additionalProperties": false, "required": [ "token" ] }
- Config:
extra: str = forbid
- Fields:
- field ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])] = None#
Verify the ceritifcate valid
- Constraints:
min_length = 1
- field ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')] = True#
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:
object
Interact 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:
object
Interact 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.
- pydantic model enconnect.youtube.YouTubeParams[source]#
Bases:
BaseModel
Process and validate the class configuration parameters.
Show JSON schema
{ "title": "YouTubeParams", "description": "Process and validate the class configuration parameters.", "type": "object", "properties": { "timeout": { "default": 30, "description": "Timeout connecting to server", "maximum": 300, "minimum": 1, "title": "Timeout", "type": "integer" }, "token": { "description": "Parameter for the integration", "minLength": 1, "title": "Token", "type": "string" }, "ssl_verify": { "default": true, "description": "Verify the ceritifcate valid", "title": "Ssl Verify", "type": "boolean" }, "ssl_capem": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Verify the ceritifcate valid", "title": "Ssl Capem" } }, "additionalProperties": false, "required": [ "token" ] }
- Config:
extra: str = forbid
- Fields:
- field ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])] = None#
Verify the ceritifcate valid
- Constraints:
min_length = 1
- field ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')] = True#
Verify the ceritifcate valid
- pydantic model enconnect.youtube.YouTubeResult[source]#
Bases:
BaseModel
Contains information returned from the upstream response.
Show JSON schema
{ "title": "YouTubeResult", "description": "Contains information returned from the upstream response.", "type": "object", "properties": { "kind": { "description": "Value from the server response", "enum": [ "channel", "playlist", "video" ], "title": "Kind", "type": "string" }, "channel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Channel" }, "playlist": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Playlist" }, "video": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Video" }, "title": { "description": "Value from the server response", "title": "Title", "type": "string" }, "about": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "About" }, "channel_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Channel Title" }, "thumbnail": { "description": "Value from the server response", "title": "Thumbnail", "type": "string" }, "published": { "description": "Value from the server response", "title": "Published", "type": "string" } }, "required": [ "kind", "title", "thumbnail", "published" ] }
- Config:
extra: str = ignore
- Fields:
- field about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field channel: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field channel_title: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field playlist: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- pydantic model enconnect.youtube.YouTubeVideo[source]#
Bases:
BaseModel
Contains information returned from the upstream response.
Show JSON schema
{ "title": "YouTubeVideo", "description": "Contains information returned from the upstream response.", "type": "object", "properties": { "kind": { "description": "Value from the server response", "enum": [ "channel", "playlist", "video" ], "title": "Kind", "type": "string" }, "channel": { "description": "Value from the server response", "title": "Channel", "type": "string" }, "video": { "description": "Value from the server response", "title": "Video", "type": "string" }, "title": { "description": "Value from the server response", "title": "Title", "type": "string" }, "about": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "About" }, "thumbnail": { "description": "Value from the server response", "title": "Thumbnail", "type": "string" }, "published": { "description": "Value from the server response", "title": "Published", "type": "string" } }, "required": [ "kind", "channel", "video", "title", "thumbnail", "published" ] }
- Config:
extra: str = ignore
- Fields:
- field about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field channel: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field kind: Annotated[Literal['channel', 'playlist', 'video'], FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response