def edit(self, mr: ModelRoute) -> ModelRoute: """ Edit Model Route :param mr: Model Route :return Message from API server """ return ModelRoute.from_dict( self.query(MODEL_ROUTE_URL, action='PUT', payload=mr.to_dict()))
async def create(self, mr: ModelRoute) -> ModelRoute: """ Create Model Route :param mr: Model Route :return Message from API server """ return ModelRoute.from_dict(await self.query(MODEL_ROUTE_URL, action='POST', payload=mr.to_dict()))