{"id":33389,"date":"2014-12-15T20:45:38","date_gmt":"2014-12-15T20:45:38","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/instagram-reaper\/"},"modified":"2014-12-16T21:44:38","modified_gmt":"2014-12-16T21:44:38","slug":"instagram-reaper","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/instagram-reaper\/","author":13615120,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0","stable_tag":"trunk","tested":"3.4.2","requires":"3.0.1","requires_php":"","requires_plugins":"","header_name":"Instagram Reaper","header_author":"Kyle Shike","header_description":"","assets_banners_color":"","last_updated":"2014-12-16 21:44:38","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":1,"author_block_rating":0,"active_installs":10,"downloads":765,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":[],"upgrade_notice":[],"ratings":{"1":"1","2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[311,5889,20950],"plugin_category":[56],"plugin_contributors":[97449],"plugin_business_model":[],"class_list":["post-33389","plugin","type-plugin","status-closed","hentry","plugin_tags-instagram","plugin_tags-theme-development","plugin_tags-wp_cron","plugin_category-social-and-sharing","plugin_contributors-_qrrr","plugin_committers-_qrrr"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/instagram-reaper.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Set up wp_cron jobs to occur every minute, half-hour, hour, daily, or weekly.  Saves instagram image data to database for use in custom theme development.<\/p>\n\n<p>Saves image src's for full-size, low-resolution and thumbnail sizes.  Also saves the like count for an image at the time of the api query, and will update this count should the image be part of a later query.<\/p>\n\n<pre><code>inst_reaper_get_harvest()\n<\/code><\/pre>\n\n<p>* returns array of image data for every image saved in the cron\n  * id [the unique ID of the image in the Wordpress database]\n  * inst_id [the unique ID of the image as supplied by Instagram]\n  * url [the url link to the image on Instagram]\n  * src [the full size image url]\n  * src_low_res [the smaller size image url]\n  * src_thumb [the thumbnail size image url]\n  * likes_count [the number of favories or likes of the image]\n  * comments count [the number of comments of the image]\n  * date_created [the date the image was created on Instagram]<\/p>\n\n<p>example:<\/p>\n\n<pre><code>$images = inst_reaper_get_harvest();\nforeach ($images as $image) { ?&gt;\n  &lt;a href=\"&lt;?php echo $image['url']; ?&gt;\"&gt;\n    &lt;img src=\"&lt;?php echo $image['src']; ?&gt;\" \/&gt;\n  &lt;\/a&gt;\n&lt;?php }\n\n\n\ninst_reaper_get_harvest_in_range($start, $stop)\n<\/code><\/pre>\n\n<p>* returns array of image data for images in range supplied as arguments\n* data return is the same as get_instagram_reap()<\/p>\n\n<p>example:<\/p>\n\n<pre><code>$images = inst_reaper_get_harvest_in_range(0, 25);\nforeach ($images as $image) { ?&gt;\n  &lt;a href=\"&lt;?php echo $image['url']; ?&gt;\"&gt;\n    &lt;img src=\"&lt;?php echo $image['src']; ?&gt;\" \/&gt;\n  &lt;\/a&gt;\n&lt;?php }\n\n\n\ninst_reaper_get_user_id_by_name($username)\n<\/code><\/pre>\n\n<p>* returns Instagram user id (for use in custom Instagram query)<\/p>\n\n<pre><code>inst_reaper_save_photos()\n<\/code><\/pre>\n\n<p>* this is the function called in the cron-job.  You can call it at your leasure if you want to update get new images outside of the schedule<\/p>\n\n<pre><code>inst_reaper_get_photos($args)\n<\/code><\/pre>\n\n<p>* query the instagram API directly. This will not save in the database\n* currently can query by Hashtag or Username<\/p>\n\n<pre><code>$args:\n<\/code><\/pre>\n\n<p>* query (required) - 'hashtag' or 'username'\n* user_id - the Instagram User id for the query.  If you do not know the User ID, use\n* username - this will get the user ID by the username before querying\n* hashtag - the hashtag for the query\n* count - the number of images to return<\/p>\n\n<p>example:<\/p>\n\n<pre><code>$args = array(\n  'query' =&gt; 'username',\n  'username' =&gt; 'dvl',\n  'count' =&gt; '30'\n);\n\n$images = inst_reaper_get_photos($args);\nforeach ($images as $image) { ?&gt;\n  &lt;a href=\"&lt;?php echo $image['url']; ?&gt;\"&gt;\n    &lt;img src=\"&lt;?php echo $image['src']; ?&gt;\" \/&gt;\n  &lt;\/a&gt;\n&lt;?php }\n<\/code><\/pre>\n\n<h3>Code Snippets<\/h3>\n\n<pre><code>inst_reaper_get_harvest()\n<\/code><\/pre>\n\n<p>* returns array of image data for every image saved in the cron\n  * id [the unique ID of the image in the Wordpress database]\n  * inst_id [the unique ID of the image as supplied by Instagram]\n  * url [the url link to the image on Instagram]\n  * src [the full size image url]\n  * src_low_res [the smaller size image url]\n  * src_thumb [the thumbnail size image url]\n  * likes_count [the number of favories or likes of the image]\n  * comments count [the number of comments of the image]\n  * date_created [the date the image was created on Instagram]<\/p>\n\n<p>example:<\/p>\n\n<pre><code>$images = inst_reaper_get_harvest();\nforeach ($images as $image) { ?&gt;\n  &lt;a href=\"&lt;?php echo $image['url']; ?&gt;\"&gt;\n    &lt;img src=\"&lt;?php echo $image['src']; ?&gt;\" \/&gt;\n  &lt;\/a&gt;\n&lt;?php }\n\n\n\ninst_reaper_get_harvest_in_range($start, $stop)\n<\/code><\/pre>\n\n<p>* returns array of image data for images in range supplied as arguments\n* data return is the same as get_instagram_reap()<\/p>\n\n<p>example:<\/p>\n\n<pre><code>$images = inst_reaper_get_harvest_in_range(0, 25);\nforeach ($images as $image) { ?&gt;\n  &lt;a href=\"&lt;?php echo $image['url']; ?&gt;\"&gt;\n    &lt;img src=\"&lt;?php echo $image['src']; ?&gt;\" \/&gt;\n  &lt;\/a&gt;\n&lt;?php }\n\n\n\ninst_reaper_get_user_id_by_name($username)\n<\/code><\/pre>\n\n<p>* returns Instagram user id (for use in custom Instagram query)<\/p>\n\n<pre><code>inst_reaper_save_photos()\n<\/code><\/pre>\n\n<p>* this is the function called in the cron-job.  You can call it at your leasure if you want to update get new images outside of the schedule<\/p>\n\n<pre><code>inst_reaper_get_photos($args)\n<\/code><\/pre>\n\n<p>* query the instagram API directly. This will not save in the database\n* currently can query by Hashtag or Username<\/p>\n\n<pre><code>$args:\n<\/code><\/pre>\n\n<p>* query (required) - 'hashtag' or 'username'\n* user_id - the Instagram User id for the query.  If you do not know the User ID, use\n* username - this will get the user ID by the username before querying\n* hashtag - the hashtag for the query\n* count - the number of images to return<\/p>\n\n<p>example:<\/p>\n\n<pre><code>$args = array(\n  'query' =&gt; 'username',\n  'username' =&gt; 'dvl',\n  'count' =&gt; '30'\n);\n\n$images = inst_reaper_get_photos($args);\nforeach ($images as $image) { ?&gt;\n  &lt;a href=\"&lt;?php echo $image['url']; ?&gt;\"&gt;\n    &lt;img src=\"&lt;?php echo $image['src']; ?&gt;\" \/&gt;\n  &lt;\/a&gt;\n&lt;?php }\n<\/code><\/pre>\n\n<!--section=installation-->\n<ol>\n<li>Upload this plugin to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Provide Instagram Client ID and query options, and start the cron<\/li>\n<\/ol>","raw_excerpt":"A plugin for developers. Gets instagram images by username or hashtag","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/33389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=33389"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/_qrrr"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=33389"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=33389"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=33389"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=33389"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=33389"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=33389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}