示例#1
0
文件: char.py 项目: elly/evelink
    def industry_jobs(self):
        """Get a list of jobs for a character"""

        api_result = self.api.get('char/IndustryJobs',
            {'characterID': self.char_id})

        return parse_industry_jobs(api_result)
示例#2
0
文件: corp.py 项目: dinoboff/evelink
    def industry_jobs(self, api_result=None):
        """Get a list of jobs for a corporation."""

        if api_result is None:
            api_result = self.api.get('corp/IndustryJobs')

        return api.APIResult(parse_industry_jobs(api_result.result), api_result.timestamp, api_result.expires)
 def industry_jobs_history(self, api_result=None):
     """Get a historical list of industry jobs for a character (active and past)."""
     return api.APIResult(parse_industry_jobs(api_result.result), api_result.timestamp, api_result.expires)
 def industry_jobs(self, api_result=None):
     """Get a list of jobs for a character (active only)."""
     return api.APIResult(parse_industry_jobs(api_result.result), api_result.timestamp, api_result.expires)
示例#5
0
    def industry_jobs(self):
        """Get a list of jobs for a corporation."""

        api_result = self.api.get('corp/IndustryJobs')

        return parse_industry_jobs(api_result)
示例#6
0
文件: corp.py 项目: ayust/evelink
 def industry_jobs_history(self, api_result=None):
     """Get the industry job history for a corporation (active and past)."""
     return api.APIResult(parse_industry_jobs(api_result.result), api_result.timestamp, api_result.expires)
示例#7
0
 def industry_jobs_history(self, api_result=None):
     """Get the industry job history for a corporation (active and past)."""
     return api.APIResult(parse_industry_jobs(api_result.result),
                          api_result.timestamp, api_result.expires)
示例#8
0
 def industry_jobs(self, api_result=None):
     """Get a list of jobs for a corporation (active only)."""
     return api.APIResult(parse_industry_jobs(api_result.result),
                          api_result.timestamp, api_result.expires)
示例#9
0
 def industry_jobs(self, api_result=None):
     """Get a list of jobs for a corporation."""
     return api.APIResult(parse_industry_jobs(api_result.result), api_result.timestamp, api_result.expires)
示例#10
0
 def industry_jobs_history(self, api_result=None):
     """Get a historical list of industry jobs for a character (active and past)."""
     return api.APIResult(parse_industry_jobs(api_result.result),
                          api_result.timestamp, api_result.expires)
示例#11
0
 def test_parse_industry_jobs(self):
     api_result, _, _ = make_api_result("char/industry_jobs.xml")
     result = evelink_ij.parse_industry_jobs(api_result)
     self.assertEqual(result, {
         19962573: {
             'activity_id': 4,
             'begin_ts': 1205793300,
             'delivered': False,
             'completed': False,
             'status': 'in-progress',
             'finished': False,
             'successful': False,
             'container_id': 61000139,
             'container_type_id': 21644,
             'end_ts': 1208073300,
             'input': {
                 'id': 178470781,
                 'blueprint_type': 'original',
                 'item_flag': 4,
                 'location_id': 61000139,
                 'mat_level': 0,
                 'prod_level': 0,
                 'quantity': 1,
                 'runs_left': -1,
                 'type_id': 27309},
             'install_ts': 1205423400,
             'system_id': 30002903,
             'installer_id': 975676271,
             'line_id': 100502936,
             'multipliers': {
                 'char_material': 1.25,
                 'char_time': 0.949999988079071,
                 'material': 1.0,
                 'time': 1.0},
             'output': {
                 'bpc_runs': 0,
                 'container_location_id': 30002903,
                 'flag': 0,
                 'location_id': 61000139,
                 'type_id': 27309},
             'runs': 20,
             'pause_ts': None},
         37051255: {
             'activity_id': 1,
             'begin_ts': 1233500820,
             'delivered': True,
             'completed': True,
             'status': 'failed',
             'finished': False,
             'successful': False,
             'container_id': 61000211,
             'container_type_id': 21644,
             'end_ts': 1233511140,
             'input': {
                 'id': 664432163,
                 'blueprint_type': 'original',
                 'item_flag': 4,
                 'location_id': 61000211,
                 'mat_level': 90,
                 'prod_level': 11,
                 'quantity': 1,
                 'runs_left': -1,
                 'type_id': 894},
             'install_ts': 1233500820,
             'system_id': 30001233,
             'installer_id': 975676271,
             'line_id': 101335750,
             'multipliers': {
                 'char_material': 1.25,
                 'char_time': 0.800000011920929,
                 'material': 1.0,
                 'time': 0.699999988079071},
             'output': {
                 'bpc_runs': 0,
                 'container_location_id': 30001233,
                 'flag': 4,
                 'location_id': 61000211,
                 'type_id': 193},
             'runs': 75,
             'pause_ts': None}
         }
     )
