enconnect.youtube package#

Submodules#

enconnect.youtube.models module#

class enconnect.youtube.models.YouTubeResult[source]#

Bases: BaseModel

Contains information returned from the upstream response.

Fields#

Field

Type

Required

Default

about

str | None

No

None

channel

str | None

No

None

channel_title

str | None

No

None

kind

Literal[‘channel’, ‘playlist’, ‘video’]

Yes

playlist

str | None

No

None

published

str

Yes

thumbnail

str

Yes

title

str

Yes

video

str | None

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')]#
thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
class enconnect.youtube.models.YouTubeVideo[source]#

Bases: BaseModel

Contains information returned from the upstream response.

Fields#

Field

Type

Required

Default

about

str | None

No

None

channel

str

Yes

kind

Literal[‘channel’, ‘playlist’, ‘video’]

Yes

published

str

Yes

thumbnail

str

Yes

title

str

Yes

video

str

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')]#
thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#

enconnect.youtube.params module#

class enconnect.youtube.params.YouTubeParams[source]#

Bases: BaseModel

Process and validate the class configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

ssl_capem

str | None

No

None

min_length=1

ssl_verify

bool

No

True

timeout

int

No

30

ge=1, le=300

token

str

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)])]#
ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#

enconnect.youtube.youtube module#

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 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: object

Interact 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: BaseModel

Process and validate the class configuration parameters.

Fields#

Field

Type

Required

Default

Constraints

ssl_capem

str | None

No

None

min_length=1

ssl_verify

bool

No

True

timeout

int

No

30

ge=1, le=300

token

str

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)])]#
ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
class enconnect.youtube.YouTubeResult[source]#

Bases: BaseModel

Contains information returned from the upstream response.

Fields#

Field

Type

Required

Default

about

str | None

No

None

channel

str | None

No

None

channel_title

str | None

No

None

kind

Literal[‘channel’, ‘playlist’, ‘video’]

Yes

playlist

str | None

No

None

published

str

Yes

thumbnail

str

Yes

title

str

Yes

video

str | None

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')]#
thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
class enconnect.youtube.YouTubeVideo[source]#

Bases: BaseModel

Contains information returned from the upstream response.

Fields#

Field

Type

Required

Default

about

str | None

No

None

channel

str

Yes

kind

Literal[‘channel’, ‘playlist’, ‘video’]

Yes

published

str

Yes

thumbnail

str

Yes

title

str

Yes

video

str

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')]#
thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
published: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#