easoncxz / twitanalysis

Dig your Twitter data
https://easoncxz.github.io/twitanalysis
Other
1 stars 0 forks source link

Try storing tweets in IndexedDB #21

Closed easoncxz closed 3 years ago

easoncxz commented 4 years ago

Don't keep on fetching the same faves; use the rate-limit to fetch more and more faves. Use IndexedDB.

Provide some buttons for clearing IndexedDB and prepare for re-migration.

Related reading:

Key quotes:

Unlike max_id the since_id parameter is not inclusive, so it is not necessary to adjust the ID in any way.

the next request, which will only return Tweets with IDs lower than or equal to the value of the max_id parameter. Note that since the max_id parameter is inclusive, the Tweet with the matching ID will actually be returned again

easoncxz commented 4 years ago

I built something and it's kind of useful.

image

image

See commit cdcb342.

easoncxz commented 3 years ago

Mozilla MDN has a guide under the reference-doc page for IDBOpenDBRequest.onupgradeneeded on how to do database migrations in IndexedDB:

easoncxz commented 3 years ago

There had been quite a bit of experience gained during #24 . As it stands, I think there is a sufficient amount of knowledge on how to use idb. Closing this issue now.