sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Implementation of objects
Implementation of objects inherits from Activitypub.Object.object_
and here we provide a way to dereference objects. To dereference an object, you need an actor and its public/private key to sign http queries. An Http_t
module is used by Make
to create a module of type T
which can be used to create and dereference objects with the actor of the Http_t
module in parameter of Make
.
module type Http_t = sig ... end
Performing HTTP queries as a given actor.
type dereferencer =
Iri.t ->
(Rdf.Graph.graph * Iri.t option, Activitypub.E.error) Stdlib.result Lwt.t
A dereferencer
takes an IRI and returns the result as a RDF graph and an optional IRI (for queries creating remote objects, like POST queries).
module type T = sig ... end
The type of modules to create, dereference and query objects as a given actor.
val note :
?add:(Rdf.Graph.graph -> Rdf.Term.term -> unit) ->
?content_map:string Activitypub.Smap.t ->
string ->
Rdf.Graph.graph * Rdf.Term.term
note content
creates a new graph, with empty name, of type Note, with the given content. An optional content_map
can be passed to specify language-specific contents. The function returns the graph and the subject sub
(a blank node) corresponding to the note id. The add
optional argument is called on g
and sub
before returning.
val link :
?g:Rdf.Graph.graph ->
?root:Rdf.Term.term ->
?height:int ->
?hreflang:string ->
?media_type:Ldp.Ct.mime ->
?name:string ->
?rel:string list ->
?type_:Iri.t ->
?width:int ->
Iri.t ->
Activitypub.Object.link
link iri
creates a new Activitypub.Object.link
from the given parameters.
type attachment = [
| `Iri of Iri.t
| `Link of Activitypub.Types.link
| `Obj of Activitypub.Types.object_
]
val add_attachment : Rdf.Graph.graph -> Rdf.Term.term -> attachment -> unit
add_attachment g sub a
adds a
as an attachment to sub
in graph g
, eventually merging parts of a
's triples into g
.
val document :
(module T) ->
?g:Rdf.Graph.graph ->
?root:Rdf.Term.term ->
?height:int ->
?media_type:Ldp.Ct.t ->
?name:string ->
?type_:Iri.t ->
?width:int ->
Iri.t ->
Activitypub.Types.document
document (module O) url
creates a new object O.o
from the given parameters. If no graph g
is provided, a new one with an empty named is used. If no root
node is provided, a blank node is used as id for the object. Default type of the object is Document but another one can be specified with typ
argument.