Class APActor
- Namespace
- ActivityPub.Types.AS
- Assembly
- ActivityPub.Types.dll
An object that implements the required properties of an ActivityPub Actor.
public class APActor : ASObject, IASModel<ASType, ASTypeEntity>, IASModel<ASType>, IASModel<ASObject, ASObjectEntity, ASType>, IASModel<ASObject, ASObjectEntity>, IASModel<ASObject>, IASModel<APActor, APActorEntity, ASObject>, IASModel<APActor, APActorEntity>, IASModel<APActor>
- Inheritance
-
APActor
- Implements
- Derived
- Inherited Members
Remarks
This is a synthetic class included for utility. It does not exist in the ActivityStreams or ActivityPub standards.
Constructors
APActor()
Constructs a new instance and attaches it to a new, empty type graph.
public APActor()
APActor(ASType)
Constructs a new instance and extends an existing type graph from a provided model.
public APActor(ASType existingGraph)
Parameters
existingGraph
ASType
- See Also
-
Extend<TModel, TEntity>()
APActor(TypeMap, APActorEntity?)
public APActor(TypeMap typeMap, APActorEntity? entity)
Parameters
typeMap
TypeMapentity
APActorEntity
APActor(TypeMap, bool)
Constructs a new instance from an existing type graph. The existing graph is either extended or wrapped, depending on the value of
isExtending
public APActor(TypeMap typeMap, bool isExtending = true)
Parameters
Remarks
All overrides MUST call this using
base(typeMap, false)
Exceptions
- InvalidOperationException
If
is true and the entity type already exists in the graphextendGraph
- InvalidOperationException
If
is true and the entity requires another entity that is missing from the graphextendGraph
- InvalidCastException
If
is false and the object is not of typeextendGraph
TEntity
- See Also
Properties
Endpoints
A json object which maps additional (typically server/domain-wide) endpoints which may be useful either for this actor or someone referencing this actor. This mapping may be nested inside the actor document as the value or may be a link to a JSON-LD document with these properties.
public Linkable<APActorEndpoints>? Endpoints { get; set; }
Property Value
Remarks
This should technically be a Linkable{ActorEndpoints}, but ActorEndpoints does not extend ASType
Entity
private APActorEntity Entity { get; }
Property Value
Followers
A reference to an ActivityStreams collection of the actors that follow this actor. This is a list of everyone who has sent a Follow activity for the actor, added as a side effect.
public ASLink? Followers { get; set; }
Property Value
- See Also
Following
A reference to an ActivityStreams collection of the actors that this actor is following. This is a list of everybody that the actor has followed, added as a side effect.
public ASLink? Following { get; set; }
Property Value
- See Also
Inbox
A reference to an ActivityStreams OrderedCollection comprised of all the messages received by the actor. The inbox stream contains all activities received by the actor.
public required ASLink Inbox { get; set; }
Property Value
- See Also
Liked
A reference to an ActivityStreams collection of objects this actor has liked. This is a list of every object from all of the actor's Like activities, added as a side effect.
public ASLink? Liked { get; set; }
Property Value
- See Also
Outbox
A reference to an ActivityStreams OrderedCollection comprised of all the messages produced by the actor. The outbox stream contains activities the user has published, subject to the ability of the requester to retrieve the activity.
public required ASLink Outbox { get; set; }
Property Value
- See Also
PreferredUsername
A short username which may be used to refer to the actor, with no uniqueness guarantees.
public NaturalLanguageString? PreferredUsername { get; set; }
Property Value
Streams
A list of supplementary Collections which may be of interest.
public ASType? Streams { get; set; }
Property Value
Remarks
Not sure what type this is. Maybe a link to a collection?
Explicit Interface Implementations
IASModel<APActor>.FromGraph(TypeMap)
Constructs an instance from this type from a pre-populated type graph. The provided TypeMap instance is guaranteed to include an instance of type EntityType.
static APActor IASModel<APActor>.FromGraph(TypeMap typeMap)
Parameters
typeMap
TypeMap
Returns
IASModel<APActor>.ShouldConvertFrom(JsonElement, TypeMap)
Overrides the native type-matching logic. This will be called when an object is being converted to check if it contains this type. Return true to forcibly parse the type, true to block parsing, or null to resume native logic.
static bool? IASModel<APActor>.ShouldConvertFrom(JsonElement inputJson, TypeMap typeMap)
Parameters
inputJson
JsonElementJSON message that is being converted. May not be an object.
typeMap
TypeMapType graph that may contain the object. Contains the JSON-LD context and other metadata.
Returns
- bool?