oldas.subscriptions
Provides a class for getting subscription information.
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.
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 |
|---|---|---|---|
|
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
|
The API session object. |
required |
Returns:
| Type | Description |
|---|---|
Subscriptions
|
A list of subscriptions. |