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

Expose in API returns a lot of data #14

Open
MarkNygaard opened this issue Oct 3, 2023 · 3 comments
Open

Expose in API returns a lot of data #14

MarkNygaard opened this issue Oct 3, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@MarkNygaard
Copy link

Hi,

When exposing the word count in the api the common words list is sending a lot of data.

To slim the amount of data I tried to remove the common words from the "Calculations to show" settings. However, it seems like they are still exposed in the api.

Are there anyway to control which information is sendt in the api?

@velomovies
Copy link
Contributor

@MarkNygaard At the moment the plugin will always return all data. I chose to do that because not showing data in the front-end doesn't necessarily mean you don't want that data available.

This could be a good enhancement with a separate setting to control the information exposed by the plugin

@velomovies velomovies added enhancement New feature or request good first issue Good for newcomers labels Oct 6, 2023
@sebashine-branly
Copy link

Hello and thanks for this project.
I do agree with @MarkNygaard that including the field commonWords generates a lot of noise in the API.
My use-case is that I would like to display an estimated reading time for a blog article.
Rather than fetching the whole body of the article and doing some calculation on it (which requires fetching lots of data aka the whole body) I would like to use body_word_counter JSON field and more specifically its words or even its readingTime field. However, because of the presence of commonWords I do end up having to fetch lots of data still.

@MarkNygaard
Copy link
Author

I made this PR (#15) to reduce the noise of the commonWords

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants