mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Implemented getLicense function
This commit is contained in:
parent
4053500080
commit
24ca36197c
2 changed files with 10 additions and 5 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue