Skip to content

Creating endpoints to display manipulated data.

Notifications You must be signed in to change notification settings

Madhu2264/Words-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites

Setting up

In the root directory.

docker-compose up

This creates a setup with a postgres server (hostname: postgres) containing a database.

To remove the servers later:

docker-compose down

Connecting to postgres

If you happen to have the postgres client tools installed (not required for this assignment)

psql -h localhost -p 5432 -U postgres

Words API

The data returned by the api should be camelCased, however the data in the database should be snake_cased.

The requirements for this project are:

  • Create an endpoint /import, which calls the [http://dataservice/harrypotter] API and stores the results in the database.The import should be idempotent, so when the endpoint gets called twice the get harrypotter and import procedure should run only once (the first time).
  • Create an endpoint /wordscount which returns an object that has each unique word with the count of how often it's used in the database
  • Create an endpoint /wordcount/{word} which returns a single word count
  • Create an endpoint /matchword/{pattern} which displays all the word which has the given string as a substring

About

Creating endpoints to display manipulated data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published