davidbauer / Instacurate

Turn your Twitter timeline into a personalised news site, in an instant. Fetches links from your timeline and displays them in a discovery friendly design.
http://www.instacurate.com
113 stars 29 forks source link

Request embeds from cache using an array of URLs to reduce requests #118

Closed oliverwehn closed 9 years ago

oliverwehn commented 9 years ago

Changed embed-cache.php to accept arrays of URLs as input, returning JSON arrays. Also restructured script.js for Twitter as well as Reddit accordingly to send a single request with a URL array at the end of link processing instead of a request for each single link.

davidbauer commented 9 years ago

great! can you check why the pull request cannot be merged automatically? Says "Use the command line to resolve conflicts before continuing."

oliverwehn commented 9 years ago

Merged my changes with up-to-date files and sent another pull request. The new one should merge without conflicts–hopefully.

davidbauer commented 9 years ago

Computer says no.

bildschirmfoto 2014-12-04 um 15 02 42

oliverwehn commented 9 years ago

Try the following:

git remote add fork-oliver https://github.com/oliverwehn/Instacurate.git
git fetch fork-oliver
git checkout -b dev-cache-urlarrays fork-oliver/dev-cache-urlarrays
git checkout dev # or master, if you don’t have a dev branch
git merge dev-cache-urlarrays

If he does report conflicts, open the files (I guess it will just be a single one) in your editor and look for the code area where the conflicts are marked. Or better, just mail me the file and I’ll send you back a version with all conflicts resolved. Then you can just add and commit the updated files.

When everything is done:

git branch -D dev-cache-urlarrays
davidbauer commented 9 years ago

Had to revert it. Two issues I noticed:

  1. For Twitter, it now seems to load all teasers at once, instead of first 12 and then loading next 12 based on scrolling.
  2. Some metadata returns as undefined for Reddit (the one that is taken directly from Reddit and not fetched via Embedly). bildschirmfoto 2014-12-04 um 15 40 01
oliverwehn commented 9 years ago

I’ll check it over the weekend. Seems, my merge mixed up some stuff.

Am 04.12.2014 um 15:45 schrieb David Bauer notifications@github.com:

Had to revert it. Two issues I noticed:

  1. For Twitter, it now seems to load all teasers at once, instead of first 12 and then loading next 12 based on scrolling.
  2. Some metadata returns as undefined for Reddit (the one that is taken directly from Reddit and not fetched via Embedly). https://cloud.githubusercontent.com/assets/1950224/5299993/74cb5e9c-7bcc-11e4-917d-b5060cb10da7.png — Reply to this email directly or view it on GitHub https://github.com/davidbauer/Instacurate/pull/118#issuecomment-65641437.