Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Use quotes' API #129

Open
antavelos opened this issue Feb 18, 2018 · 3 comments
Open

Use quotes' API #129

antavelos opened this issue Feb 18, 2018 · 3 comments

Comments

@antavelos
Copy link
Contributor

Hey @mubaris, nice app :)
Have you considered using any randomly generated quotes API? Here are some free options:

examples:
http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1
https://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&jsonp=parseQuote&lang=en

If you're in I could start implementation.

@mubaris
Copy link
Owner

mubaris commented Feb 18, 2018

I thought about it. But, I wanted a completely offline app. That's why I went this way

@antavelos
Copy link
Contributor Author

Yeah I understand.
In the meanwhile I came up with a simple approach #130.
You can use it for data collection anyway ;)
Cheers.

jameswilson added a commit to your-fortune/your-fortune.github.io that referenced this issue Feb 24, 2019
We're pulling quotes via the JSON files exposed by Github in
a humble attempt to solve mubaris/motivate#129
@jameswilson
Copy link

I've added the JSON files from mubaris/motivate to a small hobby project website I've setup, based around JSON-formatted quotes.

https://your-fortune.github.io/motivate

If you inspect source, you can see that I'm sourcing the JSON files straight from github's raw content server, loading one JSON file randomly and selecting a random item from the list. The hash on the URL is updated with the file number and index so you can actually inspect various quotes.

Note this isn't an API per-se, but just a Javascript based implementation that loads a random quote on page refresh (or clicking the button in the bottom right).

I'm curating various other kinds of quotes on the site, mostly aggregated from various fortune collections.

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

No branches or pull requests

3 participants