Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
10 changed files with 72 additions and 269 deletions
-
9app/src/main/java/awais/instagrabber/adapters/SavedCollectionsAdapter.java
-
10app/src/main/java/awais/instagrabber/adapters/viewholder/TopicClusterViewHolder.java
-
14app/src/main/java/awais/instagrabber/fragments/CollectionPostsFragment.java
-
4app/src/main/java/awais/instagrabber/fragments/SavedCollectionsFragment.java
-
36app/src/main/java/awais/instagrabber/repositories/responses/notification/Notification.kt
-
64app/src/main/java/awais/instagrabber/repositories/responses/notification/NotificationCounts.kt
-
20app/src/main/java/awais/instagrabber/repositories/responses/notification/NotificationImage.kt
-
62app/src/main/java/awais/instagrabber/repositories/responses/saved/CollectionsListResponse.kt
-
66app/src/main/java/awais/instagrabber/repositories/responses/saved/SavedCollection.kt
-
56app/src/main/java/awais/instagrabber/repositories/responses/search/SearchResponse.kt
@ -1,29 +1,11 @@ |
|||
package awais.instagrabber.repositories.responses.notification; |
|||
package awais.instagrabber.repositories.responses.notification |
|||
|
|||
import awais.instagrabber.models.enums.NotificationType; |
|||
import awais.instagrabber.models.enums.NotificationType |
|||
import awais.instagrabber.models.enums.NotificationType.Companion.valueOfType |
|||
|
|||
public class Notification { |
|||
private final NotificationArgs args; |
|||
private final int storyType; |
|||
private final String pk; |
|||
|
|||
public Notification(final NotificationArgs args, |
|||
final int storyType, |
|||
final String pk) { |
|||
this.args = args; |
|||
this.storyType = storyType; |
|||
this.pk = pk; |
|||
} |
|||
|
|||
public NotificationArgs getArgs() { |
|||
return args; |
|||
} |
|||
|
|||
public NotificationType getType() { |
|||
return NotificationType.valueOfType(storyType); |
|||
} |
|||
|
|||
public String getPk() { |
|||
return pk; |
|||
} |
|||
} |
|||
class Notification(val args: NotificationArgs, |
|||
private val storyType: Int, |
|||
val pk: String) { |
|||
val type: NotificationType? |
|||
get() = valueOfType(storyType) |
|||
} |
@ -1,55 +1,9 @@ |
|||
package awais.instagrabber.repositories.responses.notification; |
|||
|
|||
public class NotificationCounts { |
|||
private final int commentLikes; |
|||
private final int usertags; |
|||
private final int likes; |
|||
private final int comments; |
|||
private final int relationships; |
|||
private final int photosOfYou; |
|||
private final int requests; |
|||
|
|||
public NotificationCounts(final int commentLikes, |
|||
final int usertags, |
|||
final int likes, |
|||
final int comments, |
|||
final int relationships, |
|||
final int photosOfYou, |
|||
final int requests) { |
|||
this.commentLikes = commentLikes; |
|||
this.usertags = usertags; |
|||
this.likes = likes; |
|||
this.comments = comments; |
|||
this.relationships = relationships; |
|||
this.photosOfYou = photosOfYou; |
|||
this.requests = requests; |
|||
} |
|||
|
|||
public int getRelationshipsCount() { |
|||
return relationships; |
|||
} |
|||
|
|||
public int getUserTagsCount() { |
|||
return usertags; |
|||
} |
|||
|
|||
public int getCommentsCount() { |
|||
return comments; |
|||
} |
|||
|
|||
public int getCommentLikesCount() { |
|||
return commentLikes; |
|||
} |
|||
|
|||
public int getLikesCount() { |
|||
return likes; |
|||
} |
|||
|
|||
public int getPOYCount() { |
|||
return photosOfYou; |
|||
} |
|||
|
|||
public int getRequestsCount() { |
|||
return requests; |
|||
} |
|||
} |
|||
package awais.instagrabber.repositories.responses.notification |
|||
|
|||
class NotificationCounts(val commentLikesCount: Int, |
|||
val userTagsCount: Int, |
|||
val likesCount: Int, |
|||
val commentsCount: Int, |
|||
val relationshipsCount: Int, |
|||
val pOYCount: Int, |
|||
val requestsCount: Int) |
@ -1,19 +1,3 @@ |
|||
package awais.instagrabber.repositories.responses.notification; |
|||
package awais.instagrabber.repositories.responses.notification |
|||
|
|||
public class NotificationImage { |
|||
private final String id; |
|||
private final String image; |
|||
|
|||
public NotificationImage(final String id, final String image) { |
|||
this.id = id; |
|||
this.image = image; |
|||
} |
|||
|
|||
public String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public String getImage() { |
|||
return image; |
|||
} |
|||
} |
|||
class NotificationImage(val id: String, val image: String) |
@ -1,50 +1,12 @@ |
|||
package awais.instagrabber.repositories.responses.saved; |
|||
|
|||
import java.util.List; |
|||
|
|||
public class CollectionsListResponse { |
|||
private final boolean moreAvailable; |
|||
private final String nextMaxId; |
|||
private final String maxId; |
|||
private final String status; |
|||
// private final int numResults; |
|||
private final List<SavedCollection> items; |
|||
|
|||
public CollectionsListResponse(final boolean moreAvailable, |
|||
final String nextMaxId, |
|||
final String maxId, |
|||
final String status, |
|||
// final int numResults, |
|||
final List<SavedCollection> items) { |
|||
this.moreAvailable = moreAvailable; |
|||
this.nextMaxId = nextMaxId; |
|||
this.maxId = maxId; |
|||
this.status = status; |
|||
// this.numResults = numResults; |
|||
this.items = items; |
|||
} |
|||
|
|||
public boolean isMoreAvailable() { |
|||
return moreAvailable; |
|||
} |
|||
|
|||
public String getNextMaxId() { |
|||
return nextMaxId; |
|||
} |
|||
|
|||
public String getMaxId() { |
|||
return maxId; |
|||
} |
|||
|
|||
public String getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
// public int getNumResults() { |
|||
// return numResults; |
|||
// } |
|||
|
|||
public List<SavedCollection> getItems() { |
|||
return items; |
|||
} |
|||
} |
|||
package awais.instagrabber.repositories.responses.saved |
|||
|
|||
class CollectionsListResponse // this.numResults = numResults; |
|||
(val isMoreAvailable: Boolean, |
|||
val nextMaxId: String, |
|||
val maxId: String, |
|||
val status: String, // final int numResults, |
|||
// public int getNumResults() { |
|||
// return numResults; |
|||
// } |
|||
// private final int numResults; |
|||
val items: List<SavedCollection>) |
@ -1,54 +1,12 @@ |
|||
package awais.instagrabber.repositories.responses.saved; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
import awais.instagrabber.repositories.responses.Media; |
|||
|
|||
public class SavedCollection implements Serializable { |
|||
private final String collectionId; |
|||
private final String collectionName; |
|||
private final String collectionType; |
|||
private final int collectionMediacount; |
|||
private final Media coverMedia; |
|||
private final List<Media> coverMediaList; |
|||
|
|||
public SavedCollection(final String collectionId, |
|||
final String collectionName, |
|||
final String collectionType, |
|||
final int collectionMediacount, |
|||
final Media coverMedia, |
|||
final List<Media> coverMediaList) { |
|||
this.collectionId = collectionId; |
|||
this.collectionName = collectionName; |
|||
this.collectionType = collectionType; |
|||
this.collectionMediacount = collectionMediacount; |
|||
this.coverMedia = coverMedia; |
|||
this.coverMediaList = coverMediaList; |
|||
} |
|||
|
|||
public String getId() { |
|||
return collectionId; |
|||
} |
|||
|
|||
public String getTitle() { |
|||
return collectionName; |
|||
} |
|||
|
|||
public String getType() { |
|||
return collectionType; |
|||
} |
|||
|
|||
public int getMediaCount() { |
|||
return collectionMediacount; |
|||
} |
|||
|
|||
// check the list first, then the single |
|||
// i have no idea what condition is required |
|||
|
|||
public Media getCoverMedia() { return coverMedia; } |
|||
|
|||
public List<Media> getCoverMedias() { |
|||
return coverMediaList; |
|||
} |
|||
} |
|||
package awais.instagrabber.repositories.responses.saved |
|||
|
|||
import awais.instagrabber.repositories.responses.Media |
|||
import java.io.Serializable |
|||
|
|||
class SavedCollection(val collectionId: String, |
|||
val collectionName: String, |
|||
val collectionType: String, |
|||
val collectionMediaCount: Int, |
|||
// coverMedia or coverMediaList: only one is defined |
|||
val coverMedia: Media, |
|||
val coverMediaList: List<Media>) : Serializable |
@ -1,46 +1,10 @@ |
|||
package awais.instagrabber.repositories.responses.search; |
|||
|
|||
import java.util.List; |
|||
|
|||
public class SearchResponse { |
|||
// app |
|||
private final List<SearchItem> list; |
|||
// browser |
|||
private final List<SearchItem> users; |
|||
private final List<SearchItem> places; |
|||
private final List<SearchItem> hashtags; |
|||
// universal |
|||
private final String status; |
|||
|
|||
public SearchResponse(final List<SearchItem> list, |
|||
final List<SearchItem> users, |
|||
final List<SearchItem> places, |
|||
final List<SearchItem> hashtags, |
|||
final String status) { |
|||
this.list = list; |
|||
this.users = users; |
|||
this.places = places; |
|||
this.hashtags = hashtags; |
|||
this.status = status; |
|||
} |
|||
|
|||
public List<SearchItem> getList() { |
|||
return list; |
|||
} |
|||
|
|||
public List<SearchItem> getUsers() { |
|||
return users; |
|||
} |
|||
|
|||
public List<SearchItem> getPlaces() { |
|||
return places; |
|||
} |
|||
|
|||
public List<SearchItem> getHashtags() { |
|||
return hashtags; |
|||
} |
|||
|
|||
public String getStatus() { |
|||
return status; |
|||
} |
|||
} |
|||
package awais.instagrabber.repositories.responses.search |
|||
|
|||
class SearchResponse(// app |
|||
val list: List<SearchItem>, |
|||
// browser |
|||
val users: List<SearchItem>, |
|||
val places: List<SearchItem>, |
|||
val hashtags: List<SearchItem>, |
|||
// universal |
|||
val status: String) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue