Timers (shows/timers)
Timers are represented as objects with the following fields
Name |
Type |
Read-Only |
Required for "Add" |
Comment |
||||||||||||||||||
id |
string |
yes |
no |
Unique identifier for this timer |
||||||||||||||||||
name |
string |
yes |
no |
Name of the show associated with this timer |
||||||||||||||||||
device_id |
integer |
no |
yes |
Unique identifier for the TV Recording device associated with this timer (See Device) |
||||||||||||||||||
channel_id |
integer |
yes |
no |
IceTV channel ID associated with this timer (See Channel) |
||||||||||||||||||
show_id |
integer |
yes |
yes |
IceTV show ID associated with this timer (See Show) |
||||||||||||||||||
start_time |
string |
yes |
no |
Start time for this timer, formatted as per ISO 8601, expressed in UTC |
||||||||||||||||||
duration_minutes |
integer |
yes |
no |
Duration of the timer in minutes |
||||||||||||||||||
action |
string |
yes |
no |
Timer action
|
||||||||||||||||||
state |
string |
no |
no |
State of the timer
|
||||||||||||||||||
message |
string |
no |
no |
Human readable message for last action on the timer, e.g. "Scheduled by TV Recorder", "Timer conflict", etc. |
||||||||||||||||||
series_recording_id |
integer |
yes |
no |
Unique identifier for the series recording associated with this timer (See Series Recording) |
||||||||||||||||||
keyword_id |
integer |
yes |
no |
Unique identifier for the keyword associated with this timer (See Keyword) |
||||||||||||||||||
pre-padding |
integer |
no |
no |
Amount of pre-padding in minutes to be applied to this timer |
||||||||||||||||||
post-padding |
integer |
no |
no |
Amount of post-padding in minutes to be applied to this timer |
||||||||||||||||||
padding-type |
string |
no |
no |
Padding type to use for this timer on the TV Recorder
|
Get all timers
URL |
https://api.icetv.com.au/shows/timers |
Method |
GET |
Query String |
|
Returns |
200 OK & Document (XML or JSON) |
|
401 Unauthorized |
|
404 Not Found |
|
503 Service Unavailable |
GET https://api.icetv.com.au/shows/timers?api_key=API_KEY&application_version=APPLICATION_VERSION&email_address=EMAIL_ADDRESS&token=TOKEN
<?xml version=
"1.0"
encoding=
"ISO-8859-1"
standalone=
"no"
?>
<!DOCTYPE shows SYSTEM
"http://iceguide.icetv.com.au/iceguide/shows.dtd"
>
<shows>
<timer id=
"15784000841381576705"
name=
"The Simpsons"
device_id=
"23"
channel_id=
"1700"
show_id=
"103458207"
start_time=
"2012-05-09T09:30:00+00:00"
duration_minutes=
"30"
action=
"record"
state=
"waiting"
message=
"Scheduled to record by API"
series_recording_id=
"51"
keyword_id=
"0"
/>
<timer id=
"15784000841381576706"
name=
"The Simpsons"
device_id=
"23"
channel_id=
"1700"
show_id=
"103585019"
start_time=
"2012-05-16T09:30:00+00:00"
duration_minutes=
"30"
action=
"record"
state=
"waiting"
message=
"Scheduled to record by API"
series_recording_id=
"51"
keyword_id=
"0"
/>
<timer id=
"15784000841381576707"
name=
"The Simpsons"
device_id=
"23"
channel_id=
"1700"
show_id=
"103679189"
start_time=
"2012-05-23T09:30:00+00:00"
duration_minutes=
"30"
action=
"record"
state=
"waiting"
message=
"Scheduled to record by API"
series_recording_id=
"51"
keyword_id=
"0"
/>
</shows>
JSON - Structure of the response
Name |
Type |
Description |
timers |
array of timers |
Contains all the timers associated with the account |
{
"timers"
: [
{
"action"
:
"record"
,
"channel_id"
:
"1700"
,
"device_id"
:
"23"
,
"duration_minutes"
:
"30"
,
"id"
:
"15784000841381576705"
,
"keyword_id"
:
"0"
,
"message"
:
"Scheduled to record by API"
,
"name"
:
"The Simpsons"
,
"series_recording_id"
:
"51"
,
"show_id"
:
"103458207"
,
"start_time"
:
"2012-05-09T09:30:00+00:00"
,
"state"
:
"waiting"
},
{
"action"
:
"record"
,
"channel_id"
:
"1700"
,
"device_id"
:
"23"
,
"duration_minutes"
:
"30"
,
"id"
:
"15784000841381576706"
,
"keyword_id"
:
"0"
,
"message"
:
"Scheduled to record by API"
,
"name"
:
"The Simpsons"
,
"series_recording_id"
:
"51"
,
"show_id"
:
"103585019"
,
"start_time"
:
"2012-05-16T09:30:00+00:00"
,
"state"
:
"waiting"
},
{
"action"
:
"record"
,
"channel_id"
:
"1700"
,
"device_id"
:
"23"
,
"duration_minutes"
:
"30"
,
"id"
:
"15784000841381576707"
,
"keyword_id"
:
"0"
,
"message"
:
"Scheduled to record by API"
,
"name"
:
"The Simpsons"
,
"series_recording_id"
:
"51"
,
"show_id"
:
"103679189"
,
"start_time"
:
"2012-05-23T09:30:00+00:00"
,
"state"
:
"waiting"
},
]
}
Get a specific timer
URL |
https://api.icetv.com.au/shows/timers/# |
Method |
GET |
Query String |
|
Returns |
200 OK & Document (XML or JSON) |
|
401 Unauthorized |
|
404 Not Found |
|
503 Service Unavailable |
GET https://api.icetv.com.au/shows/timers/TIMER_ID&api_key=API_KEY&application_version=APPLICATION_VERSION&email_address=EMAIL_ADDRESS&token=TOKEN
<?xml version=
"1.0"
encoding=
"ISO-8859-1"
standalone=
"no"
?>
<!DOCTYPE shows SYSTEM
"http://iceguide.icetv.com.au/iceguide/shows.dtd"
>
<shows>
<timer id=
"15784000841381576705"
name=
"The Simpsons"
device_id=
"23"
channel_id=
"1700"
show_id=
"103458207"
start_time=
"2012-05-09T09:30:00+00:00"
duration_minutes=
"30"
action=
"record"
state=
"waiting"
message=
"Scheduled to record by API"
series_recording_id=
"51"
keyword_id=
"0"
/>
</shows>
JSON - Structure of the response
Name |
Type |
Description |
timers |
array of timers |
Contains only the timer requested |
{
"timers"
: [
{
"action"
:
"record"
,
"channel_id"
:
"1700"
,
"device_id"
:
"23"
,
"duration_minutes"
:
"30"
,
"id"
:
"15784000841381576705"
,
"keyword_id"
:
"0"
,
"message"
:
"Scheduled to record by API"
,
"name"
:
"The Simpsons"
,
"series_recording_id"
:
"51"
,
"show_id"
:
"103458207"
,
"start_time"
:
"2012-05-09T09:30:00+00:00"
,
"state"
:
"waiting"
}
]
}
Add a timer
URL |
https://api.icetv.com.au/shows/timers/ |
Method |
POST |
Query String |
|
Returns |
201 Created & Document (XML or JSON) |
|
401 Unauthorized |
|
404 Not Found |
|
406 Not Acceptable |
|
415 Unsupported Media Type |
|
503 Service Unavailable |
A document containing the new timer record must be sent as part of the request.
The document to be sent to the server omits the "id" and name fields as this is generated by the server.
The server response will include the newly created timer record as it would appear in a single timer GET which allows the caller to update their local cache with the timer id.
POST https://api.icetv.com.au/shows/timers?api_key=API_KEY&application_version=APPLICATION_VERSION&email_address=EMAIL_ADDRESS&token=TOKEN
<
xml
version
=
"1.0"
encoding
=
"iso-8859-1"
>
<
shows
>
<
timer
device_id
=
"4250"
channel_id
=
"38"
show_id
=
"101262483"
message
=
"Created by MY APPLICATON NAME"
/>
</
shows
>
<?
xml
version
=
"1.0"
encoding
=
"iso-8859-1"
?>
<!DOCTYPE shows SYSTEM "
http://iceguide.icetv.com.au/iceguide/shows.dtd
">
<
shows
min_hit_minutes
=
""
>
<
timer
id
=
"15727699466586750978"
name
=
"Bob The Builder: Project Build It"
device_id
=
"4250"
channel_id
=
"38"
show_id
=
"101262483"
start_time
=
"2011-11-13T03:20:00+00:00"
duration_minutes
=
"15"
pre-padding
=
"0"
post-padding
=
"0"
padding-type
=
""
action
=
"record"
state
=
"waiting"
message
=
"Created by MY APPLICATON NAME"
/>
</
shows
>
JSON - Structure of the request
Name |
Type |
Description |
Comment |
- |
table |
The timer's properties |
Only "show_id" and "device_id" are mandatory to create the timer, all the other field will get assigned a default value if not specified. |
{
"message"
:
"Created by MY APPLICATION NAME"
,
"channel_id"
:
"38"
,
"show_id"
:
"101262483"
,
"device_id"
:
"4250"
}
JSON - Structure of the response
Name |
Type |
Description |
Comment |
timers |
array of timers |
Contains the timer just added |
The time id can be cached or retrieved later via a get_all_timers Contains only the timer just added |
{
"timers"
: [
{
"action"
:
"record"
,
"channel_id"
:
"38"
,
"device_id"
:
"4250"
,
"duration_minutes"
:
"30"
,
"id"
:
"15784000841381576705"
,
"keyword_id"
:
"0"
,
"message"
:
"Created by MY APPLICATION NAME"
,
"name"
:
"The Simpsons"
,
"series_recording_id"
:
"0"
,
"show_id"
:
"101262483"
,
"start_time"
:
"2012-05-09T09:30:00+00:00"
,
"state"
:
"waiting"
}
]
}
Modify a timer
URL |
https://api.icetv.com.au/shows/timers/# |
Method |
PUT |
Query String |
|
Returns |
200 OK |
|
401 Unauthorized |
|
404 Not Found |
|
406 Not Acceptable |
|
415 Unsupported Media Type |
|
503 Service Unavailable |
The modify timer API can be used to change the details of a timer, including changes of state that occur as part of the timer lifecycle.
PUT https://api.icetv.com.au/shows/timers/TIMER_ID?api_key=API_KEY&application_version=APPLICATION_VERSION&email_address=EMAIL_ADDRESS&token=TOKEN
<?
xml
version
=
"1.0"
encoding
=
"iso-8859-1"
?>
<!DOCTYPE shows SYSTEM "
http://iceguide.icetv.com.au/iceguide/shows.dtd
">
<
shows
>
<
timer
id
=
"15727699466586750978"
device_id
=
"4250"
channel_id
=
"38"
show_id
=
"101262483"
action
=
"record"
state
=
"running"
message
=
"Recording started on MY TV RECORDER NAME"
/>
</
shows
>
<?
xml
version
=
"1.0"
encoding
=
"iso-8859-1"
?>
<!DOCTYPE shows SYSTEM "
http://iceguide.icetv.com.au/iceguide/shows.dtd
">
<
shows
>
<
timer
id
=
"15727699466586750978"
name
=
"Bob The Builder: Project Build It"
device_id
=
"4250"
channel_id
=
"38"
show_id
=
"101262483"
start_time
=
"2011-11-13T03:20:00+00:00"
duration_minutes
=
"15"
pre-padding
=
"0"
post-padding
=
"0"
paddingtype
=
""
action
=
"record"
state
=
"running"
message
=
"Recording started on MY TV RECORDER NAME"
/>
</
shows
>
NOTE: A timer can be modified by sending 2 types of JSON document, a single object or an array of timer containing the timer information you want to modify. To know what field can be modified please refer to the Read-only column of Timer.
JSON - Structure of the request - array
Name |
Type |
Description |
Comment |
timers |
timer array |
Contains the fields of the timer you want to change |
Fields that aren't specified will keep their value. The array has to contain only one timer as only one timer can be modified at a time |
JSON - Structure of the request - single object
Name |
Type |
Description |
Comment |
|
timer object |
Contains the fields of the timer you want to change |
Fields that aren't specified will keep their value. |
{
"timers"
: [
{
"state"
:
"running"
,
"message"
:
"Recording started on MY TV RECORDER NAME"
,
"action"
:
"record"
,
"show_id"
:
"104319906"
,
"device_id"
:
"23"
}
]
}
{
"state"
:
"running"
,
"message"
:
"Recording started on MY TV RECORDER NAME"
,
"action"
:
"record"
,
"show_id"
:
"104319906"
,
"device_id"
:
"23"
}
JSON - Structure of the response
Name |
Type |
Description |
timers |
array of timers |
Contains the timer just modified |
{
"timers"
: [
{
"id"
:
"15792720048868818945"
,
"state"
:
"running"
,
"series_recording_id"
:
"9"
,
"message"
:
"Recording started on MY TV RECORDER NAME"
,
"start_time"
:
"2012-07-05T13:30:00+00:00"
,
"keyword_id"
:
"0"
,
"action"
:
"record"
,
"channel_id"
:
"2453"
,
"show_id"
:
"104319906"
,
"device_id"
:
"23"
,
"duration_minutes"
:
"30"
,
"name"
:
"PI: Paranormal Investigators"
}
]
}
Delete a timer
URL |
https://api.icetv.com.au/shows/timers/# |
Method |
DELETE |
Query String |
|
Returns |
200 OK |
|
401 Unauthorized |
|
405 Method Not Allowed |
|
503 Service Unavailable |
DELETE https://api.icetv.com.au/shows/timers/15727699466586750978?api_key=API_KEY&application_version&email_address=EMAIL_ADDRESS&token=TOKEN