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

Method printerModels

src/astroprint/cloud.py:630–640  ·  view source on GitHub ↗
(self, manufacturer_id)

Source from the content-addressed store, hash-verified

628 return { 'error': 'invalid_data' }
629
630 def printerModels(self, manufacturer_id):
631 try:
632 r = requests.get( "%s/v2/manufacturers/%s/models" % (self.apiHost, manufacturer_id), auth=self.hmacAuth )
633 data = r.json()
634 except:
635 data = None
636
637 if data:
638 return {'printer_models': data}
639 else:
640 return { 'error': 'invalid_data'}
641
642 def printerModel(self, model_id):
643 try:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected