Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement : fetching new data to offline-data storage files (data/*.json) #494

Open
rnm-patel opened this issue Aug 12, 2018 · 3 comments

Comments

@rnm-patel
Copy link

Improvement

Description

  • I have seen that after requesting same "joke" for some times it is repeating, no matter with how many new jokes you fill into that data/joke.json file there's time when you may get repetative jokes if one goes recursive of jokes query...So the solution to it is as ....
  • Fetching new data to offline-data storage files (data/*.json) to avoid repetitive response ...

Any ideas on how to implement it?

  • after a certain number of requests, we fire one request in the background as separate thread to update the data for that file
  • Example :
  1. suppose after a number of request to jokes == (20)
  2. fire a function to fetch new jokes via API from some jokes providing API service and update offline data storage file data/jokes.json with new 20 jokes and repeat the cycle...
@rnm-patel rnm-patel changed the title Improvement : fetching new data to offline-data storage files (data/*.json) to avoid repetitive response Improvement : fetching new data to offline-data storage files (data/*.json) Aug 12, 2018
@rnm-patel
Copy link
Author

Tell me if anybody doing this ...

@rnm-patel
Copy link
Author

After implementation of this, one need not require adding a new small number of quotes, facts or jokes as a separate pull request, as it increases burden to the maintainer

@suryasr007
Copy link

suryasr007 commented Dec 26, 2018

Hi

Why can't we use jokes open API's such as chuck noris to fetch jokes?

For offline integration, we can store the fetched jokes.

If the idea seems good, I can work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants