Change a Content Item's Schedule Field
Schedule fields in content items are encoded in Escenic syndication
format. So if you want to modify a schedule field in a content item you
have retrieved from the web service, then you need to know how to use
the syndication format's schedule
elements. For a
detailed description of the schedule
element and it's
content model, see the schedule:schedule.
The following example shows a content item Atom entry resource that contains a schedule field.
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:metadata="http://xmlns.escenic.com/2010/atom-metadata" xmlns:dcterms="http://purl.org/dc/terms/"> <id>http://host-ip-address/webservice/escenic/content/43</id> ... <content type="application/vnd.escenic.payload+xml"> <vdf:payload xmlns:vdf="http://www.escenic.com/types" model="http://host-ip-address/webservice/content-descriptions/another"> ... <vdf:field name="OPENING-HOURS"> <vdf:value> <schedule xmlns="http://xmlns.escenic.com/2011/schedule" time-zone="Asia/Almaty"> <recurrence> <daily start-time="09:00:00" end-time="18:00:00"></daily> <range start-date="2011-05-13" end-date="2011-05-26"></range> </recurrence> </schedule> </vdf:value> <vdf:field> </vdf:payload> </content> </entry>
To modify the schedule, you just edit the
schedule
element and submit the content item using
PUT
in the usual way. You must, however, ensure that
the contents of the field is a valid schedule
element.