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 newTag
object 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 newTag
object to the database- Parameters:
tagAddRequest
- is theTagAddRequest
object that containsTag
request parameters- Returns:
HttpStatus.CREATED
if successful,HttpStatus.CONFLICT
orHttpStatus.INTERNAL_SERVER_ERROR
orHttpStatus.BAD_GATEWAY
otherwise- 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 theTagGetRequest
object that containsTag
request parameters- Returns:
HttpStatus.CREATED
if successful,HttpStatus.INTERNAL_SERVER_ERROR
orHttpStatus.BAD_GATEWAY
otherwise- 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 theTagDeleteRequest
object that containsTag
request parameters- Returns:
HttpStatus.CREATED
if successful,HttpStatus.INTERNAL_SERVER_ERROR
orHttpStatus.BAD_GATEWAY
otherwise- Throws:
PSException
-