def get(self, authcontext): """ gets all hjqubeship items """ LOG.debug("Serving Get all request") list = hjqubeshipService(authcontext['context']).get_all() # normalize the name for 'id' return list, 200
def get(self, authcontext): """ gets all friday_demo items """ LOG.debug("Serving Get all request") list = friday_demoService(authcontext['context']).get_all() # normalize the name for 'id' return list, 200
def get(self): """gets an jeff2 item that omar has changed """ try: LOG.debug("Get version ") return VersionModel(**{'version': self.config.get_version()}), 200 except Exception as ex: LOG.error(ex) return ErrorModel(**{'message': ex}), 500
def get(self, name=None): LOG.debug("hello world") parser = reqparse.RequestParser() parser.add_argument('sth') args = parser.parse_args() name = name if name is not None else 'test' sth = args['sth'] if args['sth'] is not None else 'hello world' return {name: sth}
def get(self, authcontext, entity_id): """gets an hjqubeship item that omar has changed """ try: LOG.debug("Get details by id %s ", entity_id) data = hjqubeshipService(authcontext['context'])\ .find_by_id(entity_id) clean_nonserializable_attributes(data) except hjqubeshipServiceError as e: LOG.error(e) return ErrorModel(**{'error_code': str(e.errors.value), 'error_message': e.args[0]}), e.errors except ValueError as e: LOG.error(e) return ErrorModel(**{'error_code': '400', 'error_message': e.args[0]}), 400 return hjqubeshipModel(**data), 200
def get(self, authcontext, project_id, iteration_id): """ gets all artifacts items """ LOG.debug("Serving Get all request") list = ArtifactsService(authcontext['context']).get_all(project_id, iteration_id) artifacts_list = [] for data in list: clean_nonserializable_attributes(data) if 'url' in data: del data['url'] artifacts_list_model = ArtifactListModel(**data) artifacts_list.append(artifacts_list_model) # normalize the name for 'id' return artifacts_list, 200
def get(self, authcontext, project_id, iteration_id, entity_id): """gets an artifacts item """ try: LOG.debug("Get details by id %s %s %s", project_id, iteration_id, entity_id) data = ArtifactsService(authcontext['context'])\ .find_by_id(project_id, iteration_id, entity_id) clean_nonserializable_attributes(data) except ArtifactsServiceError as e: LOG.error(e) return ErrorModel(**{'error_code': str(e.errors.value), 'error_message': e.args[0]}), e.errors except ValueError as e: LOG.error(e) return ErrorModel(**{'error_code': '400', 'error_message': e.args[0]}), 400 return ArtifactsModel(**data), 200