Skip to content

Add Offline Support for --quote Option #2

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

Open
thesayfulla opened this issue Jan 10, 2025 · 0 comments
Open

Add Offline Support for --quote Option #2

thesayfulla opened this issue Jan 10, 2025 · 0 comments

Comments

@thesayfulla
Copy link
Owner

Problem:
Currently, the --quote option relies on an external API call to https://api.quotable.io/random to fetch random quotes. However, this functionality does not work when the user is offline, resulting in an incomplete user experience.

Solution:
Implement a check for the user's online status before making the API call. If the user is online, fetch quotes from the external API. If the user is offline, provide fallback functionality that serves quotes from local data or a predefined offline source, ensuring uninterrupted access to random quotes regardless of network connectivity.

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

1 participant