Package com.restfb.types.instagram
Class IgMedia
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.FacebookType
-
- com.restfb.types.instagram.IgMediaChild
-
- com.restfb.types.instagram.IgMedia
-
- All Implemented Interfaces:
Serializable
public class IgMedia extends IgMediaChild
Represents the instagram media type- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata
-
-
Constructor Summary
Constructors Constructor Description IgMedia()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
addChild(Insight insight)
boolean
addChild(IgMediaChild child)
adds a new child to the children listboolean
addComment(IgComment comment)
String
getCaption()
List<IgMediaChild>
getChildren()
returns the list of child media objects, only available if the media_type is a carousalList<IgComment>
getComments()
returns the comments of this mediaLong
getCommentsCount()
Count of comments on the media.List<Insight>
getInsights()
Boolean
getIsCommentEnabled()
Indicates if comments are enabled or disabled.Boolean
getIsSharedToFeed()
Reels only.Long
getLikeCount()
Count of likes on the media.String
getThumbnailUrl()
Media thumbnail URL.String
getVideoTitle()
Deprecated.Omitted from response.boolean
removeChild(Insight insight)
boolean
removeChild(IgMediaChild child)
removes a new child from the children listboolean
removeComment(IgComment comment)
void
setCaption(String caption)
void
setCommentsCount(Long commentsCount)
Count of comments on the media.void
setIsCommentEnabled(Boolean isCommentEnabled)
Indicates if comments are enabled or disabled.void
setIsSharedToFeed(Boolean isSharedToFeed)
Reels only.void
setLikeCount(Long likeCount)
Count of likes on the media.void
setThumbnailUrl(String thumbnailUrl)
Media thumbnail URL.void
setVideoTitle(String videoTitle)
Deprecated.Omitted from response.-
Methods inherited from class com.restfb.types.instagram.IgMediaChild
getIgId, getMediaProductType, getMediaType, getMediaUrl, getOwner, getPermalink, getShortcode, getTimestamp, getUsername, setIgId, setMediaProductType, setMediaType, setMediaUrl, setOwner, setPermalink, setShortcode, setTimestamp, setUsername
-
Methods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setType
-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
IgMedia
public IgMedia()
-
-
Method Detail
-
getChildren
public List<IgMediaChild> getChildren()
returns the list of child media objects, only available if the media_type is a carousal- Returns:
- the list of children as unmodifiable list
-
addChild
public boolean addChild(IgMediaChild child)
adds a new child to the children list- Parameters:
child
- the child that is added- Returns:
- true if adding the child works
-
removeChild
public boolean removeChild(IgMediaChild child)
removes a new child from the children list- Parameters:
child
- the child that is removed- Returns:
- true if removing the child works
-
getInsights
public List<Insight> getInsights()
-
removeChild
public boolean removeChild(Insight insight)
-
getComments
public List<IgComment> getComments()
returns the comments of this media- Returns:
- the comments of this media
-
addComment
public boolean addComment(IgComment comment)
-
removeComment
public boolean removeComment(IgComment comment)
-
getCaption
public String getCaption()
-
setCaption
public void setCaption(String caption)
-
getCommentsCount
public Long getCommentsCount()
Count of comments on the media. Excludes comments on album child media and the media's caption. Includes replies on comments.
-
setCommentsCount
public void setCommentsCount(Long commentsCount)
Count of comments on the media. Excludes comments on album child media and the media's caption. Includes replies on comments.
-
getIsCommentEnabled
public Boolean getIsCommentEnabled()
Indicates if comments are enabled or disabled. Excludes album children.
-
setIsCommentEnabled
public void setIsCommentEnabled(Boolean isCommentEnabled)
Indicates if comments are enabled or disabled. Excludes album children.
-
getIsSharedToFeed
public Boolean getIsSharedToFeed()
Reels only. Iftrue
, indicates the reel can appear in both the Feed and Reels tabs. Iffalse
, indicates the reel can only appear in the Reels tab.
-
setIsSharedToFeed
public void setIsSharedToFeed(Boolean isSharedToFeed)
Reels only. Iftrue
, indicates the reel can appear in both the Feed and Reels tabs. Iffalse
, indicates the reel can only appear in the Reels tab.
-
getLikeCount
public Long getLikeCount()
Count of likes on the media. Excludes likes on album child media and likes on promoted posts created from the media. Includes replies on comments.- v10.0 and older calls: value will be 0 if the media owner has hidden like counts it.
- v11.0+ calls: field will be omitted if media owner has hidden like counts on it.
-
setLikeCount
public void setLikeCount(Long likeCount)
Count of likes on the media. Excludes likes on album child media and likes on promoted posts created from the media. Includes replies on comments.- v10.0 and older calls: value will be 0 if the media owner has hidden like counts it.
- v11.0+ calls: field will be omitted if media owner has hidden like counts on it.
-
getThumbnailUrl
public String getThumbnailUrl()
Media thumbnail URL. Only available on VIDEO media.- Overrides:
getThumbnailUrl
in classIgMediaChild
-
setThumbnailUrl
public void setThumbnailUrl(String thumbnailUrl)
Media thumbnail URL. Only available on VIDEO media.- Overrides:
setThumbnailUrl
in classIgMediaChild
-
getVideoTitle
@Deprecated public String getVideoTitle()
Deprecated.Omitted from response.IGTV media title.
-
setVideoTitle
@Deprecated public void setVideoTitle(String videoTitle)
Deprecated.Omitted from response.IGTV media title.
-
-