Ejemplo n.º 1
0
 def get(self, label, id):
     """Returns a relationship by its id"""
     return make_response(DAO.get_by_id(label, id), 200)
Ejemplo n.º 2
0
 def post(self):
     """ Post a relationship
     """
     return make_response(DAO.create_relation(ns.payload), 201)
Ejemplo n.º 3
0
 def delete(self):
     """ Delete one or many relationships matching with payload
     """
     return make_response(DAO.delete_relation(ns.payload), 204)
Ejemplo n.º 4
0
 def get(self):
     """ Get one or many relationships matching with payload
     """
     return make_response(DAO.get_relation(ns.payload), 200)
Ejemplo n.º 5
0
 def post(self):
     """ Post many relationships at all once
     """
     return make_response(DAO.create_many(ns.payload), 201)
Ejemplo n.º 6
0
 def get(self):
     """ Return a list of all relationships between nodes
     """
     return make_response(DAO.get_all(), 200)
Ejemplo n.º 7
0
 def delete(self, label):
     """ Delete all relationships labeled as param
     """
     return make_response(DAO.delete_by_label(label), 204)
Ejemplo n.º 8
0
 def get(self, label):
     """ Get all relationships labeled as param
     """
     return make_response(DAO.get_by_label(label), 200)