Not only RSS, but JSON too

by jacob 6/23/2008 9:47:00 PM

You can't be a real internet site nowadays if you don't have an RSS feed. It helps to have iPhone version, but you definitely need an RSS feed. ZYB of course has both, and more.

All RSS feeds are available in JSON format also, so you can integrate them into your own website. Below you can download the code for a simple Google Gadget I threw together to show how you can access your data when and where you want it. How do you find a JSON feed? If there is an RSS feed then you can simply use .json instead of .rss and you will get the JS version. The JSON version generally contains more data that the RSS feed since we don't have to follow a standard.

Most of the feeds are currently only in alpha stage, which means that they are due to change without notice. The good thing with that is that you still have some influence about what goes into the feed.

Now to the code. Download it here:

You can find your lifestream feed at: http://feeds.zyb.com/ + [Your Profile Name] + /lifestream.json

As with any decent JSON feed it takes a callback parameter. In the code I use callback=fillLife and let the fillLife function write out the lifestream as I want to, which is basically taking the Title property and using it in a link which points to page specified in the Link property. 

Wait, does this mean that anyone can grab your data? No, you can specify your privacy settings in your account settings. So if the requesting user isn't allowed to see the data then it won't be put into the feed. So even though you can see your data in different format you won't be giving away more than you want to.

A good illustration of this is the JSON VCard data that you can access at http://feeds.zyb.com/ + [Your Profile Name] .json. If you have a look at Zybberman's data (http://feeds.zyb.com/zman.json) you can see what he has chosen to display publicly, which is basically just his name and profile picture.

zybgadget.zip (1.00 kb)

Tags: , ,

Related posts

Comments

7/27/2008 12:42:05 PM

achim

hi! Smile

you're offering gr8 service, but is there any possibility to import my zyb-calendar to google-calendar (not google into zyb)? any ics- or ical-export?

thanx for answering...

achim

achim de

7/27/2008 5:21:40 PM

jacob

I'm glad you like the service Smile

If you want to import your ZYB calendar into Google simply have your Google calendar import an iCalendar (.ics) from http://feeds.zyb.com/[your profile name]/calendar.ics.

Be aware that if your calendar events are not marked as public Google will not be able to import them.

We are working on a key system, which will be part of the next release.

jacob dk

12/11/2008 2:13:18 PM

Jbeer

Hi!

Great and interesting blog Laughing. Im learning too much about ZYB.

Now, Im working in a Java application that uses ZYB information. One of the points is to get the contacts info of a user (with his private key). Im using JSON for that. I can get the most of the info, but I have problems with the pictures. How can I process a .full picture?

Example:
http://zyb.com/userID/pictures/342399.full

Thanks for any help or advice.

Jbeer es

12/12/2008 10:43:59 AM

Mads

Hi Jbeer,

That's awesome that you use the JSON api for your app. The .full extension is actually just a jpg image, so you can process it just as you would with a .jpg.

Mads dk

12/17/2008 4:28:37 PM

Jbeer

Thanks for the reply Laughing, I realized that it was not the problem...

I wanted to know something, here is the situation.

I have a friend added to Zyb, we can call him "Bob", he has a picture in his profile. When I call the JSON "contacts.json" using my user and private key, In the "row" where "Bob" is, I can find the "url" of his picture as "bobID/pictures/242343.full". As I can see, I can not display that picture in the browser (either in my app).
The question is:
Is there any way I can get his picture? Has he have to be logged in Zyb and online to do it? (because I think that I have get Bob`s picture before, doing some testings).

Another question...
Is there any email where I can write my questions about all this? Because I dont want to overload this blog with my issues.

Thanks for all!!!

Jbeer es

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading





Powered by BlogEngine.NET

The mission

At ZYB the data you upload is your data. This blog site will show you how you can request your ZYB data in various formats to integrate with your own site or application.

Disclaimer

The posts here are targeted at developers. The advice or suggestions here can be used at your own responsibility and ZYB cannot assume responsibility for any adverse effects to your own system or your clients' systems arising from the full or partial use of the posted code.

At present all code samples are in alpha version and may change without notice.