Skip to content

oldas.unread

Provides a class for getting unread information.

Count

Bases: NamedTuple

Unread count information class.

id instance-attribute

id

The ID of the item that has an unread count.

name property

name

The name of the count.

newest_timestamp instance-attribute

newest_timestamp

The timestamp of the newest item.

prefix instance-attribute

prefix

The prefix related to this type of count.

raw class-attribute instance-attribute

raw = None

The raw data from the API.

unread instance-attribute

unread

The unread count.

from_json classmethod

from_json(data, prefix)

Load the count from JSON data.

Parameters:

Name Type Description Default

data

RawData

The data to load the count from.

required

prefix

str

The prefix to associate with this type of count.

required

Returns:

Type Description
Count

The count information.

Counts

Counts(data=None)

Bases: OldList[Count]

Holds a collection of counts.

Unread

Bases: NamedTuple

Class that loads and holds unread counts.

feeds instance-attribute

feeds

The unread count for each feed.

folders instance-attribute

folders

The unread counts for each folder.

total instance-attribute

total

The total unread count.

load async classmethod

load(session)

Load the unread counts.

Parameters:

Name Type Description Default

session

Session

The API session object.

required

Returns:

Type Description
Unread

The unread counts.