{"id":15234,"date":"2011-10-14T17:03:43","date_gmt":"2011-10-14T17:03:43","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/flickr-api\/"},"modified":"2014-07-24T15:23:31","modified_gmt":"2014-07-24T15:23:31","slug":"flickr-api","status":"publish","type":"plugin","link":"https:\/\/hat.wordpress.org\/plugins\/flickr-api\/","author":65781,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1.9","stable_tag":"0.1.9","tested":"3.9.40","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Flickr API","header_author":"Robert O'Rourke","header_description":"","assets_banners_color":"","last_updated":"2014-07-24 15:23:31","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/flickr-api\/","header_author_uri":"http:\/\/sanchothefat.com\/","rating":2.5,"author_block_rating":0,"active_installs":20,"downloads":9010,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":"1","2":0,"3":0,"4":"1","5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1096,4918,210,163,205],"plugin_category":[43,50,56],"plugin_contributors":[79639],"plugin_business_model":[],"class_list":["post-15234","plugin","type-plugin","status-publish","hentry","plugin_tags-flickr","plugin_tags-galleries","plugin_tags-gallery","plugin_tags-images","plugin_tags-photos","plugin_category-customization","plugin_category-media","plugin_category-social-and-sharing","plugin_contributors-sanchothefat","plugin_committers-sanchothefat","plugin_committers-tjnowell"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/flickr-api.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>The Flickr API plugin provides tools for displaying your flickr galleries, sets, photostream or favourites and more using a shortcode in posts and pages or as a widget. You can choose the size of image you want, whether it should be linked to another image size or back to flickr or not linked at all, how many images to show and more...<\/p>\n\n<p>There are some built in options for displaying your images as a simple slideshow or using the Galleria jquery plugin. Alternatively you can choose to style the output yourself and use your own javascript.<\/p>\n\n<p>For developers the plugin also gives you an easy method for calling and caching API responses both in PHP and javascript, and lots of useful tools for working with those responses.<\/p>\n\n<h4>Usage<\/h4>\n\n<p>You will need to get an API key from flickr to use this plugin. Under the 'You' menu look for 'Your Apps'. Click to get a key and then go to the media settings screen to add your API key and user name. The plugin will automatically determine your NSID so you never need to look this up.<\/p>\n\n<p>To use the plugin either generate a shortcode using the media upload\/insert button and selecting what you want to get or use the Flickr widget provided.<\/p>\n\n<h4>For developers<\/h4>\n\n<p>The plugin exposes its methods for your use in themes as template tags but the main one you may find useful is <code>flickr_api()<\/code>. This is a general function for calling any API method with the parameters you specify.<\/p>\n\n<pre><code>&lt;?php\n$response = json_decode( flickr_api( $method, $params, $cache ) );\n?&gt;\n<\/code><\/pre>\n\n<p>All responses are in JSON format so you will need to use <code>json_decode()<\/code> to use the response in PHP.<\/p>\n\n<pre><code>@param $method: (string)    This is the API method to call\n@param $params: (array)     Additional arguments to pass into the call such as user_id, photoset_id, gallery_id, text, tags etc...\n@param $cache : (bool)      Whether or not to cache the response based on the arguments passed in\n<\/code><\/pre>\n\n<p>You can use the API via javascript as well:<\/p>\n\n<pre><code>&lt;script&gt;\nvar photos = flickr_api( method, params, cache );\n&lt;\/script&gt;\n<\/code><\/pre>\n\n<p><strong>NSID lookup:<\/strong><\/p>\n\n<pre><code>&lt;?php\n$nsid = flickr_get_user_nsid( $username );\n?&gt;\n<\/code><\/pre>\n\n<p>Just pass in the Flickr username of the person to get the NSID for.<\/p>\n\n<h4>Filters\/Hooks<\/h4>\n\n<p><strong>flickr_galleria_themes<\/strong><\/p>\n\n<p>You can enable the choice of custom or purchased galleria themes by extending the themes array. Useful if you want your theme to have a choice of galleria theme beyond the 'classic' style.<\/p>\n\n<pre><code>&lt;?php\nadd_filter( 'flickr_galleria_themes', 'my_galleria_themes' );\nfunction my_galleria_themes( $themes ) {\n    $themes[ \/* full or relative url to theme js file *\/ ] = __( 'Theme Name' );\n    return $themes;\n}\n?&gt;\n<\/code><\/pre>\n\n<!--section=changelog-->\n<h4>0.1.8<\/h4>\n\n<ul>\n<li>fixed a bug when the username is different to the URL path_alias, links to photo pages were broken<\/li>\n<li>updated all call_user_func_array wrapper to remove pass by reference for PHP 5.4 compliance<\/li>\n<\/ul>\n\n<h4>0.1.7<\/h4>\n\n<ul>\n<li>fixed a bug with linking to different sized photos in the output. Thanks to Cliff Seal (http:\/\/logos-creative.com) for the bug report!<\/li>\n<\/ul>\n\n<h4>0.1.6<\/h4>\n\n<ul>\n<li>fixed bug with getting galleries, thanks to @strawbleu for the bug report<\/li>\n<li>added a settings field for the cache time. Defaults to 1 hour<\/li>\n<\/ul>\n\n<h4>0.1.5<\/h4>\n\n<ul>\n<li>improved loading time of JS galleries<\/li>\n<li>reduced chance of errors in galleria loading by better namespacing for localisation object<\/li>\n<\/ul>\n\n<h4>0.1.4<\/h4>\n\n<ul>\n<li>fixed conflict with jetpack shortcodes<\/li>\n<li>MAJOR UPDATE - change all your shortcodes to '[flickrapi ...]' and not '[flickr ...]'<\/li>\n<\/ul>\n\n<h4>0.1.3<\/h4>\n\n<ul>\n<li>fixed problem with no automatic height on JS based flickr galleries<\/li>\n<\/ul>\n\n<h4>0.1.2<\/h4>\n\n<ul>\n<li>fixed the 'fixed' shortcode output<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial alpha version<\/li>\n<\/ul>","raw_excerpt":"A comprehensive Flickr plugin that makes it easy to show off your images in style.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/15234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=15234"}],"author":[{"embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sanchothefat"}],"wp:attachment":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=15234"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=15234"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=15234"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=15234"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=15234"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=15234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}