// Path: api/src/main/java/hirez/api/object/interfaces/Queue.java
// public interface Queue extends IDObject<Integer> {
//     String getName();
// 
//     boolean isRanked();
// }
// 
// Path: realm/src/main/java/hirez/realm/object/PlayerQuery.java
// @Data
// public class PlayerQuery implements ReturnedMessage {
//     private final long id;
//     private final String name;
//     private final int portalId;
//     @JsonProperty("ret_msg")
//     private final String returnedMessage;
//     private final long steamId;
// }


import hirez.api.*;
import hirez.api.object.*;
import hirez.api.object.interfaces.Queue;
import hirez.realm.object.PlayerQuery;
import hirez.realm.object.*;
import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.core.Single;
import lombok.extern.slf4j.Slf4j;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.ZoneOffset;
import java.util.Arrays;
import java.util.Date;
import java.util.TimeZone;
import java.util.function.Consumer;
        return testAndCall(Player.class, "getplayer", Long.toString(userId), "hirez");
    }

    public Single<Player> getPlayerBySteamId(long steamId) {
        return testAndCall(Player.class, "getplayer", Long.toString(steamId), "steam");
    }

    public Flowable<PlayerIdPortal> getPlayerIdByName(String query) {
        return testAndCall(PlayerIdPortal.class, "getplayeridbyname", query)
                .flattenAsFlowable(Arrays::asList);
    }

    public Flowable<PlayerIdPortal> getPlayerIdByPortalUserId(Portal portal, long id) {
        return testAndCall(PlayerIdPortal[].class, "getplayeridbyportaluserid", portal.getId().toString(), Long.toString(id))
                .flattenAsFlowable(Arrays::asList);
    }

    public Flowable<PlayerIdPortal> getPlayerIdsByGamerTag(Portal portal, String query) {
        return testAndCall(PlayerIdPortal[].class, "getplayeridsbygamertag", portal.getId().toString(), query)
                .flattenAsFlowable(Arrays::asList);
    }

    public Single<PlayerStats> getPlayerStats(long userId) {
        return testAndCall(PlayerStats.class, "getplayerstats", Long.toString(userId));
    }

    public Single<PlayerStatus> getPlayerStatus(long userId) {
        return testAndCall(PlayerStatus.class, "getplayerstatus", Long.toString(userId));
    }

// Path: api/src/main/java/hirez/api/object/interfaces/Queue.java
// public interface Queue extends IDObject<Integer> {
//     String getName();
// 
//     boolean isRanked();
// }
// 
// Path: realm/src/main/java/hirez/realm/object/PlayerQuery.java
// @Data
// public class PlayerQuery implements ReturnedMessage {
//     private final long id;
//     private final String name;
//     private final int portalId;
//     @JsonProperty("ret_msg")
//     private final String returnedMessage;
//     private final long steamId;
// }


// Path: realm/src/main/java/hirez/realm/RealmRoyale.java
import hirez.api.*;
import hirez.api.object.*;
import hirez.api.object.interfaces.Queue;
import hirez.realm.object.PlayerQuery;
import hirez.realm.object.*;
import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.core.Single;
import lombok.extern.slf4j.Slf4j;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.ZoneOffset;
import java.util.Arrays;
import java.util.Date;
import java.util.TimeZone;
import java.util.function.Consumer;

        return testAndCall(Player.class, "getplayer", Long.toString(userId), "hirez");
    }

    public Single<Player> getPlayerBySteamId(long steamId) {
        return testAndCall(Player.class, "getplayer", Long.toString(steamId), "steam");
    }

    public Flowable<PlayerIdPortal> getPlayerIdByName(String query) {
        return testAndCall(PlayerIdPortal.class, "getplayeridbyname", query)
                .flattenAsFlowable(Arrays::asList);
    }

    public Flowable<PlayerIdPortal> getPlayerIdByPortalUserId(Portal portal, long id) {
        return testAndCall(PlayerIdPortal[].class, "getplayeridbyportaluserid", portal.getId().toString(), Long.toString(id))
                .flattenAsFlowable(Arrays::asList);
    }

    public Flowable<PlayerIdPortal> getPlayerIdsByGamerTag(Portal portal, String query) {
        return testAndCall(PlayerIdPortal[].class, "getplayeridsbygamertag", portal.getId().toString(), query)
                .flattenAsFlowable(Arrays::asList);
    }

    public Single<PlayerStats> getPlayerStats(long userId) {
        return testAndCall(PlayerStats.class, "getplayerstats", Long.toString(userId));
    }

    public Single<PlayerStatus> getPlayerStatus(long userId) {
        return testAndCall(PlayerStatus.class, "getplayerstatus", Long.toString(userId));
    }

    public Flowable<PlayerQuery> searchPlayer(String query) {