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

Woditschka #2

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Woditschka #2

wants to merge 17 commits into from

Conversation

woditschka
Copy link

Hi, here's my solution to the exercise:

Start the application with:

mvn spring-boot:run

Access the frequency/new endpoint with:

http://localhost:8080/frequency/new?url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fjava%2Fcomments%2F32pj67%2Fjava_reference_in_gta_v_beautiful%2F.json

which results in (with your unique id):

{"id":"c3352b45-e58b-4ad2-a73a-ddc45a4e5655"}

To see the results use the frequency endpoint with the appropriate id e.g.:

http://localhost:8080/frequency/c3352b45-e58b-4ad2-a73a-ddc45a4e5655?count=10

which results in the top 10 frequency entries:

[{"word":"the","count":42},{"word":"i","count":20},{"word":"a","count":20},{"word":"that","count":19},{"word":"to","count":15},{"word":"you","count":15},{"word":"of","count":13},{"word":"and","count":13},{"word":"so","count":11},{"word":"in","count":10}]

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

Successfully merging this pull request may close these issues.

2 participants