Classes
Methods
# add(activity, target)
Add something to a user collection. The object of this must be an activity, use e.g. the Create actvitiy for a Model object to add it to the 'avatars' collection
Parameters:
Name | Type | Description |
---|---|---|
activity |
Activities.IRI
|
Activities.APObject
|
id or object of the activity to be added |
target |
Activities.IRI
|
string
|
Collection identifier from actor.streams, or collection name to be converted into an identifier |
# async blockList() → {Array.<string>}
List of IRIs for users blocked by this user
blocked user IRIs
Array.<string>
# create(object, to, audience, summaryopt) → {Promise.<IRI>}
Post a create activity for an object
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
object |
Activities.APObject
|
New object to be wrapped in Create activity |
|
to |
Array.<Activities.IRI>
|
direct addressee IRIs |
|
audience |
Activities.Audience
|
direct, friends, or public |
|
summary |
string
|
<optional> |
activity summary description (may contain HTML) |
The resulting Create activity IRI
Promise.<IRI>
# async getObject(IRI) → {Promise.<any>}
Fetch the ActivityPub entity at the given IRI (may be object, activity, collection, et c). If the domain is the user's home immer or the local immer, makes a fetch with credentials included. Otherwise uses the user's home immer proxy service, if available
Parameters:
Name | Type | Description |
---|---|---|
IRI |
string
|
Promise.<any>
# async postMedia(activity, file, iconopt)
Post an activity with media upload
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
activity |
Activities.APActivity
|
||
file |
Blob
|
||
icon |
Blob
|
<optional> |
Type Definitions
Object
# APActivity
Object representing an ActivityPub activity
Properties:
Name | Type | Description |
---|---|---|
id |
Activities.IRI
|
|
type |
string
|
|
actor |
Activities.APActor
|
Object
# APActor
Object representing an ActivityPub actor
Properties:
Name | Type | Description |
---|---|---|
id |
Activities.IRI
|
|
type |
string
|
|
inbox |
Activities.IRI
|
|
outbox |
Activities.IRI
|
Object
# APLink
Object representing an ActivityPub object
Properties:
Name | Type | Description |
---|---|---|
id |
Activities.IRI
|
|
type |
string
|
Object
# APModel
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
Activities.IRI
|
||
type |
'Model'
|
||
name |
string
|
Model name |
|
url |
string
|
Activities.APObject
|
Activities.APLink
|
link to 3D model file |
|
icon |
string
|
Activities.APObject
|
Activities.APLink
|
<optional> |
preview image |
audience |
string
|
who can view this object (generally Activities.PublicAddress) |
Object
# APObject
Object representing an ActivityPub object
Properties:
Name | Type | Description |
---|---|---|
id |
Activities.IRI
|
|
type |
string
|
Object
# APPlace
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
Activities.IRI
|
||
type |
'Place'
|
||
name |
String
|
Title of the destination |
|
summary |
String
|
<optional> |
Description destination |
url |
String
|
link to visit the destination |
|
audience |
String
|
who can view this object (generally Activities.PublicAddress) |
|
icon |
string
|
Activities.APObject
|
Activities.APLink
|
<optional> |
preview image |
context |
Activities.APPlace
|
<optional> |
Main Place object representing the immer this place exists in |