Package com.patreonshout.rest.interfaces
Interface TagImpl
- All Known Implementing Classes:
TagSvc
@RequestMapping("/tags")
public interface TagImpl
Interface for endpoints relating to lists
-
Method Summary
Modifier and Type Method Description org.springframework.http.ResponseEntity<?>AddTag(TagAddRequest tagAddRequest)Endpoint that will add a newTagobject to the databaseorg.springframework.http.ResponseEntity<?>DeleteUserTagOnSinglePost(TagDeleteRequest tagDeleteRequest)Endpoint that will delete the user given tag of a post from the databaseorg.springframework.http.ResponseEntity<?>GetUserTagsOnSinglePost(TagGetRequest tagGetRequest)Endpoint that will get the user given tags of a post from the database
-
Method Details
-
AddTag
@PostMapping org.springframework.http.ResponseEntity<?> AddTag(@RequestBody TagAddRequest tagAddRequest) throws PSExceptionEndpoint that will add a newTagobject to the database- Parameters:
tagAddRequest- is theTagAddRequestobject that containsTagrequest parameters- Returns:
HttpStatus.CREATEDif successful,HttpStatus.CONFLICTorHttpStatus.INTERNAL_SERVER_ERRORorHttpStatus.BAD_GATEWAYotherwise- Throws:
PSException
-
GetUserTagsOnSinglePost
@GetMapping org.springframework.http.ResponseEntity<?> GetUserTagsOnSinglePost(@RequestBody TagGetRequest tagGetRequest) throws PSExceptionEndpoint that will get the user given tags of a post from the database- Parameters:
tagGetRequest- is theTagGetRequestobject that containsTagrequest parameters- Returns:
HttpStatus.CREATEDif successful,HttpStatus.INTERNAL_SERVER_ERRORorHttpStatus.BAD_GATEWAYotherwise- Throws:
PSException
-
DeleteUserTagOnSinglePost
@DeleteMapping org.springframework.http.ResponseEntity<?> DeleteUserTagOnSinglePost(@RequestBody TagDeleteRequest tagDeleteRequest) throws PSExceptionEndpoint that will delete the user given tag of a post from the database- Parameters:
tagDeleteRequest- is theTagDeleteRequestobject that containsTagrequest parameters- Returns:
HttpStatus.CREATEDif successful,HttpStatus.INTERNAL_SERVER_ERRORorHttpStatus.BAD_GATEWAYotherwise- Throws:
PSException
-