Coretex
|
Public Member Functions | |
bool | __eq__ (self, object __o) |
int | __hash__ (self) |
bool | refresh (self, Optional[Dict[str, Any]] jsonObject=None) |
bool | update (self, Dict[str, Any] parameters) |
bool | delete (self) |
Optional[Self] | create (cls, Dict[str, Any] parameters) |
List[Self] | fetchAll (cls, Optional[List[str]] queryParameters=None, int pageSize=DEFAULT_PAGE_SIZE) |
Optional[Self] | fetchById (cls, int objectId, Optional[List[str]] queryParameters=None) |
Public Member Functions inherited from coretex.codable.codable.Codable | |
Dict[str, Any] | encode (self) |
None | onDecode (self) |
Self | decode (cls, Dict[str, Any] encodedObject) |
Base class for every Coretex.ai entity representation in Python Properties ---------- id : int id of object isDeleted : bool boolean value that represents if object will be shown or not
Definition at line 31 of file network_object.py.
bool coretex.networking.network_object.NetworkObject.__eq__ | ( | self, | |
object | __o | ||
) |
Checks if the NetworkObjects which have id property defined are equal Parameter --------- __o : object object to which we are comparing self Returns ------- bool -> True if ids are present and equal, False in any other case
Definition at line 64 of file network_object.py.
int coretex.networking.network_object.NetworkObject.__hash__ | ( | self | ) |
Calculates hash of the object in a non-randomized manner Returns ------- int -> hash of all the items defined on the self.__dict__ object
Definition at line 85 of file network_object.py.
Optional[Self] coretex.networking.network_object.NetworkObject.create | ( | cls, | |
Dict[str, Any] | parameters | ||
) |
Creates the entity linked to this class on Coretex backend Parameters ---------- parameters : Dict[str, Any] parameters which will be sent as request body Returns ------- Optional[Self] -> created object if request was successful, None otherwise
Definition at line 167 of file network_object.py.
bool coretex.networking.network_object.NetworkObject.delete | ( | self | ) |
Sends a DELETE request to Coretex backend Returns ------- bool -> True if request was successful, False otherwise
Definition at line 150 of file network_object.py.
List[Self] coretex.networking.network_object.NetworkObject.fetchAll | ( | cls, | |
Optional[List[str]] | queryParameters = None , |
||
int | pageSize = DEFAULT_PAGE_SIZE |
||
) |
Fetches all entities from Coretex backend which match the given predicate Parameters ---------- queryParameters : Optional[List[str]] query parameters (predicate) which will be appended to URL (Not required) pageSize : int Specified page size (entity count) which will be fetched, default = 100 Returns ------- List[Self] -> list of all fetched entities
Definition at line 193 of file network_object.py.
Optional[Self] coretex.networking.network_object.NetworkObject.fetchById | ( | cls, | |
int | objectId, | ||
Optional[List[str]] | queryParameters = None |
||
) |
Fetches a single entity with the matching id Parameters ---------- objectId : int id of the object which is fetched queryParameters : Optional[List[str]] query parameters (predicate) which will be appended to URL (Not required) Returns ------- Optional[Self] -> fetched object if request was successful, None otherwise
Definition at line 231 of file network_object.py.
bool coretex.networking.network_object.NetworkObject.refresh | ( | self, | |
Optional[Dict[str, Any]] | jsonObject = None |
||
) |
Updates objects fields to a provided value if set, otherwise fetches the object from the API and updates the values using the fetched object Parameters ---------- jsonObject : Optional[Dict[str, Any]] A serialized json object to which the values should be updated, if provided Returns ------- bool -> True if the update was successful, False otherwise
Definition at line 96 of file network_object.py.
bool coretex.networking.network_object.NetworkObject.update | ( | self, | |
Dict[str, Any] | parameters | ||
) |
Sends a PUT request to Coretex backend Parameters ---------- parameters : Dict[str, Any] parameters which will be sent as request body Returns ------- bool -> True if request was successful, False otherwise
Definition at line 127 of file network_object.py.