Skip to content

spereverziev/payworks-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Task

Write a RESTFUL webservice that can be accessed via http.

Use Java for coding Use any framework and build managers you like (please provide a short statement why you chose a particular framework) Include some testing (unit, integration, end-to-end)

The webservice needs to be publicly available:

Deploy on any service you like (e.g. AWS) You will provide us with a link when you are done

It should be able to do the following:

Create a superhero with the following properties Name Pseudonym The publisher it is from (e.g. DC or Marvel) List of "skills" or powers List of allies (e.g Batman's ally would be Robin) if the superhero has any. Date of first appearance (in the format YYYY-MM-DD). Get a list of all superheros in JSON format. Get the details of a specific superhero in JSON format


Description of endpoints

Create power:

POST /api/heropowers Body: { "name":"name", "description":"description" }

Get all powers

GET /api/heropowers

Create superhero

POST /api/superhero 
Body {   
         "name":"hero1",
         "description":"description",
         "pseudonym":"pseudonym",
         "publisher":"DC", - ( "DC" or "MARVEL"
         "dateOfFirstAppearance":"1993-12-12", (format = "yyyy-mm-dd")
         "powers": [1,2] -  list of powers id's (optional)
         "allies": [1,2] -  list of allies superheroes id's (optional) 
     }

Get all superheroes

GET /api/superheroes

Get detailed info about superhero

GET /api/superheroes/{id}

Add powers to superhero

PUT /api/superheroes/{id}/powers   
Body { "idList" : [] - list of powers id's }

Add allies to superhero

PUT /api/superheroes/{id}/allies    
Body { "idList" : [] - list of allies id's }

Public access

Application deployed to Heroku and can be accessed by https://paperworks-test.herokuapp.com/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published