Beispiel #1
0
 def get_via_id(self, corp_id, query_character=None, **kwargs):
     """
     Queries for a corporation. If the corp can't be founded, check the
     EVE API service for information on it. If a match still can't be
     found, return ApiPlayerCorporation.DoesNotExist.
     
     corp_id: (int) Corp's ID.
     query_character: (ApiPlayerCharacter) For more details on the corp,
                      pass a member of the corp.
     """
     return corporation_sheet.query_corporation_sheet(corp_id, 
                                         query_character=query_character,
                                         **kwargs)
Beispiel #2
0
    def update_from_api(self, query_character=None, **kwargs):
        """
        Updates this corporation from the API.
        
        query_character: (ApiPlayerCharacter) More information about the corp
                         can be pulled if you pass the API details for a
                         member of the corp.
        """
        if self.ceo_character and query_character == None:
            # If they didn't specify a character and we have the CEO's account
            # on record, use that to get corporate data.
            ceo_account = self.ceo_character.get_account()
            if ceo_account:
                query_character = self.ceo_character

        return corporation_sheet.query_corporation_sheet(self, 
                                            query_character=query_character,
                                            **kwargs)