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 newSearchFilter
to the database for a userorg.springframework.http.ResponseEntity<?>
DeleteFilter(FilterDeleteRequest filterDeleteRequest)
Endpoint that will delete aSearchFilter
object from the database for a userorg.springframework.http.ResponseEntity<?>
GetUserFilters(java.lang.String loginToken)
Endpoint that will get everySearchFilter
from the database for a user
-
Method Details
-
DeleteFilter
@DeleteMapping org.springframework.http.ResponseEntity<?> DeleteFilter(@RequestBody FilterDeleteRequest filterDeleteRequest) throws PSExceptionEndpoint that will delete aSearchFilter
object from the database for a user- Parameters:
filterDeleteRequest
- is theFilterDeleteRequest
object that contains json body information about the list we are going to delete from the database- Returns:
HttpStatus.OK
if successful,HttpStatus.BAD_REQUEST
otherwise- Throws:
PSException
-
GetUserFilters
@GetMapping org.springframework.http.ResponseEntity<?> GetUserFilters(@RequestParam java.lang.String loginToken) throws PSExceptionEndpoint that will get everySearchFilter
from 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 newSearchFilter
to the database for a user- Parameters:
filterAddRequest
- is theFilterAddRequest
object that contains json body information about the list we are going to add to the database- Returns:
HttpStatus.CREATED
if successful,HttpStatus.CONFLICT
otherwise- Throws:
PSException
-