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

hirezapi.HiRezApi Maven / Gradle / Ivy

The newest version!
package hirezapi;

import hirezapi.endpoints.GameEndpoint;
import hirezapi.endpoints.MatchesEndpoint;
import hirezapi.endpoints.SessionEndpoint;
import hirezapi.endpoints.TeamsEndpoint;
import hirezapi.endpoints.UserEndpoint;
import hirezapi.rest.RestController;
import hirezapi.session.SessionStorage;
import lombok.AccessLevel;
import lombok.Getter;

@Getter
public abstract class HiRezApi {
  protected final Configuration configuration;
  protected final RestController restController;
  @Getter(AccessLevel.NONE)
  private final SessionEndpoint sessionEndpoint;

  protected HiRezApi(Configuration configuration, SessionStorage sessionStorage) {
    this.configuration = configuration;
    this.restController = new RestController(configuration.getPlatform());
    this.sessionEndpoint = new SessionEndpoint(this, sessionStorage);
  }

  public UserEndpoint userEndpoint() {
    return new UserEndpoint(this);
  }

  public SessionEndpoint sessionEndpoint() {
    return sessionEndpoint;
  }

  public MatchesEndpoint matchesEndpoint() {
    return new MatchesEndpoint(this);
  }

  public TeamsEndpoint teamsEndpoint() {
    return new TeamsEndpoint(this);
  }

  public abstract G gameEndpoint();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy