Tag Archives: YQL

Picture perfect hacks using Flickr API

I am currently in Yahoo’s 5th Open hackday, which is happening in Bangalore and just finished my talk about using Flickr API for your hacks.

Continue reading »

Posted in API's/Mashup, Events/Conferences | Tagged , , , | 3 Comments

Using YQL in Dart

I was exploring Dart, and wanted to create a small project using it to compare it with JavaScript. I was searching for ideas and then I thought of using YQL in Dart, to see how easy or difficult it is.

After poking around a bit, I found that Dart supports making Rest calls using XMLHttpRequest object, similar to JavaScript. I quickly tried to make a YQL call using that object.

The following is the bulk of the code. It is exactly how you do it in plain JavaScript.


The only place I found a problem, was that Dart doesn’t have a URLEncoder yet. You have to emulate the URLEncoding done in JavaScript. I hope Dart gets its own URLEncoder soon.

Full source code

I have uploaded the full source code to github and added a couple of other examples as well. Check it out.

Posted in JavaScript/jQuery | Tagged , , | 10 Comments

URLEncoding in Dart

I was trying to use YQL from Dart and found that there is no way you can do URLEncoding using Dart.

I searched the dart:html, dart:uri and dart:io packages and found that none of them have the method to do URLEncoding.

I then posted about it in stackoverflow and then later found that, right now the only way to do URLEncoding is to emulate the encodeURL() function of JavaScript. Someone from Google has already done it. I just copied the file and placed inside my Dart project and then used the following line in my dart file.


Although it works right now, I would really like to see this as part of the dart:uri package. Let’s see if someone from the Dart team is listening to this.


Posted in JavaScript/jQuery | Tagged , , | 5 Comments

Yahoo HackU at IIT-Delhi

This past weekend, Yahoo conducted HackU (Hackday for university) at IIT – Delhi and I was part of the Technical crew that conducted the event.

In the event, I talked about Yahoo Query Language (YQL) and thought of sharing the slides here so that it could be useful for others as well.

Continue reading »

Posted in Events/Conferences | Tagged , , | 4 Comments

Code sample to access YQL from PHP

Just wrote quick some code sample to show how to access YQL (Yahoo Query Language) queries from PHP.

You can use the following code sample to fetch results from YQL from any standard PHP file. You would require the curl extension to be installed. If you are behind a proxy, uncomment the 3 lines and replace it with proper proxy values

If you have the Yahoo social SDK installed and you want to access results from YQL, then you can use the following code sample. Replace the text consumer_key and consumer_secret with correct values.

Update: You can also get code snippets for other languages apart from PHP.

Posted in API's/Mashup, Web Programming | Tagged , , | 2 Comments

Geo Mark WordPress Posts

Chris Heilmann recently released a greasemonkey script to Geo locate WordPress posts. The script uses the recently released Yahoo Placemaker API together with YQL. I was really impressed by the simplicity and power of YQL. I enhanced the script and ported it into a WordPress Plugin named Geo Mark, which can be used in any browser.

Geo Mark WordPress Plugin

Geo Mark will automatically locate Geo information in your WordPress posts using Yahoo Placemaker and YQL API’s. Once the Geo location is located, it will add this information as custom fields to the post. The information stored in the custom field can be displayed anywhere in the post using the build in get_post_meta() function. The Plugin also exposes template functions which can be used to generate GEO Microformats based on the location information found in the post.

Geo enabled RSS feeds

The Geo Mark Plugin also lets you to expose the location based information in RSS feeds. The Geo information stored in the custom field can be used to create Geo tags in the RSS feed. The Plugin supports the following Geo RSS formats as shown in the screenshot.

  • Simple (georss:point)
  • GML (gml:pos)
  • W3C (geo:lat)

Geo Mark WordPress Plugin Settings page

Why Geo marking posts is important

Adding Geo information to posts has lot of benefits. It enables data mining for location and also enables you to display information about the post on a map.

If you are still not convinced then checkout the posts by Chris.

PS: By the way, as recommended by Ozh I am going to submit this Plugin for the WordPress Plugin Competition. You can vote for this Plugin at the WordPress Plugin Competition blog.

Posted in Plugin Releases | Tagged , , , , , | 3 Comments