Creacion de nuevas clases y de nuevos xml, funcionamiento de la api de animelist , tambien ya se consume los datos del anime list y ya puedo adaptar el anime, es decir puedo añadir y editar flata por implementar eliminar!
This commit is contained in:
parent
8d22a6d7da
commit
6b2d0c09ce
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.santiparra.yomitrack.model;
|
||||||
|
|
||||||
|
public class AniListMedia {
|
||||||
|
private int id;
|
||||||
|
private String title;
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
|
public AniListMedia() {}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImageUrl() {
|
||||||
|
return imageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageUrl(String imageUrl) {
|
||||||
|
this.imageUrl = imageUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.santiparra.yomitrack.model;
|
||||||
|
|
||||||
|
import com.santiparra.yomitrack.db.entities.AnimeEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AnimePageResponse {
|
||||||
|
private List<AnimeEntity> data;
|
||||||
|
private int total;
|
||||||
|
private int page;
|
||||||
|
private boolean hasNextPage;
|
||||||
|
|
||||||
|
public List<AnimeEntity> getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTotal() {
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPage() {
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHasNextPage() {
|
||||||
|
return hasNextPage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.santiparra.yomitrack.model;
|
||||||
|
|
||||||
|
import com.santiparra.yomitrack.db.entities.MangaEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MangaPageResponse {
|
||||||
|
private List<MangaEntity> data;
|
||||||
|
private int total;
|
||||||
|
private int page;
|
||||||
|
private boolean hasNextPage;
|
||||||
|
|
||||||
|
public List<MangaEntity> getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTotal() {
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPage() {
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHasNextPage() {
|
||||||
|
return hasNextPage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.santiparra.yomitrack.model;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class UserStatsResponse {
|
||||||
|
|
||||||
|
@SerializedName("anime")
|
||||||
|
private Map<String, Integer> animeStats;
|
||||||
|
|
||||||
|
@SerializedName("manga")
|
||||||
|
private Map<String, Integer> mangaStats;
|
||||||
|
|
||||||
|
public Map<String, Integer> getAnimeStats() {
|
||||||
|
return animeStats;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Integer> getMangaStats() {
|
||||||
|
return mangaStats;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.santiparra.yomitrack.utils;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class ActivityLog {
|
||||||
|
|
||||||
|
@SerializedName("action")
|
||||||
|
private String action;
|
||||||
|
|
||||||
|
@SerializedName("mediaTitle")
|
||||||
|
private String mediaTitle;
|
||||||
|
|
||||||
|
@SerializedName("timestamp")
|
||||||
|
private String timestamp;
|
||||||
|
|
||||||
|
public String getAction() { return action; }
|
||||||
|
|
||||||
|
public String getMediaTitle() { return mediaTitle; }
|
||||||
|
|
||||||
|
public String getTimestamp() { return timestamp; }
|
||||||
|
}
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@color/primary" />
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
<padding android:left="8dp" android:top="8dp" android:right="8dp" android:bottom="8dp" />
|
||||||
|
<elevation android:height="2dp" />
|
||||||
|
</shape>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 162 B |
Loading…
Reference in New Issue