jQuery $.getJSON - How do I parse a flickr.photos.search REST API call?

后端 未结 4 913
借酒劲吻你
借酒劲吻你 2021-01-31 06:15

Trying to adapt the $.getJSON Flickr example:

$.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jso         


        
4条回答
  •  醉酒成梦
    2021-01-31 06:55

    The jQuery API documentation for jQuery.getJSON() has a helpful example here: http://api.jquery.com/jquery.getjson/

    The documentation provides a complete file as an example of how to parse the API call; it loads the four most recent pictures of Mount Rainier from the Flickr JSONP API. I'll reprint the file here as additional context that might be helpful, particularly for those new to using API's.

    
    
    
      
      jQuery.getJSON demo
      
      
    
    
    
    

提交回复
热议问题