My favorites | Sign in
Project Logo
                
Code license: New BSD License
Labels: ruby, yahoo, lifetype
Show all Featured downloads:
yahoo-lifetype-api-0.3.rar
People details
Project owners:
  zusocfc

Introduction

This API is for http://tw.local.yahoo.com API details: http://tw.developer.yahoo.com/lifestyle_api.html

Example (Traditional Chinese)

#!/usr/bin/env ruby
APPID = "NhYX9XjV34FPxdq7zD8T7wwc4QGI5VWu_48NHh03zbPYUfPpcWrpZzhcVDKFQsH9dQ--"
require 'lifetype'
require 'rexml/document'
include REXML

puts "獲取生活+類別中... 請稍後"
doc = Document.new(LifeType::Class.new(APPID).listClasses)
puts "獲取類別結束"
puts "類別總數: " + doc.get_elements("//rsp/ClassList")[0].attribute("count").to_s
puts "列出類別中... 請稍後"
doc.elements.each("//rsp/ClassList/Class") do |ele|
  puts "ID: #{ele.attributes["id"]} -- #{ele.get_elements("Title")[0].text}"
end
puts "列出類別結束"








Hosted by Google Code