mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 09:33:33 +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.models.SubsonicResponse;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.logging.HttpLoggingInterceptor;
|
||||
import retrofit2.Call;
|
||||
|
|
@ -33,11 +30,16 @@ public class SystemClient {
|
|||
this.systemService = retrofit.create(SystemService.class);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> ping(){
|
||||
Log.d(TAG, "Requesting ping");
|
||||
public Call<SubsonicResponse> 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())
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue