callback param issue

75 views
Skip to first unread message

Tyler Wilson

unread,
Oct 6, 2011, 6:02:06 PM10/6/11
to Raplet developer discussion list
Good day,

I am experimenting with building a Raplet with Node.js. I am new to
both, so I admit this may be a Node.js 'feature'. But I thought I
should throw it out there.

When I attempt to perform the install of the Raplet in my account, I
am getting the following metadata request:

/raplet?show=metadata&callback=_jqjsp&_1317935031183=

Is this what we expect the callback to look like? I use the standard
url parsing code, and it of course splits this into parts that do not
function for me.

Anybody else see this behavior?

Thanks,
Tyler

Conrad Irwin

unread,
Oct 6, 2011, 6:21:31 PM10/6/11
to raple...@googlegroups.com
Hi Tyler,

Thanks for getting in touch, and thanks for building a Raplet :).

At the moment we're sending a callback parameter (callback=_jqjsp) and a separate cache-busting parameter (_1317935031183=).

The response should therefore look like:

    _jqjsp({"html":"<p>test</p>","js":"alert('hi');"});

Is that not working for you?

At the moment we use jQuery.jsonp (http://code.google.com/p/jquery-jsonp/) to make Raplet requests if you'd like to set up a test for this yourself. As this might change in the future, it's better to use the value of the callback parameter to construct your response, even though it's currently always the same!

Conrad

P.S. Can you tell us what your raplet's going to do?


--
You received this message because you are subscribed to the Google
Groups "Raplet developer discussion list" group.
To post to this group, send email to raple...@googlegroups.com
To unsubscribe from this group, send email to
raplet-dev+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/raplet-dev?hl=en

Tyler Wilson

unread,
Oct 6, 2011, 8:09:18 PM10/6/11
to Raplet developer discussion list
Conrad,

Thank you for the quick response. Looks like my issue was not
returning all the required fields on the metadata query. FYI, the
'small_icon_url' is listed as required (not marked as optional) in the
documentation, but the raplet runs okay without it.

Also, it appears that the callback format varies between the metadata
call and the 'regular' call. In the metadata case, it is as you say
'_jqjsp' with an additional cache-killer. In the regular query it is
as in the examples 'jsonp######'. So your example above/below is not
exactly accurate.

Thanks,
Tyler

PS I am experimenting now with Node.js to learn the system, but
eventually it will go into a Ruby on Rails CRM web site, so we can
show contact data for senders in our DB, etc.

Conrad Irwin

unread,
Oct 6, 2011, 8:29:02 PM10/6/11
to raple...@googlegroups.com
On Thu, Oct 6, 2011 at 5:09 PM, Tyler Wilson <ty...@tylerlabs.com> wrote:
> Conrad,
>
> Thank you for the quick response. Looks like my issue was not
> returning all the required fields on the metadata query. FYI, the
> 'small_icon_url' is listed as required (not marked as optional) in the
> documentation, but the raplet runs okay without it.

Those are not marked optional to encourage people who want to share
raplets to add some prettiness :). I thought it was `technically`
possible to omit all the fields of the meta-data, could you let me
know which ones broke it for you, and I'll fix it for the next guy.

>
> PS I am experimenting now with Node.js to learn the system, but
> eventually it will go into a Ruby on Rails CRM web site, so we can
> show contact data for senders in our DB, etc.

Cool — good luck!

Conrad

Reply all
Reply to author
Forward
0 new messages