Class LoadServerInfo

java.lang.Object
com.lariflix.jemm.core.LoadServerInfo

public class LoadServerInfo extends Object
The LoadServerInfo class is responsible for loading server information from a Jellyfin instance. It uses the Jellyfin API to request server information and parse the response.
Since:
1.2.0
Version:
1.0
Author:
CesarBianchi
See Also:
  • Constructor Details

    • LoadServerInfo

      public LoadServerInfo()
      Default constructor for the LoadServerInfo class.
      Since:
      1.2.0
    • LoadServerInfo

      public LoadServerInfo(String url, String apiToken)
      Constructor for the LoadServerInfo class with parameters.
      Parameters:
      url - The URL of the Jellyfin instance.
      apiToken - The API token for authentication.
      Since:
      1.2.0
  • Method Details

    • getJellyfinInstanceUrl

      public String getJellyfinInstanceUrl()
      Gets the URL of the Jellyfin instance.
      Returns:
      The URL of the Jellyfin instance.
      Since:
      1.2.0
    • setJellyfinInstanceUrl

      public void setJellyfinInstanceUrl(String jellyfinInstanceUrl)
      Sets the URL of the Jellyfin instance.
      Parameters:
      jellyfinInstanceUrl - The URL of the Jellyfin instance.
      Since:
      1.2.0
    • getApiToken

      public String getApiToken()
      Gets the API token for authentication.
      Returns:
      The API token.
      Since:
      1.2.0
    • setApiToken

      public void setApiToken(String apiToken)
      Sets the API token for authentication.
      Parameters:
      apiToken - The API token.
      Since:
      1.2.0
    • requestServerInfo

      public JellyfinServerInfo requestServerInfo() throws MalformedURLException, IOException, org.json.simple.parser.ParseException
      Requests server information from the Jellyfin instance.
      Returns:
      A JellyfinServerInfo object containing the server information.
      Throws:
      MalformedURLException - If the URL is malformed.
      IOException - If an I/O error occurs.
      org.json.simple.parser.ParseException - If a parsing error occurs.
      Since:
      1.2.0
    • getFullURL

      public String getFullURL()
      Gets the full URL for the API request, including the API token.
      Returns:
      The full URL for the API request.
      Since:
      1.2.0