commit 42b08badb951df31f72c753fe0b7d059aab3ef39 Author: Marcus Kammer Date: Wed Oct 2 15:10:32 2024 +0200 Init commit diff --git a/src/as2/actor.lisp b/src/as2/actor.lisp new file mode 100644 index 0000000..3771b02 --- /dev/null +++ b/src/as2/actor.lisp @@ -0,0 +1,33 @@ +;;;; -*- mode: common-lisp; coding: utf-8; -*- + +(in-package :ml-as2) + +(defclass application () + ((type :initarg :type + :initform "Application" + :accessor actor-type + :documentation "Any kind of software."))) + +(defclass group () + ((type :initarg :type + :initform "Group" + :accessor actor-type + :documentation "Any kind of software."))) + +(defclass organization () + ((type :initarg :type + :initform "Organization" + :accessor actor-type + :documentation "Any kind of software."))) + +(defclass person () + ((type :initarg :type + :initform "Person" + :accessor actor-type + :documentation "Any kind of software."))) + +(defclass service () + ((type :initarg :type + :initform "Service" + :accessor actor-type + :documentation "Any kind of software."))) diff --git a/src/as2/base.lisp b/src/as2/base.lisp new file mode 100644 index 0000000..b3dbabe --- /dev/null +++ b/src/as2/base.lisp @@ -0,0 +1,102 @@ +;;;; -*- mode: common-lisp; coding: utf-8; -*- + +(defpackage :ml-as2 + (:use :cl) + (:export #:object)) + +(in-package :ml-as2) + +(defclass object () + ((id :initarg :id + :accessor object-id + :documentation "The Object is the primary base type for the Activity Streams vocabulary.") + (type :initarg :type + :accessor object-type + :documentation "Identifies the Object or Link type.") + (attachment :initarg :attachment + :accessor object-attachment + :documentation "Identifies a resource attached or related to an object that potentially requires special handling.") + (attributed-to :initarg :attributed-to + :accessor object-attributed-to + :documentation "Identifies one or more entities to which this object is attributed.") + (audience :initarg :audience + :accessor object-audience + :documentation "Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.") + (content :initarg :content + :accessor object-content + :documentation "The content or textual representation of the Object encoded as a JSON string.") + (context :initarg :context + :accessor object-context + :documentation "Identifies the context within which the object exists or an activity was performed.") + (content-map :initarg :content-map + :accessor object-content-map + :documentation "The content or textual representation of the Object encoded as a language map.") + (name :initarg :name + :accessor object-name + :documentation "A simple, human-readable, plain-text name for the object.") + (name-map :initarg :name-map + :accessor object-name-map + :documentation "A language map of human-readable, plain-text names for the object.") + (end-time :initarg :end-time + :accessor object-end-time + :documentation "The date and time describing the actual or expected ending time of the object.") + (generator :initarg :generator + :accessor object-generator + :documentation "Identifies the entity that generated the object.") + (icon :initarg :icon + :accessor object-icon + :documentation "Indicates an entity that describes an icon for this object.") + (image :initarg :image + :accessor object-image + :documentation "Indicates an entity that describes an image for this object.") + (in-reply-to :initarg :in-reply-to + :accessor object-in-reply-to + :documentation "Indicates one or more entities for which this object is considered a response.") + (location :initarg :location + :accessor object-location + :documentation "Indicates one or more physical or logical locations associated with the object.") + (preview :initarg :preview + :accessor object-preview + :documentation "Identifies an entity that provides a preview of this object.") + (published :initarg :published + :accessor object-published + :documentation "The date and time at which the object was published.") + (replies :initarg :replies + :accessor object-replies + :documentation "Identifies a Collection containing objects considered to be responses to this object.") + (start-time :initarg :start-time + :accessor object-start-time + :documentation "The date and time describing the actual or expected starting time of the object.") + (summary :initarg :summary + :accessor object-summary + :documentation "A natural language summarization of the object encoded as HTML.") + (summary-map :initarg :summary-map + :accessor object-summary-map + :documentation "A language map of natural language summarizations of the object encoded as HTML.") + (tag :initarg :tag + :accessor object-tag + :documentation "One or more \"tags\" that have been associated with an objects. A tag can be any kind of Object.") + (updated :initarg :updated + :accessor object-updated + :documentation "The date and time at which the object was updated.") + (url :initarg :url + :accessor object-url + :documentation "Identifies one or more links to representations of the object.") + (to :initarg :to + :accessor object-to + :documentation "Identifies an entity considered to be part of the public primary audience of an Object.") + (bto :initarg :bto + :accessor object-bto + :documentation "Identifies an Object that is part of the private primary audience of this Object.") + (cc :initarg :cc + :accessor object-cc + :documentation "Identifies an Object that is part of the public secondary audience of this Object.") + (bcc :initarg :bcc + :accessor object-bcc + :documentation "Identifies one or more Objects that are part of the private secondary audience of this Object.") + (media-type :initarg :media-type + :accessor object-media-type + :documentation "When used on a Link, identifies the MIME media type of the referenced resource.") + (duration :initarg :duration + :accessor object-duration + :documentation "When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object's approximate duration.")))