|
@ -5,20 +5,19 @@ import java.io.Serializable; |
|
|
import awais.instagrabber.models.enums.MediaItemType; |
|
|
import awais.instagrabber.models.enums.MediaItemType; |
|
|
|
|
|
|
|
|
public final class PostChild implements Serializable { |
|
|
public final class PostChild implements Serializable { |
|
|
private String postId; |
|
|
|
|
|
private MediaItemType itemType; |
|
|
|
|
|
private String displayUrl; |
|
|
|
|
|
|
|
|
private final String postId; |
|
|
|
|
|
private final String displayUrl; |
|
|
|
|
|
private final String shortCode; |
|
|
|
|
|
private final MediaItemType itemType; |
|
|
private final String thumbnailUrl; |
|
|
private final String thumbnailUrl; |
|
|
private final long videoViews; |
|
|
private final long videoViews; |
|
|
private int width; |
|
|
|
|
|
private int height; |
|
|
|
|
|
|
|
|
private final int width; |
|
|
|
|
|
private final int height; |
|
|
|
|
|
|
|
|
public static class Builder { |
|
|
public static class Builder { |
|
|
private String postId; |
|
|
|
|
|
|
|
|
private String postId, displayUrl, shortCode, thumbnailUrl; |
|
|
private MediaItemType itemType; |
|
|
private MediaItemType itemType; |
|
|
private String displayUrl; |
|
|
|
|
|
private long videoViews; |
|
|
private long videoViews; |
|
|
private String thumbnailUrl; |
|
|
|
|
|
private int width; |
|
|
private int width; |
|
|
private int height; |
|
|
private int height; |
|
|
|
|
|
|
|
@ -27,6 +26,11 @@ public final class PostChild implements Serializable { |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Builder setShortCode(final String shortCode) { |
|
|
|
|
|
this.shortCode = shortCode; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public Builder setItemType(final MediaItemType itemType) { |
|
|
public Builder setItemType(final MediaItemType itemType) { |
|
|
this.itemType = itemType; |
|
|
this.itemType = itemType; |
|
|
return this; |
|
|
return this; |
|
@ -58,11 +62,12 @@ public final class PostChild implements Serializable { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public PostChild build() { |
|
|
public PostChild build() { |
|
|
return new PostChild(postId, itemType, displayUrl, thumbnailUrl, videoViews, height, width); |
|
|
|
|
|
|
|
|
return new PostChild(postId, shortCode, itemType, displayUrl, thumbnailUrl, videoViews, height, width); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public PostChild(final String postId, |
|
|
public PostChild(final String postId, |
|
|
|
|
|
final String shortCode, |
|
|
final MediaItemType itemType, |
|
|
final MediaItemType itemType, |
|
|
final String displayUrl, |
|
|
final String displayUrl, |
|
|
final String thumbnailUrl, |
|
|
final String thumbnailUrl, |
|
@ -70,6 +75,7 @@ public final class PostChild implements Serializable { |
|
|
final int height, |
|
|
final int height, |
|
|
final int width) { |
|
|
final int width) { |
|
|
this.postId = postId; |
|
|
this.postId = postId; |
|
|
|
|
|
this.shortCode = shortCode; |
|
|
this.itemType = itemType; |
|
|
this.itemType = itemType; |
|
|
this.displayUrl = displayUrl; |
|
|
this.displayUrl = displayUrl; |
|
|
this.thumbnailUrl = thumbnailUrl; |
|
|
this.thumbnailUrl = thumbnailUrl; |
|
@ -82,6 +88,10 @@ public final class PostChild implements Serializable { |
|
|
return postId; |
|
|
return postId; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getShortCode() { |
|
|
|
|
|
return shortCode; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public MediaItemType getItemType() { |
|
|
public MediaItemType getItemType() { |
|
|
return itemType; |
|
|
return itemType; |
|
|
} |
|
|
} |
|
@ -110,6 +120,7 @@ public final class PostChild implements Serializable { |
|
|
public String toString() { |
|
|
public String toString() { |
|
|
return "PostChild{" + |
|
|
return "PostChild{" + |
|
|
"postId='" + postId + '\'' + |
|
|
"postId='" + postId + '\'' + |
|
|
|
|
|
", shortCode=" + shortCode + |
|
|
", itemType=" + itemType + |
|
|
", itemType=" + itemType + |
|
|
", displayUrl='" + displayUrl + '\'' + |
|
|
", displayUrl='" + displayUrl + '\'' + |
|
|
", thumbnailUrl='" + thumbnailUrl + '\'' + |
|
|
", thumbnailUrl='" + thumbnailUrl + '\'' + |
|
|