Skip to content

oldas.subscriptions

Provides a class for getting subscription information.

Categories

Categories(data=None)

Bases: OldList[Category]

Holds a collection of categories.

Category

Bases: NamedTuple

Holds details of a category.

id instance-attribute

id

The ID for the category.

label instance-attribute

label

The label for the category.

raw class-attribute instance-attribute

raw = None

The raw data from the API.

from_json classmethod

from_json(data)

Load the category from JSON data.

Parameters:

Name Type Description Default

data

RawData

The data to load the category from.

required

Returns:

Type Description
Category

The category.

Subscription

Bases: NamedTuple

Holds a subscription.

categories instance-attribute

categories

The Categories for the subscription.

first_item_time instance-attribute

first_item_time

The time of the first item.

html_url instance-attribute

html_url

The HTML URL of the subscription.

id instance-attribute

id

The ID of the subscription.

raw class-attribute instance-attribute

raw = None

The raw data from the API.

sort_id instance-attribute

sort_id

The sort ID of the subscription.

title instance-attribute

title

The title of the subscription.

url instance-attribute

url

The URL of the subscription.

from_json classmethod

from_json(data)

Load the subscription from JSON data.

Parameters:

Name Type Description Default

data

RawData

The data to load the subscription from.

required

Returns:

Type Description
Subscription

The subscription.

Subscriptions

Subscriptions(data=None)

Bases: OldList[Subscription]

Loads and holds the full list of subscriptions.

load async classmethod

load(session)

Load the subscriptions.

Parameters:

Name Type Description Default

session

Session

The API session object.

required

Returns:

Type Description
Subscriptions

A list of subscriptions.