Search in sources :

Example 1 with SystemVersion

use of com.nutomic.syncthingandroid.model.SystemVersion in project syncthing-android by syncthing.

the class RestApi method getSystemVersion.

/**
 * Requests and parses system version information.
 */
public void getSystemVersion(OnResultListener1<SystemVersion> listener) {
    new GetRequest(mContext, mUrl, GetRequest.URI_VERSION, mApiKey, null, result -> {
        SystemVersion systemVersion = new Gson().fromJson(result, SystemVersion.class);
        listener.onResult(systemVersion);
    });
}
Also used : GetRequest(com.nutomic.syncthingandroid.http.GetRequest) Gson(com.google.gson.Gson) SystemVersion(com.nutomic.syncthingandroid.model.SystemVersion)

Aggregations

Gson (com.google.gson.Gson)1 GetRequest (com.nutomic.syncthingandroid.http.GetRequest)1 SystemVersion (com.nutomic.syncthingandroid.model.SystemVersion)1