I am new to java and I am trying to do some URL encoding to retrieve plex livetv directories with GET command. The issue I am having is with the colon ":" if I use the colon, I get this error, but if I use URL encoding "tv.plex.providers.epg.onconnect%3A23" I get a blank livetv library.
What is the proper way to define URL encoding for the ":" string?
Malformed URL. Base: http://192.168.1.50:32400/, Relative: tv.plex.providers.epg.onconnect:23/sections
public interface PlexMediaContainerService {
@GET("/")
Call<MediaContainer> retrieveRoot();
@GET("tv.plex.providers.epg.onconnect%3A23")
Call<MediaContainer> retrieveLibrary();
@GET("tv.plex.providers.epg.onconnect%3A23/sections")
Call<MediaContainer> retrieveSections();
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}")
Call<MediaContainer> retrieveSections(@Path("key") String key);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/{category}")
Call<MediaContainer> retrieveSections(@Path("key") String key,
@Path(value = "category", encoded = true) String category);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/{category}/{secondaryCategory}")
Call<MediaContainer> retrieveSections(@Path("key") String key,
@Path(value = "category", encoded = true) String category,
@Path(value = "secondaryCategory", encoded = true) String secondaryCategory);
@GET("{urlPath}")
Call<MediaContainer> retrieveItemByUrlPath(@Path(value = "urlPath", encoded = true) String key);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/search?type=1")
Call<MediaContainer> movieSearch(@Path("key") String key,
@Query("query") String query);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/search?type=2")
Call<MediaContainer> tvShowsSearch(@Path("key") String key,
@Query("query") String query);
@GET("tv.plex.providers.epg.onconnect%3A23/sections/{key}/search?type=4")
Call<MediaContainer> episodeSearch(@Path("key") String key,
@Query("query") String query);
}