示例#12
0
 def test_parse_industry_jobs(self):
     api_result, _, _ = make_api_result("char/industry_jobs.xml")
     result = evelink_ij.parse_industry_jobs(api_result)
     self.assertEqual(
         result, {
             19962573: {
                 'activity_id': 4,
                 'begin_ts': 1205793300,
                 'delivered': False,
                 'completed': False,
                 'status': 'in-progress',
                 'finished': False,
                 'successful': False,
                 'container_id': 61000139,
                 'container_type_id': 21644,
                 'end_ts': 1208073300,
                 'input': {
                     'id': 178470781,
                     'blueprint_type': 'original',
                     'item_flag': 4,
                     'location_id': 61000139,
                     'mat_level': 0,
                     'prod_level': 0,
                     'quantity': 1,
                     'runs_left': -1,
                     'type_id': 27309
                 },
                 'install_ts': 1205423400,
                 'system_id': 30002903,
                 'installer_id': 975676271,
                 'line_id': 100502936,
                 'multipliers': {
                     'char_material': 1.25,
                     'char_time': 0.949999988079071,
                     'material': 1.0,
                     'time': 1.0
                 },
                 'output': {
                     'bpc_runs': 0,
                     'container_location_id': 30002903,
                     'flag': 0,
                     'location_id': 61000139,
                     'type_id': 27309
                 },
                 'runs': 20,
                 'pause_ts': None
             },
             37051255: {
                 'activity_id': 1,
                 'begin_ts': 1233500820,
                 'delivered': True,
                 'completed': True,
                 'status': 'failed',
                 'finished': False,
                 'successful': False,
                 'container_id': 61000211,
                 'container_type_id': 21644,
                 'end_ts': 1233511140,
                 'input': {
                     'id': 664432163,
                     'blueprint_type': 'original',
                     'item_flag': 4,
                     'location_id': 61000211,
                     'mat_level': 90,
                     'prod_level': 11,
                     'quantity': 1,
                     'runs_left': -1,
                     'type_id': 894
                 },
                 'install_ts': 1233500820,
                 'system_id': 30001233,
                 'installer_id': 975676271,
                 'line_id': 101335750,
                 'multipliers': {
                     'char_material': 1.25,
                     'char_time': 0.800000011920929,
                     'material': 1.0,
                     'time': 0.699999988079071
                 },
                 'output': {
                     'bpc_runs': 0,
                     'container_location_id': 30001233,
                     'flag': 4,
                     'location_id': 61000211,
                     'type_id': 193
                 },
                 'runs': 75,
                 'pause_ts': None
             }
         })
