本文整理汇总了Python中MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi.getRooms方法的典型用法代码示例。如果您正苦于以下问题:Python AdminApi.getRooms方法的具体用法?Python AdminApi.getRooms怎么用?Python AdminApi.getRooms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi
的用法示例。
在下文中一共展示了AdminApi.getRooms方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: roomWithSameOwner
# 需要导入模块: from MaKaC.plugins.Collaboration.Vidyo.api.api import AdminApi [as 别名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi import getRooms [as 别名]
def roomWithSameOwner(cls, owner, roomName):
# we retrieve the just created room; we need to do this because Vidyo will have
# added extra data like the room id, the url
searchFilter = SOAPObjectFactory.createFilter('admin', roomName)
answer = AdminApi.getRooms(searchFilter)
createdRooms = answer.room
for room in createdRooms:
if str(room.name) == roomName and str(room.ownerName) == owner:
return room
return None
示例2: searchRooms
# 需要导入模块: from MaKaC.plugins.Collaboration.Vidyo.api.api import AdminApi [as 别名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi import getRooms [as 别名]
def searchRooms(cls, query):
try:
searchFilter = SOAPObjectFactory.createFilter('admin', "%%%s%%" % VidyoTools.replaceSpacesInName(query))
rooms = AdminApi.getRooms(searchFilter)
if rooms.total:
return rooms.room
return []
except WebFault, e:
Logger.get('Vidyo').exception("""Admin API's searchRooms operation got WebFault: %s"""
% e.fault.faultstring)
raise
示例3: attachRoom
# 需要导入模块: from MaKaC.plugins.Collaboration.Vidyo.api.api import AdminApi [as 别名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi import getRooms [as 别名]
def attachRoom(cls, booking):
owner = booking.getOwnerObject()
possibleLogins = VidyoTools.getAvatarLoginList(owner)
if not possibleLogins:
return VidyoError("userHasNoAccounts", "attach")
roomName = booking.getBookingParamByName("roomName")
searchFilter = SOAPObjectFactory.createFilter('admin', roomName)
answer = AdminApi.getRooms(searchFilter, booking.getConference().getId(), booking.getId())
createdRooms = answer.room
for room in createdRooms:
for login in possibleLogins:
if str(room.name) == roomName and str(room.ownerName) == login:
return room
else:
return VidyoError("notValidRoom", "attach")
示例4: attachRoom
# 需要导入模块: from MaKaC.plugins.Collaboration.Vidyo.api.api import AdminApi [as 别名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi import getRooms [as 别名]
def attachRoom(cls, booking):
owner = booking.getOwnerObject()
possibleLogins = VidyoTools.getAvatarLoginList(owner)
if not possibleLogins:
return VidyoError("userHasNoAccounts", "attach")
roomName = booking.getBookingParamByName("roomName")
searchFilter = SOAPObjectFactory.createFilter('admin', roomName)
# TODO: Do several calls if needed
# Vidyo should have an exact match feature too
searchFilter.limit = 100
answer = AdminApi.getRooms(searchFilter)
createdRooms = answer.room
for room in createdRooms:
for login in possibleLogins:
if str(room.name) == roomName and str(room.ownerName) == login:
return room
else:
return VidyoError("notValidRoom", "attach")