initial commit for a take on having a restful core api, along with an example scripts leveraging the available API calls
This commit is contained in:
parent
44781d0aec
commit
7c6c5edf46
5 changed files with 485 additions and 0 deletions
|
@ -52,6 +52,19 @@ def set_node_map(node_map):
|
|||
_log_map()
|
||||
|
||||
|
||||
def get_node_type(node_class):
|
||||
"""
|
||||
Retrieve the node type given a node class.
|
||||
|
||||
:param class node_class: node class to get type for
|
||||
:return: node type
|
||||
:rtype: core.enumerations.NodeTypes
|
||||
"""
|
||||
global _NODE_MAP
|
||||
node_type_map = {v: k for k, v in _NODE_MAP.iteritems()}
|
||||
return node_type_map.get(node_class)
|
||||
|
||||
|
||||
def get_node_class(node_type):
|
||||
"""
|
||||
Retrieve the node class for a given node type.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue