O'Reilly logo

Programming Social Applications by Jonathan LeBlanc

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required