Implemented getLicense function
This commit is contained in:
@@ -5,9 +5,6 @@ import android.util.Log;
|
|||||||
import com.cappielloantonio.play.subsonic.Subsonic;
|
import com.cappielloantonio.play.subsonic.Subsonic;
|
||||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.logging.HttpLoggingInterceptor;
|
import okhttp3.logging.HttpLoggingInterceptor;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@@ -34,10 +31,15 @@ public class SystemClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Call<SubsonicResponse> ping() {
|
public Call<SubsonicResponse> ping() {
|
||||||
Log.d(TAG, "Requesting ping");
|
Log.d(TAG, "ping()");
|
||||||
return systemService.ping(subsonic.getParams());
|
return systemService.ping(subsonic.getParams());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Call<SubsonicResponse> getLicense() {
|
||||||
|
Log.d(TAG, "getLicense()");
|
||||||
|
return systemService.getLicense(subsonic.getParams());
|
||||||
|
}
|
||||||
|
|
||||||
private OkHttpClient getOkHttpClient() {
|
private OkHttpClient getOkHttpClient() {
|
||||||
return new OkHttpClient.Builder()
|
return new OkHttpClient.Builder()
|
||||||
.addInterceptor(getHttpLoggingInterceptor())
|
.addInterceptor(getHttpLoggingInterceptor())
|
||||||
|
|||||||
@@ -11,4 +11,7 @@ import retrofit2.http.QueryMap;
|
|||||||
public interface SystemService {
|
public interface SystemService {
|
||||||
@GET("ping")
|
@GET("ping")
|
||||||
Call<SubsonicResponse> ping(@QueryMap Map<String, String> params);
|
Call<SubsonicResponse> ping(@QueryMap Map<String, String> params);
|
||||||
|
|
||||||
|
@GET("getLicense")
|
||||||
|
Call<SubsonicResponse> getLicense(@QueryMap Map<String, String> params);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user