Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Some API updates

0 views
Skip to first unread message

Christopher Zorn

unread,
Mar 20, 2010, 10:15:06 AM3/20/10
to collecta-...@googlegroups.com
We have had several small bug fixes and changes, but I think I should announce two of these on this list.

First, we have added a twitter like json output to Collecta's REST API.  You can use the endpoint "/search.json" to see this new feature.

This is still in a testing phase but we would like feedback. It is not documented yet, but its similar to twitter's API.

Example :

http://api.collecta.com/search.json?q=collecta

Second, we now have "subid" support in the Collecta XMPP API. If you have multiple subscriptions you can keep up with them via the subscription id returned in the subscription response. It will be in the SHIM header of the pubsub event messages alongside the search query. You can then unsubscribe to just that subid.

This is defined in the pubsub extension protocol. http://xmpp.org/extensions/xep-0060.html#subscriber-subscribe

Thanks

zooldk

unread,
Mar 22, 2010, 10:18:59 AM3/22/10
to collecta developer
Hi Christopher,

First of all thanks for a great piece of software and api..
After the update I am having trouble fetching in JSON on the "old"
api.

Here is what I am trying to do:

McBuk:test slarsen$ wget http://api.collecta.com/search/?q=test&rpp=20&format=json

This fetches a file, but it is encoded as a atom feed instead of JSON.
Here is the top of the file:

?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns:opensearch="http://a9.com/-/spec/
opensearch/1.1/" xmlns="http://www.w3.org/2005/Atom">
<id>tag:api.collecta.com,2005:search/test</id>
<title>test - Collecta Search</title>
<link type="application/atom+xml" rel="self" href="http://
api.collecta.com/search?q=test&amp;since_id=1269267282617" />
<link type="application/atom+xml" rel="refresh" href="http://
api.collecta.com/search?q=test&amp;since_id=1269267282617" />
<link type="application/atom+xml" rel="after" href="http://
api.collecta.com/search?q=test&amp;after_id=1269266812575" />
<opensearch:totalResults>15</opensearch:totalResults>
<opensearch:itemsPerPage>15</opensearch:itemsPerPage>
<updated>2010-03-22T14:14:42Z</updated>

The new API works perfect in wget..

-Cheers!

/Steffen


On 20 Mar., 15:15, Christopher Zorn <christopher.z...@gmail.com>
wrote:

Nathan Zorn

unread,
Mar 22, 2010, 10:31:16 AM3/22/10
to collecta-...@googlegroups.com
You need to single quote the url.  Otherwise you background the wget process because of the ampersand. 


Hopefully that is it :)  I don't see single quotes in your email message.

To unsubscribe from this group, send email to collecta-developer+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Reply all
Reply to author
Forward
0 new messages