@classmethod<EOL><INDENT>def _create(cls, server, title, items):<DEDENT>
if items and not isinstance(items, (list, tuple)):<EOL><INDENT>items = [items]<EOL><DEDENT>ratingKeys = []<EOL>for item in items:<EOL><INDENT>if item.listType != items[<NUM_LIT:0>].listType:  <EOL><INDENT>raise BadRequest('<STR_LIT>')<EOL><DEDENT>ratingKeys.append(str(item.ratingKey))<EOL><DEDENT>ratingKeys = '<STR_LIT:U+002C>'.join(ratingKeys)<EOL>uuid = items[<NUM_LIT:0>].section().uuid<EOL>key = '<STR_LIT>' % utils.joinArgs({<EOL>'<STR_LIT>': '<STR_LIT>' % (uuid, ratingKeys),<EOL>'<STR_LIT:type>': items[<NUM_LIT:0>].listType,<EOL>'<STR_LIT:title>': title,<EOL>'<STR_LIT>': <NUM_LIT:0><EOL>})<EOL>data = server.query(key, method=server._session.post)[<NUM_LIT:0>]<EOL>return cls(server, data, initpath=key)<EOL>
Create a playlist.