All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hirezapi.endpoints.GameEndpoint Maven / Gradle / Ivy

The newest version!
package hirezapi.endpoints;

import hirezapi.HiRezApi;
import hirezapi.endpoints.statuspage.ServerStatus;
import hirezapi.enums.Language;
import hirezapi.json.AbstractHero;
import hirezapi.json.AbstractItem;
import hirezapi.json.AbstractSkin;
import hirezapi.json.PatchInfo;

import java.util.List;

public abstract class GameEndpoint
      extends AbstractEndpoint {

  public GameEndpoint(HiRezApi api) {
    super(api);
  }

  public ServerStatus serverStatus() {
    return new ServerStatus(api);
  }

  public List getSkins(H hero, Language language) {
    return getSkins(hero.getId(), language);
  }

  public abstract List getSkins(long id, Language language);

  public abstract List getItems(Language language);

  public PatchInfo getPatchInfo() {
    return api.getRestController().request(buildUrl("getpatchinfo"), PatchInfo.class);
  }
}