# Path: recruit_app/extensions.py



import evelink.api
import evelink.char
import evelink.eve
from flask import current_app
from recruit_app.extensions import cache_extension
            results = alliance[0][int(alliance_id)]
            if results:
                return True
        except evelink.api.APIError as error:
            current_app.logger.error(error)
            return False

        return False

    @staticmethod
    def check_if_id_is_character(character_id):
        try:
            api = EveApiManager.evelink_api()
            eve = evelink.eve.EVE(api=api)
            results = eve.character_name_from_id(character_id)
            if results:
                return True
        except evelink.api.APIError as error:
            current_app.logger.error(error)
            return False

        return False

    @staticmethod
    def check_if_character_is_in_corp(character_id, corp_id):
        try:
            api = EveApiManager.evelink_api()
            eve = evelink.eve.EVE(api=api)
            results = eve.affiliations_for_character(character_id)
            actual_corp = results[0]['corp']['id']

# Path: recruit_app/extensions.py



# Path: recruit_app/user/eve_api_manager.py
import evelink.api
import evelink.char
import evelink.eve
from flask import current_app
from recruit_app.extensions import cache_extension

            results = alliance[0][int(alliance_id)]
            if results:
                return True
        except evelink.api.APIError as error:
            current_app.logger.error(error)
            return False

        return False

    @staticmethod
    def check_if_id_is_character(character_id):
        try:
            api = EveApiManager.evelink_api()
            eve = evelink.eve.EVE(api=api)
            results = eve.character_name_from_id(character_id)
            if results:
                return True
        except evelink.api.APIError as error:
            current_app.logger.error(error)
            return False

        return False

    @staticmethod
    def check_if_character_is_in_corp(character_id, corp_id):
        try:
            api = EveApiManager.evelink_api()
            eve = evelink.eve.EVE(api=api)
            results = eve.affiliations_for_character(character_id)
            actual_corp = results[0]['corp']['id']

            return corp_id == actual_corp