use of li.naska.bgg.repository.model.BggGeekplayRequestBody in project bgg-api by tnaskali.
the class PlaysService method updatePrivatePlay.
@SneakyThrows
public Mono<BggGeekplayResponseBody> updatePrivatePlay(Integer id, String cookie, Play play) {
if (!Objects.equals(id, play.getId())) {
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Play ID mismatch");
}
BggGeekplayRequestBody requestBody = geekplayParamsMapper.toBggModel(play);
requestBody.setAction("save");
requestBody.setAjax(1);
requestBody.setVersion(2);
return geekplaysRepository.updateGeekplay(cookie, requestBody);
}
use of li.naska.bgg.repository.model.BggGeekplayRequestBody in project bgg-api by tnaskali.
the class PlaysService method createPrivatePlay.
@SneakyThrows
public Mono<BggGeekplayResponseBody> createPrivatePlay(String cookie, Play play) {
BggGeekplayRequestBody requestBody = geekplayParamsMapper.toBggModel(play);
requestBody.setAction("save");
requestBody.setAjax(1);
return geekplaysRepository.updateGeekplay(cookie, requestBody);
}
use of li.naska.bgg.repository.model.BggGeekplayRequestBody in project bgg-api by tnaskali.
the class PlaysService method deletePrivatePlay.
public Mono<BggGeekplayResponseBody> deletePrivatePlay(Integer id, String cookie) {
BggGeekplayRequestBody requestBody = new BggGeekplayRequestBody();
requestBody.setPlayid(id);
requestBody.setAction("delete");
requestBody.setAjax(1);
requestBody.setFinalize(1);
return geekplaysRepository.updateGeekplay(cookie, requestBody);
}
Aggregations