def _make_rsm_query(max_, after): rsm_set = Node('set', attrs={'xmlns': Namespace.RSM}) if max_ is not None: rsm_set.setTagData('max', max_) if after is not None: rsm_set.setTagData('after', after) return rsm_set
def build_conference_node(bookmark): attrs = {'xmlns': Namespace.BOOKMARKS_1} if bookmark.autojoin: attrs['autojoin'] = 'true' if bookmark.name: attrs['name'] = bookmark.name conference = Node(tag='conference', attrs=attrs) if bookmark.nick: conference.setTagData('nick', bookmark.nick) return conference