MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / printerModel

Method printerModel

src/astroprint/cloud.py:642–652  ·  view source on GitHub ↗
(self, model_id)

Source from the content-addressed store, hash-verified

640 return { 'error': 'invalid_data'}
641
642 def printerModel(self, model_id):
643 try:
644 r = requests.get( "%s/v2/manufacturers/models/%s" % (self.apiHost, model_id), auth=self.hmacAuth )
645 data = r.json()
646 except:
647 data = None
648
649 if data:
650 return {'printer_model': data}
651 else:
652 return { 'error': 'invalid_data'}
653
654 def getPrintFile(self, cloudId):
655 if not self._print_file_store:

Callers 2

printerModelInfoMethod · 0.80
printerModelFunction · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected