MightyNetwork :: DB :: Note (source, CPAN)

CONTENTS

NAME

MightyNetwork::DB::Note

Disclaimer: the objects that are mentionned here are objects as in Object-oriented programming, not as ActivityPub objects.

DESCRIPTION

Model for notes.

ATTRIBUTES

MightyNetwork::DB::Note inherits attributes from MightyNetwork::DB and adds the following attributes.

id

my $id = $object->id;
$object->id(3);

actor

my $actor = $object->actor;
$object->actor(3);

xtype

my $xtype = $object->xtype;
$object->xtype(3);

content

my $content = $object->content;
$object->content(3);

xto

my $xto = $object->xto;
$object->xto(3);

cc

my $cc = $object->cc;
$object->cc(3);

attributed_to

my $attributed_to = $object->attributed_to;
$object->attributed_to(3);

published

my $published = $object->published;
$object->published(3);

actor_object

my $actor_object = $object->actor_object;
$object->actor_object(3);

METHODS

MightyNetwork::DB::Note inherits methods from MightyNetwork::DB and adds the following methods.

find_actor_notes($actor)

Returns a Mojo::Collection of notes belonging to an actor.

The argument $actor must be a MightyNetwork::DB::ActivityPub::Actor object.

my $actor = MightyNetwork::DB::ActivityPub::Actor->new(app => $c->app);
$c->find_actor_notes($actor);

MODIFIED METHODS

MightyNetwork::DB::Note also modifies the following methods.

to_json(@to_delete)

It adds the actor_object attribute to the list of attributes to delete from the JSON representation of the object.

my $json = $object->to_json('foo', 'bar');

See MightyNetwork::DB#to_json-to_delete for the original method.

SEE ALSO

MightyNetwork::DB, MightyNetwork::DB::ActivityPub::Actor, Mojo::Collection, Mojo::Base