当前位置: 首页>>代码示例>>Python>>正文


Python AdminApi.getRoom方法代码示例

本文整理汇总了Python中MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi.getRoom方法的典型用法代码示例。如果您正苦于以下问题:Python AdminApi.getRoom方法的具体用法?Python AdminApi.getRoom怎么用?Python AdminApi.getRoom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi的用法示例。


在下文中一共展示了AdminApi.getRoom方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: queryRoom

# 需要导入模块: from MaKaC.plugins.Collaboration.Vidyo.api.api import AdminApi [as 别名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi import getRoom [as 别名]
    def queryRoom(cls, booking, roomId):
        """ Searches for room information via the admin api's getRoom function and the
            user api's search function (currently the admin api's getRoom is not reliable
            to retrieve name, description and groupName).
            Tries to find the room providing the extension as query (since only
            the room name and extension are checked by the search op).
            Returns None if not found
        """
        confId = booking.getConference().getId()
        bookingId = booking.getId()

        roomId = booking.getRoomId()

        try:
            adminApiRoom = AdminApi.getRoom(roomId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "checkStatus")
            else:
                Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s""" %
                            (confId, bookingId, e.fault.faultstring))
                raise
开发者ID:pferreir,项目名称:indico-backup,代码行数:25,代码来源:operations.py

示例2: VidyoError

# 需要导入模块: from MaKaC.plugins.Collaboration.Vidyo.api.api import AdminApi [as 别名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi import getRoom [as 别名]
                        return VidyoError("PINLength", "modify")

                else:
                    Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's updateRoom operation got WebFault: %s""" %
                                    (confId, bookingId, e.fault.faultstring))
                    raise

        #if we could not create the room, the owner did not have any Vidyo accounts
        if not roomModified and loginToUse == len(possibleLogins):
            return VidyoError("badOwner", "modify")


        # we retrieve the just created room; we need to do this because Vidyo will have
        # added extra data like the room id, the url
        try:
            modifiedRoom = AdminApi.getRoom(roomId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "modify")
            else:
                Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s""" %
                            (confId, bookingId, e.fault.faultstring))
                raise

        return modifiedRoom

    @classmethod
    def setAutomute(cls, booking):
        confId = booking.getConference().getId()
        bookingId = booking.getId()
开发者ID:pferreir,项目名称:indico-backup,代码行数:33,代码来源:operations.py

示例3: len

# 需要导入模块: from MaKaC.plugins.Collaboration.Vidyo.api.api import AdminApi [as 别名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi import getRoom [as 别名]
                        loginToUse = loginToUse + 1

                else:
                    Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's updateRoom operation got WebFault: %s""" %
                                    (confId, bookingId, e.fault.faultstring))
                    raise

        #if we could not create the room, the owner did not have any Vidyo accounts
        if not roomModified and loginToUse == len(possibleLogins):
            return VidyoError("badOwner", "modify")


        # we retrieve the just created room; we need to do this because Vidyo will have
        # added extra data like the room id, the url
        try:
            modifiedRoom = AdminApi.getRoom(roomId, confId, bookingId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "modify")
            else:
                Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s""" %
                            (confId, bookingId, e.fault.faultstring))
                raise

        return modifiedRoom

    @classmethod
    def setAutomute(cls, booking):
        confId = booking.getConference().getId()
        bookingId = booking.getId()
开发者ID:vstitches,项目名称:indico,代码行数:33,代码来源:operations.py


注:本文中的MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi.getRoom方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。