The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
libyws

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Premshree Pillai

Posts: 478
Nickname: premshree
Registered: Mar, 2004

Premshree Pillai is a Ruby evangelist, working with Yahoo!.
libyws Posted: Jul 7, 2005 11:32 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Premshree Pillai.
Original Post: libyws
Feed Title: Premshree's Personal Weblog
Feed URL: http://premshree.livejournal.com/data/rss
Feed Description: Premshree's Weblog
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Premshree Pillai
Latest Posts From Premshree's Personal Weblog

Advertisement

Now the we have MyWeb 2.0 (which by the way, is quite cool. I could imagine doing tons of things with it.), it’s time for an update to the Ruby interface to YWSyahoo-ruby 0.2.

Do cool stuff:

require 'yahoo-ruby.rb'
obj = RelatedTags.new('yahoo-ruby', 'ruby', '', '', '', 1)
obj.parse_results.each { |ele|
        ele.each { |k,v|
                print "#{k} => #{v}\n" if v!=nil
        }
}

# Output
Tag => rails
Frequency => 23
Date => 1120011775

The code’s been lying around for some time (observe the date—June 29), but I didn’t release it assuming there’d be an official release or something. Oh well.

I think I’m gonna make major changes to the code. It works well, mind you. However, I’m not satisfied with the design. Ideally I’d like to simply parse the XSD, and spit out a hash. That’d mean each time a new API comes out, I just have to add another schema location to the existing bunch. And I’m not terribly sure I can do that with REXML. Maybe I’m wrong, though, because, honestly, I haven’s dug into it very deep. Oh yeah, I’m gonna move the project to RubyForge.

Read: libyws

Topic: ‘Agile development seems natural’ Previous Topic   Next Topic Topic: Problems with Directories

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use