ActivityChange

Represents a user's changed activities.

Attributes

added : None, list of Activity

The added activities to the respective user. Defaults to None.

removed : None, list of Activity

The removed activities from the respective user. Defaults to None.

updated : None, list of ActivityUpdate

The updated activities of the respective user. Defaults to None.

Methods

__new__(...)

Creates a new activity change with the given parameters.

ParameterTypeOptionalKeyword onlyDescription
added

None, iterable of Activity

The added activities to the user.

removed

None, iterable of Activity

The removed activities from the user.

updated

None, iterable of ActivityUpdate

The updated activities of the user.

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

copy()

Copies the activity change.

Returns

new : instance<type<self>>

copy_with(...)

Copies the activity change with the given fields.

ParameterTypeOptionalKeyword onlyDescription
added

None, iterable of Activity

The added activities to the user.

removed

None, iterable of Activity

The removed activities from the user.

updated

None, iterable of ActivityUpdate

The updated activities of the user.

Returns

new : instance<type<self>>

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

from_fields(added, updated, removed)

Creates a new activity change with the given parameters.

ParameterTypeDescription
added

None, list of Activity

The added activities to the user.

updated

None, list of ActivityUpdate

The updated activities of the user.

removed

None, list of Activity

The removed activities from the user.

iter_added()

Iterates over the added activities.

This method is an iterable generator.

Yields

added : Activity

iter_removed()

Iterates over the removed activities.

This method is an iterable generator.

Yields

removed : Activity

iter_updated()

Iterates over the activity updates.

This method is an iterable generator.

Yields

updated : ActivityUpdate

__eq__()

__getattr__()

Drops a rich attribute error.

__hash__()

Returns the activity change's hash value.

__iter__()

Unpacks the activity change.

This method is a generator.

__len__()

Helper for unpacking if needed.

__repr__()

Returns the representation of the activity change.