use of io.nem.symbol.sdk.openapi.okhttp_gson.model.MosaicIds in project nem2-sdk-java by nemtech.
the class NamespaceRepositoryOkHttpImpl method getMosaicsNames.
@Override
public Observable<List<MosaicNames>> getMosaicsNames(List<MosaicId> ids) {
MosaicIds mosaicIds = new MosaicIds();
mosaicIds.mosaicIds(ids.stream().map(MosaicId::getIdAsHex).collect(Collectors.toList()));
Callable<MosaicsNamesDTO> callback = () -> getClient().getMosaicsNames(mosaicIds);
return exceptionHandling(call(callback).map(MosaicsNamesDTO::getMosaicNames).flatMapIterable(item -> item).map(this::toMosaicNames).toList().toObservable());
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.MosaicIds in project nem2-sdk-java by nemtech.
the class MosaicRepositoryOkHttpImpl method getMosaics.
@Override
public Observable<List<MosaicInfo>> getMosaics(List<MosaicId> ids) {
MosaicIds mosaicIds = new MosaicIds();
mosaicIds.mosaicIds(ids.stream().map(MosaicId::getIdAsHex).collect(Collectors.toList()));
Callable<List<MosaicInfoDTO>> callback = () -> getClient().getMosaics(mosaicIds);
return exceptionHandling(call(callback).flatMapIterable(item -> item).map(this::createMosaicInfo).toList().toObservable());
}
Aggregations