Implemented getLicense function

This commit is contained in:
CappielloAntonio 2021-07-24 14:51:50 +02:00
parent 4053500080
commit 24ca36197c
2 changed files with 10 additions and 5 deletions

View file

@ -5,9 +5,6 @@ import android.util.Log;
import com.cappielloantonio.play.subsonic.Subsonic;
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
import java.util.List;
import java.util.Map;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Call;
@ -34,10 +31,15 @@ public class SystemClient {
}
public Call<SubsonicResponse> ping() {
Log.d(TAG, "Requesting ping");
Log.d(TAG, "ping()");
return systemService.ping(subsonic.getParams());
}
public Call<SubsonicResponse> getLicense() {
Log.d(TAG, "getLicense()");
return systemService.getLicense(subsonic.getParams());
}
private OkHttpClient getOkHttpClient() {
return new OkHttpClient.Builder()
.addInterceptor(getHttpLoggingInterceptor())

View file

@ -11,4 +11,7 @@ import retrofit2.http.QueryMap;
public interface SystemService {
@GET("ping")
Call<SubsonicResponse> ping(@QueryMap Map<String, String> params);
@GET("getLicense")
Call<SubsonicResponse> getLicense(@QueryMap Map<String, String> params);
}