These are chat archives for jescalan/roots

17th
Feb 2017
andrewgrano
@andrewgrano
Feb 17 2017 00:48
Hello! I am using roots-records to generate posts from the wordpress API. I have reached over 100 posts in wordpress, so it now splits the JSON into two different URLS (url/posts?number=100&page=1 | url/posts?number=100&page=2). Does anyone know how to load multiple URLs into roots-records? I still need it to generate all 101+ posts without treating any of them differently. Any help would be appreciated, thanks!
Jeff Escalante
@jescalan
Feb 17 2017 03:00
i think you should be able to pass a limit param to the wordpress plugin to raise the limit
it uses the wp json api protocol
see if you can pass a param that makes this change!
Iain Maitland
@gl2748
Feb 17 2017 12:16

Hey @jescalan it might be worth adding a pointer along the lines of 'Pssst over here -> https://github.com/static-dev/spike' to the Roots page here: http://roots.cx/

Not sure how I missed spike but I did, and seems like it has replaced Roots ...

Jeff Escalante
@jescalan
Feb 17 2017 16:45
yeah, definitely, you're right
I'll do this as soon as I have a minute!
I've been heads down on spike so haven't had a ton of time for working on the marketing part
but that should certainly be done!
andrewgrano
@andrewgrano
Feb 17 2017 23:09
@jescalan - thanks so much for your response. Unfortunately, the docs state that the limit is 100; "Large queries can hurt site performance, so per_page is capped at 100 records. If you wish to retrieve more than 100 records, for example to build a client-side list of all available categories, you may make multiple API requests and combine the results within your application." (https://developer.wordpress.org/rest-api/using-the-rest-api/pagination/).
andrewgrano
@andrewgrano
Feb 17 2017 23:20
So it seems that I need to use javascript to combine the json data from two URLs into one response. Is this possible?