Hi all,
I am a dev on the OpenSocial team at MySpace up in Seattle. We've
recently been looking at extending our OS Activities
REST endpoint to include properties for ActivityStrea.ms so that we
may return the data in JSON and other formats. I've basically
used the suggestions from Ryan Boyd to come up with a schema. It'd be
great to hear what you guys think. The Activity
fields below would be additions to those specified in the 0.9 REST
spec here.
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/REST-API.html#XML_format_XSD
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="
http://ns.opensocial.org/2008/opensocial"
elementFormDefault="qualified"
targetNamespace="
http://ns.opensocial.org/2008/opensocial"
xmlns:xs="
http://www.w3.org/2001/XMLSchema">
<xs:complexType name="Activity">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded"
name="actors" type="tns:ActivityObject" />
<xs:element minOccurs="0" name="context"
type="tns:ActivityContext" />
<xs:element minOccurs="0" name="detail" type="xs:string" /
>
<xs:element minOccurs="0" maxOccurs="unbounded"
name="links" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="unbounded"
name="objects" type="tns:ActivityObject" />
<xs:element minOccurs="0" name="source"
type="tns:ActivityObject" />
<xs:element minOccurs="0" name="target"
type="tns:ActivityObject" />
<xs:element minOccurs="0" name="time" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="unbounded"
name="verbs" type="xs:string" />
</xs:choice>
</xs:complexType>
<xs:complexType name="ActivityObject">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded"
name="actors" type="tns:ActivityObject" />
<xs:element minOccurs="0" name="detail" type="xs:string" /
>
<xs:element minOccurs="0" maxOccurs="unbounded"
name="links" type="xs:string" />
<xs:element minOccurs="0" name="source"
type="tns:ActivityObject" />
<xs:element minOccurs="0" name="time" type="xs:string" />
<xs:element minOccurs="0" name="id" type="xs:string" />
<xs:element minOccurs="0" name="title" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="unbounded"
name="objectTypes" type="xs:string" />
</xs:choice>
</xs:complexType>
<xs:complexType name="ActivityContext">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded"
name="location" type="tns:Address" />
</xs:choice>
</xs:complexType>
</xs:schema>
Thanks,
Tosh