Package com.lariflix.jemm.core
Class LoadUsers
java.lang.Object
com.lariflix.jemm.core.LoadUsers
This class is responsible for loading users from the Jellyfin server.
- Since:
- 1.0
- Author:
- Cesar Bianchi
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the API token.Constructs the full URL for accessing the users on the Jellyfin server.Gets the Jellyfin instance URL.Requests users from the Jellyfin server.void
setApiToken
(String apiToken) Sets the API token.void
setJellyfinInstanceUrl
(String jellyfinInstance) Sets the Jellyfin instance URL.
-
Constructor Details
-
LoadUsers
public LoadUsers()Default constructor for the LoadUsers class.- Since:
- 1.0
-
LoadUsers
Constructor for the LoadUsers class.- Parameters:
jellyfinURL
- The URL of the Jellyfin server.apiToken
- The API token for accessing the Jellyfin server.- Since:
- 1.0
-
-
Method Details
-
requestUsers
public JellyfinUsers requestUsers() throws MalformedURLException, IOException, org.json.simple.parser.ParseExceptionRequests users from the Jellyfin server.- Returns:
- A JellyfinUsers object containing the users.
- Throws:
MalformedURLException
- If the provided URL is not valid.IOException
- If an I/O error occurs.org.json.simple.parser.ParseException
- If there is an error parsing the server's response.- Since:
- 1.0
-
getJellyfinInstanceUrl
Gets the Jellyfin instance URL.- Returns:
- The Jellyfin instance URL.
- Since:
- 1.0
-
setJellyfinInstanceUrl
Sets the Jellyfin instance URL.- Parameters:
jellyfinInstance
- The Jellyfin instance URL.- Since:
- 1.0
-
getApiToken
Gets the API token.- Returns:
- The API token.
- Since:
- 1.0
-
setApiToken
Sets the API token.- Parameters:
apiToken
- The API token.- Since:
- 1.0
-
getFullURL
Constructs the full URL for accessing the users on the Jellyfin server.- Returns:
- The full URL as a string.
- Since:
- 1.0
-