# Epg (*epg*) ## Overview The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when ### Available Operations * [compute_channel_map](#compute_channel_map) - Compute the best channel map * [get_channels](#get_channels) - Get channels for a lineup * [get_countries](#get_countries) - Get all countries * [get_all_languages](#get_all_languages) - Get all languages * [get_lineup](#get_lineup) - Compute the best lineup * [get_lineup_channels](#get_lineup_channels) - Get the channels for mulitple lineups * [get_countries_lineups](#get_countries_lineups) - Get lineups for a country via postal code * [get_country_regions](#get_country_regions) - Get regions for a country * [list_lineups](#list_lineups) - Get lineups for a region ## compute_channel_map Compute the best channel map, given device and lineup ### Example Usage ```python from plex_api_client import PlexAPI from plex_api_client.models import components with PlexAPI( accepts=components.Accepts.APPLICATION_XML, client_identifier="abc123", product="Plex for Roku", version="2.4.1", platform="Roku", platform_version="4.3 build 1057", device="Roku 3", model="4200X", device_vendor="Roku", device_name="Living Room TV", marketplace="googlePlay", token="", ) as plex_api: res = plex_api.epg.compute_channel_map(request={ "device_query_parameter": "", "lineup": "", }) assert res.object is not None # Handle response print(res.object) ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `request` | [operations.ComputeChannelMapRequest](../../models/operations/computechannelmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.ComputeChannelMapResponse](../../models/operations/computechannelmapresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## get_channels Get channels for a lineup within an EPG provider ### Example Usage ```python from plex_api_client import PlexAPI from plex_api_client.models import components with PlexAPI( accepts=components.Accepts.APPLICATION_XML, client_identifier="abc123", product="Plex for Roku", version="2.4.1", platform="Roku", platform_version="4.3 build 1057", device="Roku 3", model="4200X", device_vendor="Roku", device_name="Living Room TV", marketplace="googlePlay", token="", ) as plex_api: res = plex_api.epg.get_channels(request={ "lineup": "", }) assert res.object is not None # Handle response print(res.object) ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `request` | [operations.GetChannelsRequest](../../models/operations/getchannelsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetChannelsResponse](../../models/operations/getchannelsresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## get_countries This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute ### Example Usage ```python from plex_api_client import PlexAPI with PlexAPI( token="", ) as plex_api: res = plex_api.epg.get_countries() assert res.object is not None # Handle response print(res.object) ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetCountriesResponse](../../models/operations/getcountriesresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## get_all_languages Returns a list of all possible languages for EPG data. ### Example Usage ```python from plex_api_client import PlexAPI with PlexAPI( token="", ) as plex_api: res = plex_api.epg.get_all_languages() assert res.object is not None # Handle response print(res.object) ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetAllLanguagesResponse](../../models/operations/getalllanguagesresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## get_lineup Compute the best lineup, given lineup group and device ### Example Usage ```python from plex_api_client import PlexAPI from plex_api_client.models import components with PlexAPI( accepts=components.Accepts.APPLICATION_XML, client_identifier="abc123", product="Plex for Roku", version="2.4.1", platform="Roku", platform_version="4.3 build 1057", device="Roku 3", model="4200X", device_vendor="Roku", device_name="Living Room TV", marketplace="googlePlay", token="", ) as plex_api: res = plex_api.epg.get_lineup(request={ "device_query_parameter": "", "lineup_group": "", }) assert res is not None # Handle response print(res) ``` ### Parameters | Parameter | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | | `request` | [operations.GetLineupRequest](../../models/operations/getlineuprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetLineupResponse](../../models/operations/getlineupresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## get_lineup_channels Get the channels across multiple lineups ### Example Usage ```python from plex_api_client import PlexAPI from plex_api_client.models import components with PlexAPI( accepts=components.Accepts.APPLICATION_XML, client_identifier="abc123", product="Plex for Roku", version="2.4.1", platform="Roku", platform_version="4.3 build 1057", device="Roku 3", model="4200X", device_vendor="Roku", device_name="Living Room TV", marketplace="googlePlay", token="", ) as plex_api: res = plex_api.epg.get_lineup_channels(request={ "lineup": [ "", "", ], }) assert res.object is not None # Handle response print(res.object) ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `request` | [operations.GetLineupChannelsRequest](../../models/operations/getlineupchannelsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetLineupChannelsResponse](../../models/operations/getlineupchannelsresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## get_countries_lineups Returns a list of lineups for a given country, EPG provider and postal code ### Example Usage ```python from plex_api_client import PlexAPI from plex_api_client.models import components with PlexAPI( accepts=components.Accepts.APPLICATION_XML, client_identifier="abc123", product="Plex for Roku", version="2.4.1", platform="Roku", platform_version="4.3 build 1057", device="Roku 3", model="4200X", device_vendor="Roku", device_name="Living Room TV", marketplace="googlePlay", token="", ) as plex_api: res = plex_api.epg.get_countries_lineups(request={ "country": "Malawi", "epg_id": "", }) assert res.media_container_with_lineup is not None # Handle response print(res.media_container_with_lineup) ``` ### Parameters | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `request` | [operations.GetCountriesLineupsRequest](../../models/operations/getcountrieslineupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetCountriesLineupsResponse](../../models/operations/getcountrieslineupsresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## get_country_regions Get regions for a country within an EPG provider ### Example Usage ```python from plex_api_client import PlexAPI from plex_api_client.models import components with PlexAPI( accepts=components.Accepts.APPLICATION_XML, client_identifier="abc123", product="Plex for Roku", version="2.4.1", platform="Roku", platform_version="4.3 build 1057", device="Roku 3", model="4200X", device_vendor="Roku", device_name="Living Room TV", marketplace="googlePlay", token="", ) as plex_api: res = plex_api.epg.get_country_regions(request={ "country": "Morocco", "epg_id": "", }) assert res.object is not None # Handle response print(res.object) ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `request` | [operations.GetCountryRegionsRequest](../../models/operations/getcountryregionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.GetCountryRegionsResponse](../../models/operations/getcountryregionsresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | ## list_lineups Get lineups for a region within an EPG provider ### Example Usage ```python from plex_api_client import PlexAPI from plex_api_client.models import components with PlexAPI( accepts=components.Accepts.APPLICATION_XML, client_identifier="abc123", product="Plex for Roku", version="2.4.1", platform="Roku", platform_version="4.3 build 1057", device="Roku 3", model="4200X", device_vendor="Roku", device_name="Living Room TV", marketplace="googlePlay", token="", ) as plex_api: res = plex_api.epg.list_lineups(request={ "country": "Vanuatu", "epg_id": "", "region": "", }) assert res.media_container_with_lineup is not None # Handle response print(res.media_container_with_lineup) ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `request` | [operations.ListLineupsRequest](../../models/operations/listlineupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.ListLineupsResponse](../../models/operations/listlineupsresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* |