Example #1
0
 def get() -> Union[Tuple[Resource, int], Response, Dict[str, Any]]:
     parser = query.parse_args()
     if not parser['entities'] \
             and not parser['codes'] \
             and not parser['classes'] \
             and not parser['system_classes']:
         raise QueryEmptyError
     return resolve_entities(GetQuery.get_entities(parser), parser, 'query')
Example #2
0
 def get(code: str
         ) -> Union[Tuple[Resource, int], Response, Dict[str, Any]]:
     parsed = entity_.parse_args()
     return resolve_entities(GetByCode.get_by_view(code, parsed), parsed,
                             code)
Example #3
0
 def get(id_: int) -> Union[Tuple[Resource, int], Response, Dict[str, Any]]:
     return resolve_entities(
         GetLinkedEntities.get_linked_entities(id_),
         entity_.parse_args(),
         'linkedEntities')
Example #4
0
 def get(id_: int) -> Union[Tuple[Resource, int], Response, Dict[str, Any]]:
     entities = [entity for entity in GetTypeEntitiesAll.get_node_all(id_)]
     if not entities:
         entities = get_entities_by_ids(
             GetTypeEntitiesAll.get_special_node(id_, []))
     return resolve_entities(entities, entity_.parse_args(), id_)
Example #5
0
 def get(class_code: str) \
         -> Union[Tuple[Resource, int], Response, Dict[str, Any]]:
     return resolve_entities(
         GetByClass.get_by_class(class_code, entity_.parse_args()),
         entity_.parse_args(), class_code)
Example #6
0
 def get(system_class: str) \
         -> Union[Tuple[Resource, int], Response, Dict[str, Any]]:
     return resolve_entities(
         GetBySystemClass.get_by_system(system_class, entity_.parse_args()),
         entity_.parse_args(), system_class)
Example #7
0
 def get(latest: int) \
         -> Union[Tuple[Resource, int], Response, Dict[str, Any]]:
     return resolve_entities(GetLatest.get_latest(latest),
                             entity_.parse_args(), latest)