ruby cookbookã«è¼ã£ã¦ãã®ã§ä½¿ã£ã¦è¦ããã¨ã«ãã¾ããã 以ä¸ã¯ã½ã¼ã¹.ä¸é¨å¤æ´ãã¦ããã¾ãï¼æååæä½ã®é¨å + ã®é¨åãã<< ã«å¤æ´ãï¼ require 'open-uri' require 'rexml/document' require 'cgi' FLICKR_API_KEY = 'your api key' def flickr_call(method_name, arg_map={}.freeze) args = arg_map.collect {|k,v| CGI.escape(k) << '=' << CGI.escape(v)}.join('&') url = "http://www.flickr.com/services/rest/?api_key=%s&method=%s&%s" % [FLICKR_API_KEY, method_name, args]
éæã®å¤ã«åºçºãã¦ãæ¥æã®å¤ã¾ã§ãã¹ãã¼ã«ãã£ã¦ãã¾ããã ä»å¹´ã®åãã¹ãã§ãã å®å®¿ã§ããã®ã§ããããç°å¢ãªã©ãªãæ´æ°ã¯ãä¼ã¿ã§ããã ããã宿ã«ãããç°å¢ããã£ãã¨ãã¦ãããã¶ãæ´æ°ã§ããªãã£ãã¨æãã¾ãï¼ï¼¾ï¼¾ï¼ ä»åã®ã¹ãã¼æ è¡ã¯ãé常ã«ãã¼ãã§ãããåºç¤ä½åãªãããã§ãï¼ï¼ï¼ï¼ã ãã¦ãã¾ã ã¾ã ç²ãã®æ®ãä½ã«éããã£ã¦ãæ´æ°éå§ã§ãã ä»æ¥ã¯ãrubyãããFlickr APIããå©ç¨ãã¦ç»åãæ¤ç´¢ããæ¹æ³(ã³ã¼ã)ãç´¹ä»ãã¾ãã ãFlickr APIãã«ã¯ãRESTå½¢å¼ã§å©ç¨ããæ¹æ³ã¨xml-rpcã§å©ç¨ããæ¹æ³ã®2éãã®å©ç¨æ¹æ³ãæä¾ããã¦ãã¾ãã ä»åã¯ãRESTãå©ç¨ããæ¹æ³ãã¤ãã£ã¦ç»åæ¤ç´¢ã«ææ¦ã§ãã ãFlickr APIããå©ç¨ããããã«ã¯ãFlickrã®ã¢ã«ã¦ã³ããå¿ è¦ã§ãããæã¡ã§ãªãæ¹ã¯ããã¡ãããã¢ã«ã¦ã³ããåå¾ãã¦ãã ããã ã¢ã«ã¦ã³ããåå¾ãããããS
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}