Proposal: Allow using Activity Templates for messages

0 views
Skip to first unread message

Evan Gilbert

unread,
Apr 18, 2008, 2:02:17 PM4/18/08
to opensocial-an...@googlegroups.com
Currently, the spec only officially supports templates in activities. Many containers have expressed that we need templates for messages as well (and I think some already support this).

See http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Activity.html for details on Activity Templates

Specific proposal:
- Rename Activity Templates to Message Templates
- Add message_id parameter to requestSendMessage(). We probably want to add an optional parameter bag param for future compatibility and to not break existing users

Evan

P.S. Apologies in advance for the upcoming stream of proposals - going through old discussion notes, realized that a lot of items hadn't been proposed as spec changes.

Evan Gilbert

unread,
Apr 18, 2008, 3:23:49 PM4/18/08
to opensocial-an...@googlegroups.com
One more part of a specific implementation:
- Deprecate opensocial.Activity.MediaItem in favor of opensocial.MediaItem. Keep opensocial.ActivityMediaItem = opensocial.MediaItem for backwards compatibility for now.

Cassie

unread,
Apr 21, 2008, 6:55:43 AM4/21/08
to opensocial-an...@googlegroups.com
On Fri, Apr 18, 2008 at 9:23 PM, Evan Gilbert <uid...@google.com> wrote:
One more part of a specific implementation:
- Deprecate opensocial.Activity.MediaItem in favor of opensocial.MediaItem. Keep opensocial.ActivityMediaItem = opensocial.MediaItem for backwards compatibility for now.

Note: this backwards compatibility isn't needed because developers don't directly use opensocial.Activity.MediaItem. If they need to make a new one they just use opensocial.newActivityMediaItem. (Which is important because many containers are actually creating subclasses of the MediaItem class.)

Oh, and you probably also wanted to add that opensocial.newActivityMediaItem changes to opensocial.newMediaItem.

Thanks.

- Cassie

 

Cassie

unread,
Apr 21, 2008, 6:59:29 AM4/21/08
to opensocial-an...@googlegroups.com
On Fri, Apr 18, 2008 at 8:02 PM, Evan Gilbert <uid...@google.com> wrote:
Currently, the spec only officially supports templates in activities. Many containers have expressed that we need templates for messages as well (and I think some already support this).

See http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Activity.html for details on Activity Templates

Specific proposal:
- Rename Activity Templates to Message Templates
- Add message_id parameter to requestSendMessage(). We probably want to add an optional parameter bag param for future compatibility and to not break existing users

You probably meant to instead recommend that we add message id as a field on the message object which is then an accepted value into the opt_params variable here:

 * @param {Map.&lt;opensocial.Message.Field, Object&gt;} opt_params
* Any other fields that should be set on the message object;
* all of the defined
* <a href="opensocial.Message.Field.html">Field</a>s
* are supported
*
* @return {opensocial.Message} The new
* <a href="opensocial.Message.html">message</a> object
* @member opensocial
*/
opensocial.newMessage = function(body, opt_params) {};

And to clarify that further, it is probably even better to just introduce titleId and bodyId in the same way that we did for activities.. because messages have both parts.

Thanks.

- Cassie
 

Marco Ensing

unread,
Apr 25, 2008, 6:13:20 PM4/25/08
to OpenSocial and Gadgets Specification Discussion
yes: +1

On Apr 21, 3:59 am, Cassie <d...@google.com> wrote:
> On Fri, Apr 18, 2008 at 8:02 PM, Evan Gilbert <uid...@google.com> wrote:
> > Currently, the spec only officially supports templates in activities. Many
> > containers have expressed that we need templates for messages as well (and I
> > think some already support this).
>
> > See
> >http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial....details on Activity Templates
> > proposed as spec changes.- Hide quoted text -
>
> - Show quoted text -

mnew...@myspace.com

unread,
Apr 25, 2008, 6:40:16 PM4/25/08
to OpenSocial and Gadgets Specification Discussion
+1

On Apr 25, 3:13 pm, Marco Ensing <ens...@gmail.com> wrote:
> yes: +1
>
> On Apr 21, 3:59 am, Cassie <d...@google.com> wrote:
>
> > On Fri, Apr 18, 2008 at 8:02 PM, Evan Gilbert <uid...@google.com> wrote:
> > > Currently, the spec only officially supports templates in activities. Many
> > > containers have expressed that we need templates for messages as well (and I
> > > think some already support this).
>
> > > See
> > >http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial....on Activity Templates

John Panzer

unread,
Apr 25, 2008, 6:51:59 PM4/25/08
to opensocial-an...@googlegroups.com
+1

Paul

unread,
Apr 25, 2008, 10:08:31 PM4/25/08
to OpenSocial and Gadgets Specification Discussion
+1

Althouugh I like the names TitleTemplate and BodyTemplate. +1 in
support of moving mediaitem out of Activity as well.

~Paul

Cassie

unread,
Apr 27, 2008, 6:55:52 PM4/27/08
to opensocial-an...@googlegroups.com
Okay, so:

1. two new fields to hold message templates will be added to the Message object.
2. opensocial.Activity.MediaItem will be moved to opensocial.MediaItem and opensocial.newActivityMediaItem() will be renamed opensocial.newMediaItem()
3. in the docs, activity templates will be renamed message templates and their description will be taken out of the activity.js file.

This thread has 5 positive votes so it is approved.
I think I got the spirit of this thread in the changes listed above but please let me know if I got anything wrong.

Thanks!

- Cassie
Reply all
Reply to author
Forward
0 new messages