Forum Discussion

synthesis's avatar
11 years ago

REST API: How do you get "views' and 'kudos' for a large amount of old posts?

Good afternoon! :)

 

I have a "harvester" that reads new posts from Lithium every morning, filters out only the products I'm interested in, and then puts them in a local database. The problem I'm having is I can only read a certain number of records using the REST API (i.e. read limit) and after a post goes outside that limit it's essentially "lost" to me (I'm not able to read it in and update my local DB with the new 'views' or 'kudos' numbers).

 

Is there a better way to get old posts than to do large bulk reads and HOPE I can read enough records to get all the old posts I want?

 

I have ~40,000 records in my DB to-date so pulling them one-at-a-time doesn't seem like an option (if that's even possible with the API).

 

Any suggestions?

 

I'm currently reading posts like this:

 

                       String.Format(@"restapi/vc/boards/id/{0}/posts/recent?page_size={1}&page={2}&restapi.response_format=json&restapi.format_detail=full_list_element&restapi.response_style=view", board, LITHIUM_RECORDS_PER_CALL, i));

 I then iterate through all the results and update my local DB as necessary with new records or new 'view' and 'kudos' numbers.

 

Thanks in advance for any help you can provide.

No RepliesBe the first to reply