Edge()¶
- class Edge(parent=None)¶
This class describes an Edge object child of Lagoon class.
- create(type='', from_key='', to_key='', data={})¶
Create an edge
Tip
The type of the edge is case sensitive ! By convention, all edges’ type start with a capital letter
- Parameters:
type (string) – The edge type
from_key (string) – The source key
to_key (string) – The destination key
data (dictionary, optional) – The edge data
- Returns:
Edge object
- Return type:
- delete()¶
Delete the edge
Danger
The edge will be completely deleted
- Returns:
Deleted edge object from API
- Return type:
dictionary
- get(populate=False)¶
Get the edge by its _key
- Parameters:
populate (boolean, optional) – Populate edge.createdBy and edge.updatedBy with User object
- Returns:
Edge object
- Return type:
- replace_data(data={})¶
Replace the edge data with new ones
Danger
This is replacing all existing edge data. Meaning that you can loose data.
- Parameters:
data (dictionary) – The new edge data
- Returns:
Edge object
- Return type:
- to_dict()¶
Convert the edge to a dictionary
- Returns:
The edge as a dictionary
- Return type:
dictionary