Specifies the course information you want to update in your iTunes U site. iTunes U merges the course information specified in your document with the course information in your iTunes U site.
When you specify this operation, iTunes U:
Updates existing course items with the information you specify.
Creates new items in the course for any Group or Permission entities you specify that do not already exist in the destination course, and, if the Destructive entity is set to true, deletes any existing items in the destination course for Group or Permission entities you do not specify.
Merges information in the course for any Group or Permission entities you specify that already exist in the destination course.
Note: You cannot change a course type from simple to feed or from feed to simple. To change from one course type to another, delete the existing course and create a new course.
You specify the following entities with the MergeCourse operation:
CourseHandle. Specifies the handle in your iTunes U site for the course you want to update. The course handle must correspond to a Course page item in your iTunes U site. If the handle does not match an existing item, iTunes U returns an error message. If you do not specify the CourseHandle entity, iTunes U uses the destination string in your URL.
CoursePath. Specifies the path in your iTunes U site for the course you want to update. The course path must correspond to a Course page item in your iTunes U site. If the path does not match an existing item, or matches multiple items, iTunes U returns an error message. If you do not specify the CoursePath entity, iTunes U uses the destination string in your URL. The CoursePath entity must be in the form “a/b/c” where a, b, and c are folder names. For example, if you have a site named “CupertinoU” containing a section named “Humanities” and a course in that section named “Literature,” you can refer to the CoursePath as <CoursePath>CupertinoU/Humanities/Literature</CoursePath> in your MergeCourse operation. If specifying the root path, you must start the CoursePath entity with a leading slash (/). To specify a slash (/) as a character within a node of the slash-delimited path, escape the character with a second slash (//).
MergeByHandle. Specifies whether or not you want to merge course group information using Group handles. You can specify one of the following values: true, false. By default, iTunes U merges course group information using the Name entity.
iTunes U preserves the order of items within the Group entity. By default, when you merge a course containing Group entities, iTunes U uses the Name entity to determine how to merge and order similar Group entities in the destination course. For example, if the destination course has groups foo and bar and your XML document defines Group entities alpha, foo, beta, and bar in MergeCourse, iTunes U updates the destination course with the following groups: alpha, foo, beta, and bar. Because alpha and beta did not exist in the destination course, iTunes U creates the new groups and adds them into the course’s existing groups as specified in your document. Because foo and bar already existed in the destination course, iTunes U merges the groups with existing foo and bar.
Since iTunes U uses the Name entity to determine how to merge and order Group entities, if you also want to rename a Group, set MergeByHandle=true to specify that iTunes U merge the entities based on handles in your document. For example, if the specified course has groups with handles 10, 11, 12 and names foo, bar, alpha respectively, and your document defines Group entities with handles 10, 11, 13 and names beta, delta, gamma respectively, iTunes U merges the groups with handles 10 and 11, including the names, leaves 12 alone, and adds 13. Your final course has the following updated groups: 10 (beta), 11 (delta), 12 (alpha), and 13 (gamma).
Course. Specifies the entities for the course attributes you want to add, including course Name, CourseType, AllowSubscription, ThemeHandle, and Permission. By specifying this information, you can override any existing settings in the course. The web service course Name entity corresponds to the course Title in your iTunes U site.
Destructive. Specifies whether or not you want to delete from the destination course any Group or Permission items not specified in the Course entity. You can specify one of the following values: true, false. By default, iTunes U sets the Destructive entity to false and merges items.
Notes:
Specify simple text string values for the Name entities.
Specify all details for any Permission (including Credential and Access) entities.
Warning: Web Services does not provide an undo operation. Be careful when using the Destructive entity. If misused, you can destroy your entire iTunes U site structure.
The following is an example of an iTunes U Web Services document using MergeCourse:
<?xml version="1.0" encoding="UTF-8"?>
<ITunesUDocument>
<Version>1.1.4</Version>
<MergeCourse>
<CourseHandle>coursehandle value</CourseHandle>
<CoursePath>coursepath value</CoursePath>
<MergeByHandle>mergebyhandle value</MergeByHandle>
<Destructive>destructive value</Destructive>
<Course>
<Name>name value</Name>
<CourseType>coursetype value</CourseType>
<ShortName>shortname value</ShortName>
<Identifier>identifier value</Identifier>
<Instructor>instructor value</Instructor>
<Description>description value</Description>
<Group>
<Name>name value</Name>
<Handle>handle value</Handle>
<Track>
<Name>name value</Name>
<Handle>handle value</Handle>
<Kind>kind value</Kind>
<DiscNumber>discnumber value</DiscNumber>
<DurationMilliseconds>
durationmilliseconds value
</DurationMilliseconds>
<AlbumName>albumname value</AlbumName>
<ArtistName>artistname value</ArtistName>
<DownloadURL>downloadurl value</DownloadURL>
</Track>
<Permission>
<Credential>credential value</Credential>
<Access>access value</Access>
</Permission>
</Group>
<AllowSubscription>allowsubscription value</AllowSubscription>
</Course>
</MergeCourse>
</ITunesUDocument> |
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-11-04)