Notifications()
objectIn order to get list of notifications use
diaspy.notifications.Notifications()
object. It support iteration and
indexing.
When creating new instance of Notifications
only Connection
object
is needed.
last()
This method will return you last five notifications.
get()
This is slightly more advanced then last()
. It allows you to specify
how many notifications per page you want to get and which page you want
to recieve.
update()
This will insert new notifications to the object.
more()
This will append older notifications to the object.
Notification()
modelSingle notification (it should be obvious that it requires object of its
own) is located in diaspy.models.Notification()
. It has several
methods you can use.
who()
This method will return list of guids of the users who caused you to get this notification.
when()
This method will return UTC time when you get the notification.
mark()
To mark notification as read
or unread
. It has one parameter -
unread
which is boolean.
Also, you can use str()
and repr()
on the Notification()
and you
will get nice string.
diaspy
, written by Marek Marecki