2009-07-09

Get BLogger Labels



$label_url = "http://www.blogger.com/feeds/#{$userID}/blogs/#{$blogID}?alt=json-in-script&callback=listLabels"

class BlogLabels

def get_labels
result = URLFetch.get($label_url)
result_headless = result.gsub("listLabels(",'')
pure_result = result_headless.gsub(");",'')
JSON.parse(pure_result)['entry']['category']
end

end

@labels = BlogLabels.new
@labels.get_labels.each do |cont|
puts cont['term']
end

JSON was not works.
Change to use YAML.

response = URLFetch.get($label_url)
result = response.to_s
result_headless = result.gsub("listLabels(",'')
pure_result = result_headless.gsub(");",'')
json_to_yaml = YAML::load(pure_result)['entry']['category']

0 件のコメント:

BCM4321 on Latitude D430

At kernel 3 find wireless hardware lspci | grep -i wireless  check using current kernel module with PCI bus address lspci -vv -s 0c:...