@activitypods/events 中文文档教程
Events App
用于处理事件的 ActivityPods 应用程序,包括邀请和注册。
Services
Dependencies
Containers
/events
with the events created by the user or to whom he has been invited
Collections
附加到所有事件:
/invitees
with the list of actors who have been invited to the event/inviters
with the list of actors who are allowed to invite to the event/attendees
with the list of actors who are attending the event (including the organizer)
Ontology
- The ActivityStreams ontology should be used to describe the events.
- The Dublin Core Metadata ontology's
creator
predicate is used to find who is the creator of the event.
Handled activities
Invite to event
{
"type": "Invite",
"object": {
"type": "Event"
}
}
Emitter's side effects
- The recipients are added to the
/invitees
collection. - The recipients are added to a WebACL group which can view the event and the
/attendees
collection.
Recipients' side effects
- The event is cached in the recipients' PODs
- Notifications are sent to the recipients
Offer to invite to event
{
"type": "Offer",
"object": {
"type": "Invite",
"object": {
"type": "Event"
}
}
}
Emitter's side effects
- If the offer is sent by the event organizer, it means he wants to give invitees the right to share this event
- The recipients are added to the
/inviters
collection. - The recipients are added to a WebACL group which can view the
/invitees
collection.
Recipients' side effects
- If the offer is sent to the organizer, it means we are an inviter and want him to invite one of our contacts
- The organizer sends an invitation to the actor specified by the inviter
- The inviter is informed his invitation has been accepted (via an Accept activity)
Join event
{
"type": "Join",
"object": {
"type": "Event"
}
}
Emitter's side effects
- None
Recipients' side effects
- The recipients are added to the
/attendees
collection - A notification is sent to the organizer
Leave event
{
"type": "Leave",
"object": {
"type": "Event"
}
}
Emitter's side effects
- None
Recipients' side effects
- The recipients are removed from the
/attendees
collection - A notification is sent to the organizer
Events App
An ActivityPods app to handle events, with invitation and registration.
Services
Dependencies
Containers
/events
with the events created by the user or to whom he has been invited
Collections
Attached to all events:
/invitees
with the list of actors who have been invited to the event/inviters
with the list of actors who are allowed to invite to the event/attendees
with the list of actors who are attending the event (including the organizer)
Ontology
- The ActivityStreams ontology should be used to describe the events.
- The Dublin Core Metadata ontology's
creator
predicate is used to find who is the creator of the event.
Handled activities
Invite to event
{
"type": "Invite",
"object": {
"type": "Event"
}
}
Emitter's side effects
- The recipients are added to the
/invitees
collection. - The recipients are added to a WebACL group which can view the event and the
/attendees
collection.
Recipients' side effects
- The event is cached in the recipients' PODs
- Notifications are sent to the recipients
Offer to invite to event
{
"type": "Offer",
"object": {
"type": "Invite",
"object": {
"type": "Event"
}
}
}
Emitter's side effects
- If the offer is sent by the event organizer, it means he wants to give invitees the right to share this event
- The recipients are added to the
/inviters
collection. - The recipients are added to a WebACL group which can view the
/invitees
collection.
Recipients' side effects
- If the offer is sent to the organizer, it means we are an inviter and want him to invite one of our contacts
- The organizer sends an invitation to the actor specified by the inviter
- The inviter is informed his invitation has been accepted (via an Accept activity)
Join event
{
"type": "Join",
"object": {
"type": "Event"
}
}
Emitter's side effects
- None
Recipients' side effects
- The recipients are added to the
/attendees
collection - A notification is sent to the organizer
Leave event
{
"type": "Leave",
"object": {
"type": "Event"
}
}
Emitter's side effects
- None
Recipients' side effects
- The recipients are removed from the
/attendees
collection - A notification is sent to the organizer