pprathameshmore / QuoteGarden

A RESTful API for quotes. The database currently includes more than 75000 quotes.
https://quote-garden.onrender.com/
35 stars 6 forks source link

I want to introduce a feature in my software to donate quotes to QuoteGarden. How do I go about doing that? #7

Closed Shankhanil closed 4 years ago

Shankhanil commented 4 years ago

@pprathameshmore pls have a look at the issue

pprathameshmore commented 4 years ago

Are you talking about adding new quotes?

Shankhanil commented 4 years ago

Yes, I am introducing a feature, where an user can add new quotes to QuoteGarden

pprathameshmore commented 4 years ago

But we have to keep secure. So no one can add meaningless data.

Shankhanil commented 4 years ago

Absolutely, what I can do is, I can post the quote data to a temporary API, where the maintainer (you) can review it and approve/reject it.

pprathameshmore commented 4 years ago

No, I trust you. You can post directly.

Shankhanil commented 4 years ago

Yes, but I can't always trust my users. It may so happen, that the user is trying to spam, or post meaningless data. I need more ideas on how to prevent it.

pprathameshmore commented 4 years ago

I can implement API protection using JWT, so users need to log in to create new quotes.

Shankhanil commented 4 years ago

That's a good idea. Can I work on this patch, if you're not yet working on it? I can create an issue, and a PR. If you assign this to me, could you also send me relevant sources for a quick readup on JWT authentication? @pprathameshmore

pprathameshmore commented 4 years ago

Do you know Node.js?

Shankhanil commented 4 years ago

Yes, as a beginner.

pprathameshmore commented 4 years ago

Okay! You can! But currently facing issue https://github.com/pprathameshmore/QuoteGarden/issues/9

Shankhanil commented 4 years ago

I will look into issue #9 .

PrithiPal commented 4 years ago

In regards to the validity of user-added quotes, some open-source APIs usually have a feedback system that contains two buttons: like or dislike, which is usually a POST request. Another variant is just voted with each quote act as a weight to how likely this is to be randomly generated. This approach will likely be little algorithmic heavy.

Shankhanil commented 4 years ago

We can try out the feedback-system approach.

pprathameshmore commented 4 years ago

Yes