-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove boilerplace, add model methods - Replace client with custom Call, add getter in some model - Only affects highlight class
- Loading branch information
Showing
23 changed files
with
1,137 additions
and
1,152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
app/src/main/java/com/xeroxparc/pokedex/data/model/utility/common/ResourceList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.xeroxparc.pokedex.data.model.utility.common; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Fabio Buracchi | ||
*/ | ||
public class ResourceList<T> { | ||
|
||
// The total number of resources available from this API. | ||
@SerializedName("count") | ||
private Integer count; | ||
|
||
// The next page number in the list. | ||
@Nullable | ||
@SerializedName("next") | ||
private Integer nextPageNumber; | ||
|
||
// The previous page number in the list | ||
@Nullable | ||
@SerializedName("previous") | ||
private Integer previousPageNumber; | ||
|
||
// A list of resources. | ||
@SerializedName("results") | ||
private List<T> results; | ||
|
||
public Integer getCount() { | ||
return count; | ||
} | ||
|
||
@Nullable | ||
public Integer getNextPageNumber() { | ||
return nextPageNumber; | ||
} | ||
|
||
@Nullable | ||
public Integer getPreviousPageNumber() { | ||
return previousPageNumber; | ||
} | ||
|
||
public List<T> getResults() { | ||
return results; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
app/src/main/java/com/xeroxparc/pokedex/data/remote/ApiError.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.