API for client
Weitere Informationen
- main
- introduction
- errors
General information
Query
http://core.teleprom.tv/iptv/api/v1/<fmt>/<cmd>?sid=<sid>&lng=ru¶m1=value1¶m2=value2...
Require parameters
sid | is an optional parameter if you have already passed through COOKIES |
Other parameters
fmt | the Format in which data is returned in response to this query.. Possible values: ◦xml ◦json |
cmd | the name of the function, which need vypolnite on the server and return its execution result to the client. |
Any | request may be a parameter “lang” with two-letter designations for languages (“EN”, “en”, ...). This setting indicates what language the server returns the detail of an error in response to the current request. By default, the server returns errors in the Russian language. |
Description
All API requests are of the form specified section of 'Query'.
Recommended calling method: POST.
All functions return either a response with its own parameters, or, in case of an error or inability to perform the requested operation, reply with the standard settings:
The standard response with error message (for example XML)
<response>
<error>
<code>UNKNOWN</code>
<message>Unknown error</message>
</error>
<servertime>1292870500</servertime>
</response>
The presence of error is the presence in the response of the parameter <error> with a non-empty value of parameter <code>.
Parameter <code> returns a generic alias errors, and not numerical values.
All functions are divided into
• sessional
• working
• control
Task authorization functions: the creation of a working session with obtaining its unique ID (short: SID), maintaining the session in the active state and close the session.
All functions, except the authorization function of the session creation, only work within an open session, passing the SID session COOKIE in HTTP request or a query parameter. Total standard session looks like this:
• invoked the authorization function create a new session (the SID and other session parameters);
• performed all the necessary working and control functions;
• authorization function is called the closure of the session.
Unlike API versions below v1.0, is no longer manufactured, no server conversion.
Because with this:
1. Time_zone contains the settings and TIME_SHIFT stored in the system by the client API is not used directly. API in this case only provides a mechanism for the conservation, alteration, obtaining the specified parameters.
2. Times in UNIXTIMESTAMP format (including EPG) are given to the server as is. Taking into account the local time zone of the client owes, the client program, by adding to the received time the number of seconds offset of client time zone relative to Greenwich (GMT, UTC). The time_shift value passed in the request is returned in the response in the form of number of seconds.
3. If You want to take advantage of the offset broadcast backwards in time (time_shift), You will need to pass this parameter directly in the query. For this You can use it stored in the system, the value obtained by the query get_settings, or to specify a different integer value in the range 0...24 (hours). If the specified parameter in the request You skipped (absent), its default value is considered to be 0.
The example client program with the times API:
Take the current client time = 15:00 UTC = 14:00 (time zone +0100). The client wants to see the current show and coming 1 hour ago. Let's assume it started at exactly 14:00 the customer (13:00 UTC).
To do this, the client first queries the API /get_settings and gets saved on the server value of the client time zone (+0100) and time shift (3 hours). As you can see, the TimeShift saved is not the one we need and we need the value (1 hour) or save or use without saving.
Then the client passes in a query time_shift=1. And receives the EPG transmission time UNIXTIMESTAMP corresponding Greenwich mean time = 13:00 & parameter time_shift=3600. The client saw your local EPG in time, he will have to add to this UNIXTIMESTAMP even your time zone in seconds (in our case = +3600) and time_shift=3600. Then it will convert UNIXTIMESTAMP to its string representation and get their local transmission starting time = 15:00.
Recommended calling method: POST.
All functions return either a response with its own parameters, or, in case of an error or inability to perform the requested operation, reply with the standard settings:
The standard response with error message (for example XML)
<response>
<error>
<code>UNKNOWN</code>
<message>Unknown error</message>
</error>
<servertime>1292870500</servertime>
</response>
The presence of error is the presence in the response of the parameter <error> with a non-empty value of parameter <code>.
Parameter <code> returns a generic alias errors, and not numerical values.
All functions are divided into
• sessional
• working
• control
Task authorization functions: the creation of a working session with obtaining its unique ID (short: SID), maintaining the session in the active state and close the session.
All functions, except the authorization function of the session creation, only work within an open session, passing the SID session COOKIE in HTTP request or a query parameter. Total standard session looks like this:
• invoked the authorization function create a new session (the SID and other session parameters);
• performed all the necessary working and control functions;
• authorization function is called the closure of the session.
Remark
Unlike API versions below v1.0, is no longer manufactured, no server conversion.
Because with this:
1. Time_zone contains the settings and TIME_SHIFT stored in the system by the client API is not used directly. API in this case only provides a mechanism for the conservation, alteration, obtaining the specified parameters.
2. Times in UNIXTIMESTAMP format (including EPG) are given to the server as is. Taking into account the local time zone of the client owes, the client program, by adding to the received time the number of seconds offset of client time zone relative to Greenwich (GMT, UTC). The time_shift value passed in the request is returned in the response in the form of number of seconds.
3. If You want to take advantage of the offset broadcast backwards in time (time_shift), You will need to pass this parameter directly in the query. For this You can use it stored in the system, the value obtained by the query get_settings, or to specify a different integer value in the range 0...24 (hours). If the specified parameter in the request You skipped (absent), its default value is considered to be 0.
The example client program with the times API:
Take the current client time = 15:00 UTC = 14:00 (time zone +0100). The client wants to see the current show and coming 1 hour ago. Let's assume it started at exactly 14:00 the customer (13:00 UTC).
To do this, the client first queries the API /get_settings and gets saved on the server value of the client time zone (+0100) and time shift (3 hours). As you can see, the TimeShift saved is not the one we need and we need the value (1 hour) or save or use without saving.
Then the client passes in a query time_shift=1. And receives the EPG transmission time UNIXTIMESTAMP corresponding Greenwich mean time = 13:00 & parameter time_shift=3600. The client saw your local EPG in time, he will have to add to this UNIXTIMESTAMP even your time zone in seconds (in our case = +3600) and time_shift=3600. Then it will convert UNIXTIMESTAMP to its string representation and get their local transmission starting time = 15:00.
Return section
response | messages are optional. Can be present in any response. |
Carries | information for the client , for example your subscription ends., it is recommended to use dialog box, type confirm(query - close?) |
Errors
Description
CONFIRM | Request additional data |
UNKNOWN | Unknown error |
BAD_NODE | The node is not identified |
BAD_REQ | Bad request |
BAD_CMD | Unknown command |
WRONG_IP | Your IP address has changed |
WRONG_VALUE | The erroneous value |
WRONG_PARAM | The erroneous parameter |
BAD_PAIRS | The number of parameters and the number of values do not match |
FLD_EMPTY | Not all fields are filled |
AСС_WRONG | Username or password incorrect |
AСС_EMPTY | Username or password not set |
AСС_WTYPE | This function is not available to accounts of this type |
ACC_NOSUB | No paid services |
STIMEOUT | The session is outdated |
BAD_SID | Incorrect session ID |
WRONG_SID | There is no open session with that ID |
URL_NOT_FOUND | There was no such reference |
URL_PROTECTED | Erroneous parental password |
login
Query
/login?login=<login>&pass=<pass>&wth_acc=<with_acc>&with_cfg=<with_cfg>
Require parameters
login | - the login of the user |
pass | is the result of the function is MD5(MD5(login) + MD5(pass)), where: |
•login | - the login of the user |
•pass | – user password |
Other parameters
with_acc | Flag-modifier. If present in the answer is added the , |
a | similar answer to the call of the function get_account_info. |
with_cfg | Flag-modifier. If any answer is added in the section |
a | similar answer to the get_settings function call. |
user_agent | - the name of the client program. |
Description
Creates a new session to work with the service
Return section
sid-the | SID Value |
version-the | Version of the API. |
account-Contains | settings similar to the call answer function get_account_info. |
settings-Contains | settings similar to the settings of the answer to the function call |
get_settings. | Is present in the response only if the function call parameter ext. |
servertime-the | Current time (UNIXTIMESTAMP) servers |
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response><sid>4d553f8b0a45153cbb91c8b2f55b1cc2</sid><sid_name>icon</sid_name><media_key>ff818d1c50c2be654278cbc9d39bacc0</media_key><packet_expire>1292870680</packet_expire><version>0.6</version><account>… </account><settings>...</settings><servertime>1292870500</servertime></response>
logout
Query
/logout?sid=<sid>
Description
Closes the current session
Each session has a lifetime setting. And if the logout method is not called, and in a period of time equal to the lifetime of the session has not been called, no work function, the session is considered stale and is automatically closed. After that for further work with the service the client is set again through the process of creating a new session.
Each session has a lifetime setting. And if the logout method is not called, and in a period of time equal to the lifetime of the session has not been called, no work function, the session is considered stale and is automatically closed. After that for further work with the service the client is set again through the process of creating a new session.
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response><message>OK</message><servertime>1292870500</servertime></response>
noop
Query
/noop?sid=<sid>
Description
Checks the current session and informs the server about client activity
The only feature not prolonging the current session.
The only feature not prolonging the current session.
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response><message>OK</message><servertime>1292870500</servertime></response>
get_groups_radio
Query
/get_groups_radio?sid=<sid>
Description
Receiving groups(genres) radio.
Return section
user_title | displays categories in the language specified in the user /get_settings section |
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response><groups><item><id>1</id><alias>SUNDRY</alias><name>Разное</name><color>#000000</color><user_title>Sundry</user_title></item><item><id>2</id><alias>NEWS</alias><name>Новости</name><color>#000000</color><user_title>News</user_title></item><item><id>3</id><alias>HUMOR</alias><name>Юмор</name><color>#000000</color><user_title>Humor</user_title></item><item><id>4</id><alias>MUSIC</alias><name>Музыка</name><color>#000000</color><user_title>Music</user_title></item></groups><servertime>1374845126</servertime></response>
get_list_radio
Query
/get_list_radio?sid=<sid>
Description
Returns a list of available playback channels radio format that includes genres (groups). (“Volumetric format”)
Return section
icons | Templates paths to the icons of the channels. For each size of icons – your. |
groups | channels Groups (as a rule - genres) |
channels | the Channels in this group |
id | the ID of the group or channel |
Character | alias group ID |
number | the channel Number (default sort) |
name | the name of the group or channel |
color | the Color group |
is_video | content Type. 0 - audio (e.g. radio), 1 video (TV for example) |
icon | Name icons of channel (without the file extension and path) |
user_title | displays categories in the language specified in the user /get_settings section |
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response><icons><default>http://server.com/img/ico/radio/%ICON%.gif</default><w40h30>http://server.com/img/ico/radio/%ICON%.gif</w40h30></icons><groups><item><id>1</id><name>Разное</name><user_title>Sundry</user_title><color>#000000</color><channels><item><id>105</id><number>101</number><name>Radio RIGA</name><is_video>0</is_video><icon>_none</icon></item><item><id>106</id><number>102</number><name>LR1</name><is_video>0</is_video><icon>lr1</icon></item><item><id>107</id><number>103</number><name>LR2</name><is_video>0</is_video><icon>lr2</icon></item><item><id>108</id><number>104</number><name>Skonto Latvia</name><is_video>0</is_video><icon>skonto</icon></item><item><id>102</id><number>105</number><name>Radio SWH Latvia</name><is_video>0</is_video><icon>_none</icon></item><item><id>103</id><number>106</number><name>Radio SWH + Latvia</name><is_video>0</is_video><icon>_none</icon></item><item><id>104</id><number>107</number><name>Radio SWH Rock Latvia</name><is_video>0</is_video><icon>_none</icon></item><item><id>111</id><number>108</number><name>NABA Latvia</name><is_video>0</is_video><icon>_none</icon></item><item><id>109</id><number>109</number><name>Radio 101</name><is_video>0</is_video><icon>radio101</icon></item><item><id>110</id><number>110</number><name>Capital FM</name><is_video>0</is_video><icon>capital</icon></item><item><id>101</id><number>111</number><name>MixFM Latvia</name><is_video>0</is_video><icon>mix</icon></item><item><id>112</id><number>112</number><name>Lietus</name><is_video>0</is_video><icon>lietus</icon></item><item><id>113</id><number>113</number><name>Lafesta</name><is_video>0</is_video><icon>lafesta</icon></item><item><id>114</id><number>114</number><name>ZIP FM</name><is_video>0</is_video><icon>zipfm</icon></item><item><id>115</id><number>115</number><name>Radiocentras</name><is_video>0</is_video><icon>radiocentras</icon></item><item><id>116</id><number>116</number><name>Laluna</name><is_video>0</is_video><icon>laluna</icon></item><item><id>117</id><number>117</number><name>TOP radio Latvia</name><is_video>0</is_video><icon>_none</icon></item><item><id>118</id><number>118</number><name>SUPER FM Latvia</name><is_video>0</is_video><icon>_none</icon></item><item><id>77</id><number>202</number><name>Россия</name><is_video>0</is_video><icon>radio-ros</icon></item><item><id>79</id><number>203</number><name>Радио МАЯК</name><is_video>0</is_video><icon>_none</icon></item><item><id>99</id><number>204</number><name>Радио Эхо Москвы</name><is_video>0</is_video><icon>echo</icon></item><item><id>78</id><number>205</number><name>Русское Радио</name><is_video>0</is_video><icon>rusradio</icon></item><item><id>81</id><number>206</number><name>Наше</name><is_video>0</is_video><icon>nashe</icon></item><item><id>70</id><number>207</number><name>Радио КУЛЬТУРА</name><is_video>0</is_video><icon>_none</icon></item><item><id>80</id><number>208</number><name>Радио МАКСИМУМ</name><is_video>0</is_video><icon>_none</icon></item><item><id>74</id><number>211</number><name>Ю FM</name><is_video>0</is_video><icon>_none</icon></item><item><id>76</id><number>212</number><name>Ретро</name><is_video>0</is_video><icon>retro</icon></item><item><id>69</id><number>214</number><name>D-FM</name><is_video>0</is_video><icon>dfm</icon></item><item><id>50</id><number>217</number><name>BEST FM</name><is_video>0</is_video><icon>gala</icon></item><item><id>51</id><number>219</number><name>Радио Шансон Москва</name><is_video>0</is_video><icon>shanson</icon></item></channels></item><item><id>2</id><name>Новости</name><user_title>News</user_title><color>#000000</color><channels><item><id>75</id><number>201</number><name>ВЕСТИ FM</name><is_video>0</is_video><icon>_none</icon></item></channels></item><item><id>3</id><name>Юмор</name><user_title>Humor</user_title><color>#000000</color><channels><item><id>83</id><number>215</number><name>ЮМОРFM</name><is_video>0</is_video><icon>_none</icon></item></channels></item><item><id>4</id><name>Музыка</name><user_title>Music</user_title><color>#000000</color><channels><item><id>72</id><number>209</number><name>Дорожное Радио</name><is_video>0</is_video><icon>dorozhnoe</icon></item><item><id>73</id><number>210</number><name>Европа Плюс</name><is_video>0</is_video><icon>europaplus</icon></item><item><id>82</id><number>213</number><name>HIT FM</name><is_video>0</is_video><icon>_none</icon></item></channels></item></groups><servertime>1374845032</servertime></response>
get_url_radio
Query
/get_url_radio?sid=<sid>&cid=<cid>
Require parameters
cid | the channel ID (not number, namely ID) |
Description
Returns the direct link to the radio
Return section
url | Direct link to the broadcasting channel radio |
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response> <url>http://devnull.com/muzika?325114667=589bd9d94c.lksdklawdnon3j24j204fnff1....</url> <servertime>1292870500</servertime></response>
play_radio
Query
/play_radio?sid=<sid>
Description
Returns a redirect to the direct link channel radio
All similar functions get_url_radio in addition to the format of the response (a redirect on the direct link instead of returning the reference)
All similar functions get_url_radio in addition to the format of the response (a redirect on the direct link instead of returning the reference)
get_audio_lang
Query
/get_audio_lang?sid=<sid>
Description
Returns the list of languages of audio tracks TV.
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response><lang><item><title>tur</title></item><item><title>deu</title></item><item><title>rus</title></item><item><title>lat</title></item><item><title>ara</title></item><item><title>eng</title></item><item><title>ukr</title></item><item><title>lit</title></item><item><title>fre</title></item><item><title>ger</title></item><item><title>geo</title></item><item><title>pol</title></item><item><title>ita</title></item><item><title>spa</title></item><item><title>fra</title></item><item><title>dut</title></item><item><title>rum</title></item><item><title>por</title></item><item><title>cze</title></item><item><title>hun</title></item></lang><servertime>1374833619</servertime></response>
get_channels_tv
Query
/get_channels_tv?sid=<sid>&time_shift=<time_shift>&with_epg=<with_epg>&afilter=<afilter>&quality=<quality>&mode=<mode>
Other parameters
time_shift | Offset broadcast back along the time scale (in hours). |
with_epg | Flag-modifier. If available in response to each channel is added to the current and next program gear. |
afilter | filter by language audio poluchenia in get_audio_lang |
quality | filtering quality stream from get_quality_tv |
mode | 1 is extended to give the list , when the channel is a member of multiple groups(0 by default) in is the ID list of groups, separated by commas (only works for the bands,which are included in the properties of the node, be careful) |
Description
Returns a list of available playback of television channels in the format, without genres (groups). (“Flat format”)
Return section
icons | Templates paths to the icons of the channels. For each size of icons – your. |
channels | the Channels in this group |
id | the ID of the channel |
group_id | group ID |
number | the channel Number (default sort) |
name | the name of the group or channel |
color | the Color group |
is_video | content Type. 0 - audio (e.g. radio), 1 video (TV for example) |
protected | Protected channel parent password: 0 – no, 1 – Yes |
has_archive | do channel archive (TimeShift): 0 – no, 1 - Yes |
icon | Name icons of channel (without the file extension and path) |
audiotracks | three-Letter language codes of the audio tracks of the channel. Example: “rus,ukr,lat” |
audiotrack_default | three-Letter code of the default language for the audio channel. |
Default | aspect_ratio the aspect ratio of the channel |
time_shift | Offset broadcast back along the time scale (in seconds). To obtain the local client time is added to UNIXTIMESTAMP. |
current|next|title-the | name of the current|next program |
current|next|info | description of the current|next program |
current|next|start | is the Beginning of the current|next programme, UNIXTIMESTAMP (real, excluding the offset in time) |
current|next|end | End of current|next program, UNIXTIMESTAMP (real, excluding the offset in time) |
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response>
<icons>
<default>http://file-teleport.com/iptv/core/img/ico/tv/%ICON%.gif</default>
<w40h30>http://file-teleport.com/iptv/core/img/ico/tv/%ICON%.gif</w40h30>
</icons>
<channels>
<item>
<id>219</id>
<group_id>1</group_id>
<number>1</number>
<name>ПЕРВЫЙ</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>ort</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>16:9</aspect_ratio>
</item>
<item>
<id>220</id>
<group_id>1</group_id>
<number>2</number>
<name>РОССИЯ</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>russia</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>16:9</aspect_ratio>
</item>
<item>
<id>221</id>
<group_id>1</group_id>
<number>3</number>
<name>НТВ</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>ntv</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>16:9</aspect_ratio>
</item>
<item>
<id>222</id>
<group_id>3</group_id>
<number>4</number>
<name>CTC</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>ru-sts</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>4:3</aspect_ratio>
</item>
<item>
<id>42</id>
<group_id>3</group_id>
<number>5</number>
<name>REN TV</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>ren-tv</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>4:3</aspect_ratio>
</item>
<item>
<id>85</id>
<group_id>3</group_id>
<number>6</number>
<name>ТНТ</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>tnt</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>4:3</aspect_ratio>
</item>
</channels>
</response>
<icons>
<default>http://file-teleport.com/iptv/core/img/ico/tv/%ICON%.gif</default>
<w40h30>http://file-teleport.com/iptv/core/img/ico/tv/%ICON%.gif</w40h30>
</icons>
<channels>
<item>
<id>219</id>
<group_id>1</group_id>
<number>1</number>
<name>ПЕРВЫЙ</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>ort</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>16:9</aspect_ratio>
</item>
<item>
<id>220</id>
<group_id>1</group_id>
<number>2</number>
<name>РОССИЯ</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>russia</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>16:9</aspect_ratio>
</item>
<item>
<id>221</id>
<group_id>1</group_id>
<number>3</number>
<name>НТВ</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>ntv</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>16:9</aspect_ratio>
</item>
<item>
<id>222</id>
<group_id>3</group_id>
<number>4</number>
<name>CTC</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>ru-sts</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>4:3</aspect_ratio>
</item>
<item>
<id>42</id>
<group_id>3</group_id>
<number>5</number>
<name>REN TV</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>ren-tv</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>4:3</aspect_ratio>
</item>
<item>
<id>85</id>
<group_id>3</group_id>
<number>6</number>
<name>ТНТ</name>
<is_video>1</is_video>
<protected>0</protected>
<has_archive>1</has_archive>
<is_favorite>0</is_favorite>
<icon>tnt</icon>
<languages>rus</languages>
<audiotracks>rus</audiotracks>
<audiotrack_default>rus</audiotrack_default>
<aspect_ratio>4:3</aspect_ratio>
</item>
</channels>
</response>
get_epg
Query
/get_epg?sid=<sid>&cid=<cid>&from_uts=<from_uts>&hours=<hours>&time_shift=<time_shift>
Require parameters
cid | the channel ID List (no numbers, namely the ID) in the format “1,43,17,22” default is all channels. Optional |
from_uts | UNIXTIMESTAMP start of the EPG. The default is the current time |
Other parameters
hours | “Window” EPG time in hours. EPG many hours ahead to get the default 3 hours. Optional |
time_shift | Offset broadcast back along the time scale (in hours). When non-zero from_uts ignored. The default is 0. |
Description
Returns EPG channels
Return section
id | the ID of the channel |
time_shift | Offset broadcast back along the time scale (in seconds). To obtain the local client time is added to UNIXTIMESTAMP. |
title | the name of the program |
info | program Description |
start | is the Beginning of the program, UNIXTIMESTAMP (real, excluding the offset in time) |
end | End program , UNIXTIMESTAMP (real, excluding the offset in time) |
has_archive | flag the availability of archive transmission |
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response>
<icons>
<default>http://file-teleport.com/iptv/core/img/ico/tv/%ICON%.gif</default>
<w40h30>http://file-teleport.com/iptv/core/img/ico/tv/%ICON%.gif</w40h30>
</icons>
<channels>
<item>
<id>219</id>
<name>ПЕРВЫЙ</name>
<icon>ort</icon>
<time_shift>0</time_shift>
<epg>
<item>
<title>ВЕЧЕРНИЙ УРГАНТ (S) (16+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426192500</begin>
<end>1426194600</end>
</item>
<item>
<title>НОЧНЫЕ НОВОСТИ</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426194600</begin>
<end>1426195800</end>
</item>
<item>
<title>ГРИГОРИЙ ГОРИН.</title>
<info>"ЖИВИТЕ ДОЛГО" (12+)</info>
<has_archive>1</has_archive>
<begin>1426195800</begin>
<end>1426199100</end>
</item>
<item>
<title>ВРЕМЯ ПОКАЖЕТ (16+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426199100</begin>
<end>1426202400</end>
</item>
<item>
<title>НАЕДИНЕ СО ВСЕМИ (16+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426202400</begin>
<end>1426204800</end>
</item>
<item>
<title>НОВОСТИ</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426204800</begin>
<end>1426205100</end>
</item>
<item>
<title>НАЕДИНЕ СО ВСЕМИ (16+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426205100</begin>
<end>1426205700</end>
</item>
<item>
<title>МОДНЫЙ ПРИГОВОР</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426205700</begin>
<end>1426209300</end>
</item>
<item>
<title>КОНТРОЛЬНАЯ ЗАКУПКА</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426209300</begin>
<end>1426211100</end>
</item>
<item>
<title>ПЕРЕРЫВ до 05:00</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426211100</begin>
<end>1426212000</end>
</item>
<item>
<title>ДОБРОЕ УТРО</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426212000</begin>
<end>1426226400</end>
</item>
<item>
<title>НОВОСТИ</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426226400</begin>
<end>1426227300</end>
</item>
<item>
<title>КОНТРОЛЬНАЯ ЗАКУПКА</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426227300</begin>
<end>1426229100</end>
</item>
<item>
<title>ЖИТЬ ЗДОРОВО! (12+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426229100</begin>
<end>1426233300</end>
</item>
<item>
<title>МОДНЫЙ ПРИГОВОР</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426233300</begin>
<end>1426237200</end>
</item>
<item>
<title>НОВОСТИ (с субтитрами)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426237200</begin>
<end>1426238400</end>
</item>
<item>
<title>ДОЛГИЙ ПУТЬ ДОМОЙ</title>
<info>- сериал. В ролях: Елизавета Боярская, Дарья Мороз, Александр Лазарев мл., Евгения Брик, Артём Ткаченко, Михаил Пшеничный (S) (16+)</info>
<has_archive>0</has_archive>
<begin>1426238400</begin>
<end>1426245900</end>
</item>
<item>
<title>ВРЕМЯ ПОКАЖЕТ (16+)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426245900</begin>
<end>1426248000</end>
</item>
<item>
<title>НОВОСТИ (с субтитрами)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426248000</begin>
<end>1426248900</end>
</item>
<item>
<title>ВРЕМЯ ПОКАЖЕТ (16+)</title>
<info>- продолжение</info>
<has_archive>0</has_archive>
<begin>1426248900</begin>
<end>1426251600</end>
</item>
<item>
<title>МУЖСКОЕ / ЖЕНСКОЕ (16+)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426251600</begin>
<end>1426255200</end>
</item>
<item>
<title>ЖДИ МЕНЯ</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426255200</begin>
<end>1426258800</end>
</item>
<item>
<title>ВЕЧЕРНИЕ НОВОСТИ</title>
<info>(с субтитрами)</info>
<has_archive>0</has_archive>
<begin>1426258800</begin>
<end>1426260000</end>
</item>
<item>
<title>ЧЕЛОВЕК И ЗАКОН</title>
<info>с Алексеем Пимановым (16+)</info>
<has_archive>0</has_archive>
<begin>1426260000</begin>
<end>1426263300</end>
</item>
<item>
<title>Чемпионат мира по биатлону</title>
<info>- Женщины. Эстафета. Прямой эфир из Финляндии. По окончании - программа "Время"</info>
<has_archive>0</has_archive>
<begin>1426263300</begin>
<end>1426271400</end>
</item>
<item>
<title>ГОЛОС. ДЕТИ (S)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426271400</begin>
<end>1426279500</end>
</item>
<item>
<title>ВЕЧЕРНИЙ УРГАНТ (S) (16+)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426279500</begin>
<end>1426282800</end>
</item>
</epg>
</item>
</channels>
<servertime>1426237962</servertime>
</response>
<icons>
<default>http://file-teleport.com/iptv/core/img/ico/tv/%ICON%.gif</default>
<w40h30>http://file-teleport.com/iptv/core/img/ico/tv/%ICON%.gif</w40h30>
</icons>
<channels>
<item>
<id>219</id>
<name>ПЕРВЫЙ</name>
<icon>ort</icon>
<time_shift>0</time_shift>
<epg>
<item>
<title>ВЕЧЕРНИЙ УРГАНТ (S) (16+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426192500</begin>
<end>1426194600</end>
</item>
<item>
<title>НОЧНЫЕ НОВОСТИ</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426194600</begin>
<end>1426195800</end>
</item>
<item>
<title>ГРИГОРИЙ ГОРИН.</title>
<info>"ЖИВИТЕ ДОЛГО" (12+)</info>
<has_archive>1</has_archive>
<begin>1426195800</begin>
<end>1426199100</end>
</item>
<item>
<title>ВРЕМЯ ПОКАЖЕТ (16+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426199100</begin>
<end>1426202400</end>
</item>
<item>
<title>НАЕДИНЕ СО ВСЕМИ (16+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426202400</begin>
<end>1426204800</end>
</item>
<item>
<title>НОВОСТИ</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426204800</begin>
<end>1426205100</end>
</item>
<item>
<title>НАЕДИНЕ СО ВСЕМИ (16+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426205100</begin>
<end>1426205700</end>
</item>
<item>
<title>МОДНЫЙ ПРИГОВОР</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426205700</begin>
<end>1426209300</end>
</item>
<item>
<title>КОНТРОЛЬНАЯ ЗАКУПКА</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426209300</begin>
<end>1426211100</end>
</item>
<item>
<title>ПЕРЕРЫВ до 05:00</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426211100</begin>
<end>1426212000</end>
</item>
<item>
<title>ДОБРОЕ УТРО</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426212000</begin>
<end>1426226400</end>
</item>
<item>
<title>НОВОСТИ</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426226400</begin>
<end>1426227300</end>
</item>
<item>
<title>КОНТРОЛЬНАЯ ЗАКУПКА</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426227300</begin>
<end>1426229100</end>
</item>
<item>
<title>ЖИТЬ ЗДОРОВО! (12+)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426229100</begin>
<end>1426233300</end>
</item>
<item>
<title>МОДНЫЙ ПРИГОВОР</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426233300</begin>
<end>1426237200</end>
</item>
<item>
<title>НОВОСТИ (с субтитрами)</title>
<info></info>
<has_archive>1</has_archive>
<begin>1426237200</begin>
<end>1426238400</end>
</item>
<item>
<title>ДОЛГИЙ ПУТЬ ДОМОЙ</title>
<info>- сериал. В ролях: Елизавета Боярская, Дарья Мороз, Александр Лазарев мл., Евгения Брик, Артём Ткаченко, Михаил Пшеничный (S) (16+)</info>
<has_archive>0</has_archive>
<begin>1426238400</begin>
<end>1426245900</end>
</item>
<item>
<title>ВРЕМЯ ПОКАЖЕТ (16+)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426245900</begin>
<end>1426248000</end>
</item>
<item>
<title>НОВОСТИ (с субтитрами)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426248000</begin>
<end>1426248900</end>
</item>
<item>
<title>ВРЕМЯ ПОКАЖЕТ (16+)</title>
<info>- продолжение</info>
<has_archive>0</has_archive>
<begin>1426248900</begin>
<end>1426251600</end>
</item>
<item>
<title>МУЖСКОЕ / ЖЕНСКОЕ (16+)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426251600</begin>
<end>1426255200</end>
</item>
<item>
<title>ЖДИ МЕНЯ</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426255200</begin>
<end>1426258800</end>
</item>
<item>
<title>ВЕЧЕРНИЕ НОВОСТИ</title>
<info>(с субтитрами)</info>
<has_archive>0</has_archive>
<begin>1426258800</begin>
<end>1426260000</end>
</item>
<item>
<title>ЧЕЛОВЕК И ЗАКОН</title>
<info>с Алексеем Пимановым (16+)</info>
<has_archive>0</has_archive>
<begin>1426260000</begin>
<end>1426263300</end>
</item>
<item>
<title>Чемпионат мира по биатлону</title>
<info>- Женщины. Эстафета. Прямой эфир из Финляндии. По окончании - программа "Время"</info>
<has_archive>0</has_archive>
<begin>1426263300</begin>
<end>1426271400</end>
</item>
<item>
<title>ГОЛОС. ДЕТИ (S)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426271400</begin>
<end>1426279500</end>
</item>
<item>
<title>ВЕЧЕРНИЙ УРГАНТ (S) (16+)</title>
<info></info>
<has_archive>0</has_archive>
<begin>1426279500</begin>
<end>1426282800</end>
</item>
</epg>
</item>
</channels>
<servertime>1426237962</servertime>
</response>
get_epg_current
Query
/get_epg_current?sid=<sid>&cid=<cid>&from_uts=<from_uts>&time_shift=<time_shift>
Other parameters
cid | the channel ID List (no numbers, namely the ID) in the format “1,43,17,22” default is all channels. Optional |
from_uts | UNIXTIMESTAMP start of the EPG. Defaults to the current time Optional |
time_shift | Offset broadcast back along the time scale (in hours). When non-zero from_uts ignored. Default = 0. |
Description
Returns the current EPG channels
Return section
id | the ID of the channel |
time_shift | Offset broadcast back along the time scale (in seconds).To obtain the local client time is added to UNIXTIMESTAMP. |
current|next|title-the | name of the current|next program |
current|next|info | description of the current|next program |
current|next|start | is the Beginning of the current|next programme, UNIXTIMESTAMP (real, excluding the offset in time) |
current|next|end | End of current|next program, UNIXTIMESTAMP (real, excluding the offset in time) |
Answer
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response><icons><default>http://server.com/img/ico/tv/%ICON%.gif</default><w40h30>http://server.com/img/ico/tv/%ICON%.gif</w40h30></icons><channels><item><id>12</id><name>DISCOVERY</name><icon>ru-disc</icon><time_shift>0</time_shift><current><title>Золотая лихорадка: Берингово море: Добряки приходят последними.</title><info>разбогатеет, а кто потеряет все?</info><begin>1375275900</begin><end>1375279200</end></current><next><title>Разрушители легенд: Легенды о водке.</title><info>Говорят, что при лобовом столкновении на большой скорости двух грузовиков водитель "сплавляется" с кабиной. Правда это или нет?</info><begin>1375279200</begin><end>1375282800</end></next></item><item><id>13</id><name>ДОМ КИНО</name><icon>ru-dom-kino</icon><time_shift>0</time_shift><current><title>Кинопара. Х/ф "Баллада о солдате".</title><info>Григорий Чухрай. В ролях: Владимир Ивашов, Жанна Прохоренко, Антонина Максим.</info><begin>1375273500</begin><end>1375278900</end></current><next><title>"Окно в кино".</title><info/><begin>1375278900</begin><end>1375279500</end></next></item><item><id>15</id><name>ИНТЕР</name><icon>ua-inter</icon><time_shift>0</time_shift><current><title>"Давай поженимся в Украине".</title><info/><begin>1375274700</begin><end>1375278000</end></current><next><title>Т/с "Наложница", 2 с.</title><info/><begin>1375278000</begin><end>1375282800</end></next></item><item><id>33</id><name>DISCOVERY Science</name><icon>ru-disc-science</icon><time_shift>0</time_shift><current><title>Оружие будущего: Не спрячешься.</title><info>Бывший спецназовец ВМС США Ричард "Мэк" Маховиц ищет совершенное оружие. Он расскажет о способных стрелять за угол автоматах и самом последнем сверхзвуковом истребителе.</info><begin>1375275600</begin><end>1375278900</end></current><next><title>Короли строек: Мост каменщиков.</title><info>Присоединяйтесь к Королям строек, которые расскажут о ряде широкомасштабных проектов, амбициозность которых - настоящая проверка для их строителей.</info><begin>1375278900</begin><end>1375281900</end></next></item><item><id>34</id><name>DISCOVERY World</name><icon>ru-disc-world</icon><time_shift>0</time_shift><current><title>Разоблачение динозавров.</title><info>Что нового мы можем узнать о динозаврвах? Этот документальный фильм рассказывает о том, что с возрастом динозавры менялись так сильно, что ученые принимали их за различные виды.</info><begin>1375274700</begin><end>1375278000</end></current><next><title>Тайны полей сражений: Серия 3.</title><info>Норм Кристи снимал свой фильм во Франции, Англии, Северной Африке и Испании. В нем автор исследует неизученные моменты самых значительных мировых сражений.</info><begin>1375278000</begin><end>1375281300</end></next></item><item><id>35</id><name>ANIMAL PLANET</name><icon>ru-an-pl</icon><time_shift>0</time_shift><current><title>Дик и Дом спешат на помощь: Серия 10.</title><info>Волонтеры ловят козу, чтобы сделать ей педикюр, играют в прятки с рыжими белками и укутывают соню перед зимней спячкой. А Дом учится обслуживать пингвинов.</info><begin>1375275600</begin><end>1375277400</end></current><next><title>Введение в котоводство: Мейнкуны, египетские мау, сиамские, ориентальные, гималайские, турецкие ангорские.</title><info>встречается 300 комбинаций окраса? Какие кошки рождаются с косоглазием? И какой кошке висячие уши помогают бежать быстрее?</info><begin>1375277400</begin><end>1375280700</end></next></item><item><id>42</id><name>REN TV</name><icon>ren-tv</icon><time_shift>0</time_shift><current><title>НЕ ВРИ МНЕ! (16+)</title><info/><be