ginatrapani/ThinkUp — pull request #1840 by gbrady92 (2014-03-08 01:05:33+00:00)
Title: Improvements to Instagram Plugin.

Only get newest posts and only get friends every two days.

Hey Gina,
I finished working on the Instagram plugin, I implemented the pulling of the latest posts by checking if any post are stored in the database, if there aren't any the crawler will pull all posts, otherwise it will pull the posts from the last crawl date minus a week (I used minus one week to catch the comments on the more recent posts).

I implemented pulling new friends every 2 days by checking if friends have been pulled previously, if they haven't the crawler pulls all the friends and inserts the current time and date of the crawl into the options table. If friends have been pulled previously the crawler will check if the date of the last friends update was within 2 days, if it was over 2 days the crawler stores the user's friends and updates the time of the crawl with the current time and date.
Thanks,
Gareth.