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


Python EveApiManager.get_corporation_ticker_from_id方法代码示例

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


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

示例1: update_characters_from_list

# 需要导入模块: from services.managers.eve_api_manager import EveApiManager [as 别名]
# 或者: from services.managers.eve_api_manager.EveApiManager import get_corporation_ticker_from_id [as 别名]
 def update_characters_from_list(chars):
     for char in chars.result:
         if EveManager.check_if_character_exist(chars.result[char]['name']):
             eve_char = EveManager.get_character_by_character_name(chars.result[char]['name'])
             eve_char.corporation_id = chars.result[char]['corp']['id']
             eve_char.corporation_name = chars.result[char]['corp']['name']
             eve_char.corporation_ticker = EveApiManager.get_corporation_ticker_from_id(
                 chars.result[char]['corp']['id'])
             eve_char.alliance_id = chars.result[char]['alliance']['id']
             eve_char.alliance_name = chars.result[char]['alliance']['name']
             eve_char.save()
开发者ID:TrentBartlem,项目名称:allianceauth,代码行数:13,代码来源:managers.py

示例2: create_characters_from_list

# 需要导入模块: from services.managers.eve_api_manager import EveApiManager [as 别名]
# 或者: from services.managers.eve_api_manager.EveApiManager import get_corporation_ticker_from_id [as 别名]
    def create_characters_from_list(chars, user, api_id):

        for char in chars.result:
            if not EveManager.check_if_character_exist(chars.result[char]['name']):
                EveManager.create_character(chars.result[char]['id'],
                                            chars.result[char]['name'],
                                            chars.result[char]['corp']['id'],
                                            chars.result[char]['corp']['name'],
                                            EveApiManager.get_corporation_ticker_from_id(
                                                chars.result[char]['corp']['id']),
                                            chars.result[char]['alliance']['id'],
                                            chars.result[char]['alliance']['name'],
                                            user, api_id)
开发者ID:TrentBartlem,项目名称:allianceauth,代码行数:15,代码来源:managers.py

示例3: update_characters_from_list

# 需要导入模块: from services.managers.eve_api_manager import EveApiManager [as 别名]
# 或者: from services.managers.eve_api_manager.EveApiManager import get_corporation_ticker_from_id [as 别名]
 def update_characters_from_list(chars):
     logger.debug("Updating characters from list: %s" % chars.result)
     for char in chars.result:
         if EveManager.check_if_character_exist(chars.result[char]['name']):
             eve_char = EveManager.get_character_by_character_name(chars.result[char]['name'])
             logger.debug("Got existing character model %s" % eve_char)
             eve_char.corporation_id = chars.result[char]['corp']['id']
             eve_char.corporation_name = chars.result[char]['corp']['name']
             eve_char.corporation_ticker = EveApiManager.get_corporation_ticker_from_id(
                 chars.result[char]['corp']['id'])
             eve_char.alliance_id = chars.result[char]['alliance']['id']
             eve_char.alliance_name = chars.result[char]['alliance']['name']
             eve_char.save()
             logger.info("Updated character model %s" % eve_char)
         else:
             logger.warn("Attempting to update non-existing character model with name %s" % chars.result[char]['name'])
开发者ID:Aelonius,项目名称:allianceauth,代码行数:18,代码来源:managers.py


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