示例#13
0
 def test_parse_industry_jobs(self):
     api_result = make_api_result("char/industry_jobs.xml")
     result = evelink_ij.parse_industry_jobs(api_result)
     self.assertEqual(
         result,
         {
             19962573: {
                 "activity_id": 4,
                 "begin_ts": 1205793300,
                 "delivered": False,
                 "status": "failed",
                 "finished": False,
                 "container_id": 61000139,
                 "container_type_id": 21644,
                 "end_ts": 1208073300,
                 "input": {
                     "id": 178470781,
                     "blueprint_type": "original",
                     "item_flag": 4,
                     "location_id": 61000139,
                     "mat_level": 0,
                     "prod_level": 0,
                     "quantity": 1,
                     "runs_left": -1,
                     "type_id": 27309,
                 },
                 "install_ts": 1205423400,
                 "system_id": 30002903,
                 "installer_id": 975676271,
                 "line_id": 100502936,
                 "multipliers": {
                     "char_material": 1.25,
                     "char_time": 0.949999988079071,
                     "material": 1.0,
                     "time": 1.0,
                 },
                 "output": {
                     "bpc_runs": 0,
                     "container_location_id": 30002903,
                     "flag": 0,
                     "location_id": 61000139,
                     "type_id": 27309,
                 },
                 "runs": 20,
                 "pause_ts": None,
             },
             37051255: {
                 "activity_id": 1,
                 "begin_ts": 1233500820,
                 "delivered": False,
                 "status": "failed",
                 "finished": False,
                 "container_id": 61000211,
                 "container_type_id": 21644,
                 "end_ts": 1233511140,
                 "input": {
                     "id": 664432163,
                     "blueprint_type": "original",
                     "item_flag": 4,
                     "location_id": 61000211,
                     "mat_level": 90,
                     "prod_level": 11,
                     "quantity": 1,
                     "runs_left": -1,
                     "type_id": 894,
                 },
                 "install_ts": 1233500820,
                 "system_id": 30001233,
                 "installer_id": 975676271,
                 "line_id": 101335750,
                 "multipliers": {
                     "char_material": 1.25,
                     "char_time": 0.800000011920929,
                     "material": 1.0,
                     "time": 0.699999988079071,
                 },
                 "output": {
                     "bpc_runs": 0,
                     "container_location_id": 30001233,
                     "flag": 4,
                     "location_id": 61000211,
                     "type_id": 193,
                 },
                 "runs": 75,
                 "pause_ts": None,
             },
         },
     )
示例#14
0
 def industry_jobs(self, api_result=None):
     """Get a list of jobs for a character"""
     return api.APIResult(parse_industry_jobs(api_result.result),
                          api_result.timestamp, api_result.expires)
示例#15
0
    def test_parse_industry_jobs(self):
        api_result, _, _ = make_api_result("char/industry_jobs.xml")
        result = evelink_ij.parse_industry_jobs(api_result)
        self.assertEqual(result, {
            229049720: {
                'activity_id': 1,
                'begin_ts': 1405234032,
                'blueprint': {
                    'id': 1012703933072,
                    'location_id': 60002758,
                    'type': {
                        'id': 31599,
                        'name': 'Small Hydraulic Bay Thrusters I Blueprint',
                    },
                },
                'complete_ts': None,
                'completed': False,
                'completor_id': 0,
                'cost': 0.0,
                'duration': 81600,
                'end_ts': 1405315632,
                'facility_id': 60002758,
                'installer': {
                    'id': 93578165,
                    'name': 'Rhals Tea',
                },
                'licensed_runs': 0,
                'pause_ts': None,
                'product': {
                    'location_id': 60002758,
                    'name': 'Small Hydraulic Bay Thrusters I',
                    'probability': 0.0,
                    'type_id': 31598,
                },
                'runs': 68,
                'station_id': 60002758,
                'status': 1,
                'system': {
                    'id': 30002776,
                    'name': 'Annaro',
                },
                'team_id': 0,
            },
            229049806: {
                'activity_id': 1,
                'begin_ts': 1405234119,
                'blueprint': {
                    'id': 1012218751226,
                    'location_id': 60002758,
                    'type': {
                        'id': 31178,
                        'name': 'Small Polycarbon Engine Housing I Blueprint',
                    },
                },
                'complete_ts': None,
                'completed': False,
                'completor_id': 0,
                'cost': 0.0,
                'duration': 81491,
                'end_ts': 1405315610,
                'facility_id': 60002758,
                'installer': {
                    'id': 93578165,
                    'name': 'Rhals Tea',
                },
                'licensed_runs': 0,
                'pause_ts': None,
                'product': {
                    'location_id': 60002758,
                    'name': 'Small Polycarbon Engine Housing I',
                    'probability': 0.0,
                    'type_id': 31177,
                },
                'runs': 83,
                'station_id': 60002758,
                'status': 1,
                'system': {
                    'id': 30002776,
                    'name': 'Annaro',
                },
                'team_id': 0,
            },

        })