## EPG Endpoints [/livetv/epg]
These endpoint detail the EPG portion of the interface.
### Get all countries [GET /livetv/epg/countries]
This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute:
- `0`: The country is divided into regions, and following the key will lead to a list of regions.
- `1`: The county is divided by postal codes, and an example code is returned in `example`.
- `2`: The country has a single postal code, returned in `example`.
+ Response 200 (application/xml)
"
"
### Get all languages [GET /livetv/epg/languages]
Returns a list of all possible languages for EPG data.
+ Response 200 (application/xml)
"
"
### Get regions for a country [GET /livetv/epg/countries/{country}/{epgIdentifier}/regions]
+ Parameters
+ country: `usa` - The ISO country code.
+ epgIdentifier: `tv.plex.providers.epg.eyeq` ~ The EPG identifier.
+ Response 200 (application/xml)
"
"
### Get lineups for a region [GET /livetv/epg/countries/{country}/{epgIdentifier}/regions/{region}/lineups{?country,region}]
Returns the list of lineups for a given country, EPG provider, and region. There are four types of lineups returned in `lineupType`:
- `0`: Over the air
- `1`: Cable
- `2`: Satellite
- `3`: IPTV
- `4`: Virtual
+ Parameters
+ country: `bhr` - The ISO country code.
+ epgIdentifier: `tv.plex.providers.epg.eyeq` ~ The EPG identifier.
+ region: `134535`
+ Response 200 (application/xml)
"
"
### Get lineups for a country via postal code [GET /livetv/epg/countries/{country}/{epgIdentifier}/lineups{?postalCode}]
Returns a list of lineups for a given country, EPG provider and postal code.
+ Parameters
+ postalCode: `AI-2640` - The postal code.
+ country: `aia` - The ISO country code.
+ epgIdentifier: `tv.plex.providers.epg.onconnect` ~ The EPG identifier.
+ Response 200 (application/xml)
"
"
### Get channels for a lineup [GET /livetv/epg/channels{?lineup}]
+ Parameters
+ lineup: `lineup://tv.plex.providers.epg.onconnect/CAN-OTAV4R2G5` - The URI describing the lineup.
+ Response 200 (application/xml)
"
"
### Compute the best channel map, given device and lineup [GET /livetv/epg/channelmap{?device,lineup}]
+ Parameters
+ device: `device://tv.plex.grabbers.hdhomerun/1053C0CA` - The device.
+ lineup: `lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT` - The lineup.
+ Response 200 (application/xml)
"
"
### Compute the best lineup, given lineup group and device [GET /livetv/epg/lineup{?device,lineupGroup}]
+ Parameters
+ device: `device://tv.plex.grabbers.hdhomerun/1053C0CA` - The device.
+ lineupGroup: `lineup-group://onconnect/usa/96708` - The lineup group.
+ Response 200 (application/xml)
+ Headers
X-Plex-Activity: 7e650c37-1639-4f60-9866-09b8eaf35a7a
+ Body
""