Nextcloud News implementation testing

This commit is contained in:
Shinokuni 2019-01-12 14:57:46 +00:00
parent 82c9f1afca
commit 808135f891
6 changed files with 58 additions and 7 deletions

Binary file not shown.

View File

@ -26,11 +26,6 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:converter-simplexml:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
}

View File

@ -32,6 +32,7 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'org.simpleframework:simple-xml:2.7.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:converter-simplexml:2.4.0'
}

View File

@ -0,0 +1,12 @@
package com.readrops.readropslibrary.services;
import com.readrops.readropslibrary.services.nextcloudnews.Folders;
import io.reactivex.Observable;
import retrofit2.http.GET;
public interface NextCloudNewsAPI {
@GET("folders")
Observable<Folders> getFolders();
}

View File

@ -0,0 +1,28 @@
package com.readrops.readropslibrary.services.nextcloudnews;
import com.google.gson.annotations.SerializedName;
public class Folder {
@SerializedName("id")
private int id;
@SerializedName("name")
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@ -0,0 +1,15 @@
package com.readrops.readropslibrary.services.nextcloudnews;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class Folders {
@SerializedName("folders")
private List<Folder> folders;
public List<Folder> getFolders() {
return folders;
}
}