lukePeavey / quotable

Random Quotes API
MIT License
1.8k stars 212 forks source link

Get Quotes by topic / genre #135

Open shankarmadeshvaran opened 2 years ago

shankarmadeshvaran commented 2 years ago

Feature

For Each Quotes, add genre as parameter and we can filter based on it. I can see that tag is also used for same purpose but not exactly the same.

lukePeavey commented 2 years ago

This is exactly what the tags feature was intended for. It probably should have been called "topics" or "categories" instead of tags. I would be in favor of renaming this parameter "topics".

However, the real problem is: for this feature to be useful, we need to add meaningful topics to all of the existing quotes. I spent quite a bit of time working on this. But there are still ~ 1,200 quotes that do not have topics/tags.

If anyone is interested in working on that -- adding topics to the existing quotes let me know.

Anish-Chanda commented 2 years ago

This is exactly what the tags feature was intended for. It probably should have been called "topics" or "categories" instead of tags. I would be in favor of renaming this parameter "topics".

However, the real problem is: for this feature to be useful, we need to add meaningful topics to all of the existing quotes. I spent quite a bit of time working on this. But there are still ~ 1,200 quotes that do not have topics/tags.

If anyone is interested in working on that -- adding topics to the existing quotes let me know.

Sign me up 🥳

lukePeavey commented 2 years ago

@Gal1leo03

If anyone is interested in working on that (adding topics to the existing quotes) let me know.

Sign me up 🥳

Great! The data is in a public repository, anyone is welcome to contribute. It consists of JSON files that contain the source data for each database collection (quotes, authors, tags). To contribute:

  1. Fork and clone the data repository
  2. Create a new feature branch (ie adding-tags)
  3. Make changes to the data files
  4. Open a pull request to submit changes.

The only way to add tags to existing quotes is by manually editing the data/quotes.json file. Each quote has a tags property. So you would go though and manually add new tags to each quote. This is a pretty slow process, but any help would be appreciated!

"tags": []
"tags": ["famous-quotes"]
raxraj commented 2 years ago

Is this still open? Do you need me to get on in this one? @lukePeavey

Anish-Chanda commented 2 years ago

I've created a pull request after changing the tags of around 300 quotes, My exams were going on so my schedule was pretty filled up, so I am really really sorry for the delay :) @lukePeavey

lukePeavey commented 2 years ago

@raxraj which part did you want to work on, adding tags to quotes or renaming the tags param?

lukePeavey commented 2 years ago

@Gal1leo03 no need to apologize! Thanks for working on that. I'll merge your PR today.

a2937 commented 10 months ago

@lukePeavey Has anything happened related to this issue?

lukePeavey commented 10 months ago

@a2937

The api already uses "tags" to categorize and filter quotes. The tags feature is essentially the same concept as "topics" or "categories". So I don't think we need to add a new feature for this. If you want to add /edit tags on existing quotes you can do so via the data repository