Package de.sonallux.spotify.core
Class EndpointHelper
- java.lang.Object
-
- de.sonallux.spotify.core.EndpointHelper
-
public class EndpointHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description EndpointHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfixDuplicateEndpointParameters(SpotifyWebApi spotifyWebApi)Fixes duplicated endpoint parameters.static voidfixDuplicateEndpointParameters(SpotifyWebApiEndpoint endpoint)Fixes duplicated endpoint parameters.static voidsplitEndpoints(SpotifyWebApi spotifyWebApi)
-
-
-
Method Detail
-
splitEndpoints
public static void splitEndpoints(SpotifyWebApi spotifyWebApi) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
fixDuplicateEndpointParameters
public static void fixDuplicateEndpointParameters(SpotifyWebApi spotifyWebApi)
Fixes duplicated endpoint parameters. Some endpoints allow to pass data either via query argument or via body. As the url has a length limit, passing to much data in the query string might result in an error response. Therefore this method removes the option to pass the data via query argument and makes the body parameter mandatory.- Parameters:
spotifyWebApi- the spotify web api documentation
-
fixDuplicateEndpointParameters
public static void fixDuplicateEndpointParameters(SpotifyWebApiEndpoint endpoint)
Fixes duplicated endpoint parameters. Some endpoints allow to pass data either via query argument or via body. As the url has a length limit, passing to much data in the query string might result in an error response. Therefore this method removes the option to pass the data via query argument and makes the body parameter mandatory.- Parameters:
endpoint- the spotify api endpoint to fix
-
-