use of li.naska.bgg.repository.model.BggCollectionQueryParams in project bgg-api by tnaskali.
the class ThingsService method getPrivateThings.
public Mono<Collection> getPrivateThings(String username, String cookie, CollectionParams params) {
BggCollectionQueryParams queryParams = collectionParamsMapper.toBggModel(params);
queryParams.setUsername(username);
// handle subtype bug in the BBG XML API
if (queryParams.getSubtype() == null || queryParams.getSubtype().equals(CollectionItemSubtype.boardgame.value())) {
queryParams.setExcludesubtype(CollectionItemSubtype.boardgameexpansion.value());
}
queryParams.setShowprivate(1);
return collectionRepository.getCollection(cookie, queryParams).map(xml -> xmlProcessor.toJavaObject(xml, com.boardgamegeek.collection.Collection.class)).map(collectionMapper::fromBggModel);
}
use of li.naska.bgg.repository.model.BggCollectionQueryParams in project bgg-api by tnaskali.
the class ThingsService method getThings.
public Mono<Collection> getThings(String username, CollectionParams params) {
BggCollectionQueryParams queryParams = collectionParamsMapper.toBggModel(params);
queryParams.setUsername(username);
// handle subtype bug in the BBG XML API
if (queryParams.getSubtype() == null || queryParams.getSubtype().equals(CollectionItemSubtype.boardgame.value())) {
queryParams.setExcludesubtype(CollectionItemSubtype.boardgameexpansion.value());
}
return collectionRepository.getCollection(null, queryParams).map(xml -> xmlProcessor.toJavaObject(xml, com.boardgamegeek.collection.Collection.class)).map(collectionMapper::fromBggModel);
}
Aggregations