jdash.events.producer.AwardedListPagesComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdash-events Show documentation
Show all versions of jdash-events Show documentation
Extension of the client module that allows to emit events when changes are detected between the results of
two subsequent requests.
The newest version!
package jdash.events.producer;
import jdash.client.GDClient;
import jdash.common.LevelSearchMode;
import jdash.common.entity.GDList;
import jdash.events.object.AwardedListAdd;
import jdash.events.object.AwardedListRemove;
import jdash.events.object.AwardedListUpdate;
import reactor.core.publisher.Flux;
import java.util.Optional;
import static jdash.common.internal.InternalUtils.haveDifferentFields;
class AwardedListPagesComparator implements PagesComparator {
@Override
public Flux fetchPage(GDClient client, int page) {
return client.searchLists(LevelSearchMode.AWARDED, null, null, page);
}
@Override
public long idGetter(GDList element) {
return element.id();
}
@Override
public Optional