Bases: exceptions.Exception
Bases: object
@path string Takes a key path separated by forward slashes / to find an entity of the identity Second parameter is the value or expression being assigned
Example: id.add(“data/messages”,[{..message object..}]) #would append a message
#to the messages list
adds a friend to the data/friends element. also validates the friend is a valid identity
returns void
adds a friend to the friend_requests element. also validates the friend request is a valid identity
returns void
Adds an IP address object to the data/identity/ip_address element. This object is used by your friends to contact you.
returns void
adds a friend to the data/messages element.
returns void
generates a new IP Address object @host string Can be an IP address or a host name. @port string Can be any string port number @protocol is the version of IP being used. 4 or 6
returns dictionary
Takes a key path separated by forward slashes / to find an entity of the identity Second parameter is the value or expression being assigned
Example: id.add(“status”) #would delete the status key
Takes a key path separated by forward slashes / to find an entity of the identity
Example: id.get(“data/friends”) #would return the friends list
This method will return a dictionary prepared to be encrypted, encoded and sent
@friendNode Node instance This is used for the public and private key information
returns dictionary
This is a place holder method to indicate that subclasses with persistent storage should override this method
returns void
tries to find the relationship of self with the friend of your friend. Because even though you have the mutual friend node gotten from your friend’s friend list, that node will not have the correct public key. So we need to return the corresponding friend in your list
returns none or Node instance
Creates either a new message thread or replies to an existing thread if @thread_id is given.
Parameters: | pub_keys (list) – list A list of public_keys to send to |
---|
:subject string Just like an email subject :message string The body of the message, just like email :thread_id string The thread_id to allow aggregation of a topic
returns a new message object that can be inserted into data/messages
Takes a key path separated by forward slashes / to find an entity of the identity Second parameter is the value or expression being assigned
Example: id.set(“data/identity/name”,”Matt”) #would return the friends list
This kicks off the _updateTree method which will synchronize the two identity objects @inbound dictionary Is the object to synchronize against @is_self bool This is necessary because a friend has the ability to impersonate you. @permission_object dictionary This object should match the index structure of
returns void
inboundNode is an Node instance of a friend of self and used to update the information for that friend in your friends list.
returns void
This function will handle assigning a value to a key in a list or dictionary while in the updateTree method.
returns void
This method will attempt to update your status automatically based on activity during the sync process.
returns void