首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > yahoo-lifetype-api

yahoo-lifetype-api

  • 资源大小:65.37 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: ruby yahoo lifetype

资 源 简 介

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.getelements("//rsp/ClassList")[0].attribute("count").tos puts "列出類別中... 請稍後" doc.elements.each("//rsp/ClassList/Class") do |ele| puts "ID: #{ele.attributes["id"]} -- #{ele.get_elements("Title")[0].text}" end puts "列出類別結束" ```

文 件 列 表

yahoo-lifetype-api-0.3
doc
rdoc-style.css
lib
lifetype.rb
examples
list_classes.rb
.svn
format
doc
lib
examples
.svn
lifetype.rb
yahoo-lifetype-api-0.3
VIP VIP
0.204095s