Object Types

Within each object construct is an objectType string value. This defines the type of data that is being presented in the object, which helps a consumer determine what to do with the data and how to process it. The Activity Streams specification includes several object types that you can insert as the value of the objectType parameter.

Objects types may be referenced using their type name (e.g., article, review, video, etc.) or by the absolute URI to the schema, which also uses the type name as the last part of the URI: http://activitystrea.ms/schema/1.0/type.

So, for instance, an object with the type of person may use either of the following strings for the verb:

There are many different type categories available in the specification. Let’s look at them now.

General object types

The Activity Streams specification defines a number of basic types, as shown in Table 10-10. These general types make up the vast majority of the object types that you will be using or consuming when working with an activity.

Table 10-10. General object types

Type

Description

article

The object is an article such as a news article, blog entry, or publication. Objects of this type usually consist of paragraphs of text with optional images and links.

audio

The content of the object is some sort of audio content.

badge

Represents a badge or award granted to the object.

bookmark

The object is a pointer to some URL, usually a web page. You can think of this in the same ...

Get Programming Social Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.