Package com.patreonshout.rest.interfaces
Interface SearchFilterImpl
- All Known Implementing Classes:
SearchFilterSvc
@RequestMapping("/filters")
public interface SearchFilterImpl
Interface for endpoints relating to search filters
-
Method Summary
Modifier and Type Method Description org.springframework.http.ResponseEntity<?>AddFilter(FilterAddRequest filterAddRequest)Endpoint that will add a newSearchFilterto the database for a userorg.springframework.http.ResponseEntity<?>DeleteFilter(FilterDeleteRequest filterDeleteRequest)Endpoint that will delete aSearchFilterobject from the database for a userorg.springframework.http.ResponseEntity<?>GetUserFilters(java.lang.String loginToken)Endpoint that will get everySearchFilterfrom the database for a user
-
Method Details
-
DeleteFilter
@DeleteMapping org.springframework.http.ResponseEntity<?> DeleteFilter(@RequestBody FilterDeleteRequest filterDeleteRequest) throws PSExceptionEndpoint that will delete aSearchFilterobject from the database for a user- Parameters:
filterDeleteRequest- is theFilterDeleteRequestobject that contains json body information about the list we are going to delete from the database- Returns:
HttpStatus.OKif successful,HttpStatus.BAD_REQUESTotherwise- Throws:
PSException
-
GetUserFilters
@GetMapping org.springframework.http.ResponseEntity<?> GetUserFilters(@RequestParam java.lang.String loginToken) throws PSExceptionEndpoint that will get everySearchFilterfrom the database for a user- Parameters:
loginToken- is the login token provided to the user upon sign in- Returns:
- a json body of search filter objects for a user
- Throws:
PSException
-
AddFilter
@PutMapping org.springframework.http.ResponseEntity<?> AddFilter(@RequestBody FilterAddRequest filterAddRequest) throws PSExceptionEndpoint that will add a newSearchFilterto the database for a user- Parameters:
filterAddRequest- is theFilterAddRequestobject that contains json body information about the list we are going to add to the database- Returns:
HttpStatus.CREATEDif successful,HttpStatus.CONFLICTotherwise- Throws:
PSException
-