SEO. JSONLD. Action
(SEO v0.3.0-rc.0)
View Source
An action performed by a direct agent and indirect participants upon a direct object. Optionally happens at a location with the help of an inanimate instrument. The execution of the action may produce a result. Specific action sub-type documentation specifies the exact expectation of each argument/role.
See also blog post and Actions overview document.
Helper for building a Schema.org Action JSON-LD structure.
Action inputs and outputs
This type descends from SEO.JSONLD.Action, so build/1 recognizes
two pseudo-fields that expand into Schema.org's hyphenated
<property>-input / <property>-output shorthand (see
Schema.org Actions, Part 4):
:inputs— a keyword list of{property, constraints}entries:outputs— likewise, for<property>-outputannotations
Constraints are passed to SEO.JSONLD.Actions.input_spec/1.
Summary
Types
A JSON-LD map ready to be nested or rendered. String-keyed, always
includes "@type" set to "Action", plus any camelCased
field keys the caller provided (see build/1). "@context" is added
at render time by SEO.JSONLD.meta/1 on the top-level node only.
Functions
Build a Action JSON-LD map.
Types
@type attrs() :: %{ optional(:action_process) => SEO.JSONLD.HowTo.t() | map(), optional(:action_status) => :active_action_status | :completed_action_status | :failed_action_status | :potential_action_status, optional(:agent) => SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(), optional(:end_time) => DateTime.t() | NaiveDateTime.t() | String.t() | Time.t(), optional(:error) => SEO.JSONLD.Thing.t() | map(), optional(:instrument) => SEO.JSONLD.Thing.t() | map(), optional(:location) => String.t() | SEO.JSONLD.PostalAddress.t() | map() | SEO.JSONLD.VirtualLocation.t() | SEO.JSONLD.Place.t(), optional(:object) => SEO.JSONLD.Thing.t() | map(), optional(:participant) => SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(), optional(:provider) => SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(), optional(:result) => SEO.JSONLD.Thing.t() | map(), optional(:start_time) => DateTime.t() | NaiveDateTime.t() | String.t() | Time.t(), optional(:target) => URI.t() | String.t() | SEO.JSONLD.EntryPoint.t() | map(), optional(:additional_type) => String.t() | URI.t(), optional(:alternate_name) => String.t(), optional(:description) => SEO.JSONLD.TextObject.t() | map() | String.t(), optional(:disambiguating_description) => String.t(), optional(:identifier) => String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(), optional(:image) => URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(), optional(:main_entity_of_page) => SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(), optional(:name) => String.t(), optional(:owner) => SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(), optional(:potential_action) => t() | map(), optional(:same_as) => URI.t() | String.t(), optional(:subject_of) => SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(), optional(:url) => URI.t() | String.t() } | [ action_process: SEO.JSONLD.HowTo.t() | map(), action_status: :active_action_status | :completed_action_status | :failed_action_status | :potential_action_status, agent: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(), end_time: DateTime.t() | NaiveDateTime.t() | String.t() | Time.t(), error: SEO.JSONLD.Thing.t() | map(), instrument: SEO.JSONLD.Thing.t() | map(), location: String.t() | SEO.JSONLD.PostalAddress.t() | map() | SEO.JSONLD.VirtualLocation.t() | SEO.JSONLD.Place.t(), object: SEO.JSONLD.Thing.t() | map(), participant: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(), provider: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(), result: SEO.JSONLD.Thing.t() | map(), start_time: DateTime.t() | NaiveDateTime.t() | String.t() | Time.t(), target: URI.t() | String.t() | SEO.JSONLD.EntryPoint.t() | map(), additional_type: String.t() | URI.t(), alternate_name: String.t(), description: SEO.JSONLD.TextObject.t() | map() | String.t(), disambiguating_description: String.t(), identifier: String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(), image: URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(), main_entity_of_page: SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(), name: String.t(), owner: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(), potential_action: t() | map(), same_as: URI.t() | String.t(), subject_of: SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(), url: URI.t() | String.t() ]
A JSON-LD map ready to be nested or rendered. String-keyed, always
includes "@type" set to "Action", plus any camelCased
field keys the caller provided (see build/1). "@context" is added
at render time by SEO.JSONLD.meta/1 on the top-level node only.
Functions
Build a Action JSON-LD map.
Fields
:action_process- Description of the process by which the action was performed.:action_status- Indicates the current disposition of the Action. One of::active_action_status,:completed_action_status,:failed_action_status,:potential_action_status.:agent- The direct performer or driver of the action (animate or inanimate). E.g. John wrote a book.:end_time- The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to December. For media, including audio and video, it's the time offset of the end of a clip within a larger file.
Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.
:error- For failed actions, more information on the cause of the failure. Consider using the Error type.:instrument- The object that helped the agent perform the action. E.g. John wrote a book with a pen.:location- The location of, for example, where an event is happening, where an organization is located, or where an action takes place.:object- The object upon which the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn't). E.g. John read a book.:participant- Other co-agents that participated in the action indirectly. E.g. John wrote a book with Steve.:provider- The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.:result- The result produced in the action. E.g. John wrote a book.:start_time- The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to December. For media, including audio and video, it's the time offset of the start of a clip within a larger file.
Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.
:target- Indicates a target EntryPoint, or url, for an Action.
Inherited properties
Additional properties are available through the inheritance chain. See each ancestor's docs for its properties: