Class LeaguesClient

java.lang.Object
com.sportdataapi.util.AbstractClient
com.sportdataapi.client.LeaguesClient

public class LeaguesClient
extends AbstractClient
The leagues client.

Attention! You shall never create this client directly but use SoccerClient.leagues() instead.

Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    LeaguesClient​(javax.ws.rs.client.WebTarget target)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    League get​(int id)
    Request and returns a specific league.
    java.util.List<League> list()
    Request and return the list of all leagues.
    java.util.List<League> list​(boolean subscribedOnly)
    Request and return the list of all leagues.
    java.util.List<League> list​(int countryId)
    Request and return the list of leagues in a country.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LeaguesClient

      public LeaguesClient​(javax.ws.rs.client.WebTarget target)
      Constructor.
      Parameters:
      target - - the target to request
  • Method Details

    • list

      public java.util.List<League> list()
      Request and return the list of all leagues.

      Same as list(false);

      Returns:
      list of leagues
    • list

      public java.util.List<League> list​(boolean subscribedOnly)
      Request and return the list of all leagues.
      Parameters:
      subscribedOnly - - limit result to subscribed leagues only
      Returns:
      list of leagues
    • list

      public java.util.List<League> list​(int countryId)
      Request and return the list of leagues in a country.
      Parameters:
      countryId - - list leagues of this country only
      Returns:
      list of leagues
    • get

      public League get​(int id)
      Request and returns a specific league.
      Parameters:
      id - - id of league
      Returns:
      the league requested or null