2020-09-17 20:02:52 +00:00
|
|
|
''' defines activitypub collections (lists) '''
|
|
|
|
from dataclasses import dataclass
|
|
|
|
from typing import List
|
|
|
|
|
|
|
|
from .base_activity import ActivityObject
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass(init=False)
|
|
|
|
class OrderedCollection(ActivityObject):
|
|
|
|
''' structure of an ordered collection activity '''
|
|
|
|
totalItems: int
|
|
|
|
first: str
|
|
|
|
last: str = ''
|
|
|
|
name: str = ''
|
2020-11-28 18:18:24 +00:00
|
|
|
owner: str = ''
|
2020-09-17 20:02:52 +00:00
|
|
|
type: str = 'OrderedCollection'
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass(init=False)
|
|
|
|
class OrderedCollectionPage(ActivityObject):
|
|
|
|
''' structure of an ordered collection activity '''
|
|
|
|
partOf: str
|
|
|
|
orderedItems: List
|
|
|
|
next: str
|
|
|
|
prev: str
|
|
|
|
type: str = 'OrderedCollectionPage'
|