Package com.restfb.types
Class Video
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.FacebookType
-
- com.restfb.types.NamedFacebookType
-
- com.restfb.types.Video
-
- All Implemented Interfaces:
HasComments
,HasCreatedTime
,HasMessage
,Serializable
public class Video extends NamedFacebookType implements HasComments, HasCreatedTime, HasMessage
Represents the Video Graph API type.- Since:
- 1.5
- Author:
- Mark Allen
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Video.Thumbnail
Represents the Video Thumbnail Graph API type.static class
Video.VideoFormat
Represents the Video Format Graph API type.static class
Video.VideoPhase
static class
Video.VideoPhaseError
static class
Video.VideoStatus
Represents the Video Status Graph API type.-
Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata
-
-
Constructor Summary
Constructors Constructor Description Video()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
addAdBreak(Integer adBreak)
boolean
addCaption(VideoCaption caption)
boolean
addContentTag(String contentTag)
boolean
addCustomLabel(String customLabel)
boolean
addFormat(Video.VideoFormat videoFormat)
boolean
addTag(NamedFacebookType tag)
List<Integer>
getAdBreaks()
Time offsets of ad breaks in milliseconds.Date
getBackdatedTime()
Back dated timeString
getBackdatedTimeGranularity()
String that represents the back dated time granularityList<VideoCaption>
getCaptions()
Comments
getComments()
The comments for this video.Long
getCommentsCount()
The number of comments of this video.String
getContentCategory()
The content category of this video.List<String>
getContentTags()
Tags that describe the contents of the video.Date
getCreatedTime()
The time the video was initially published.List<String>
getCustomLabels()
Labels used to describe the video.String
getDescription()
The long-form HTML description of the video.Boolean
getEmbeddable()
Whether the video is embeddable.String
getEmbedHtml()
HTML that may be used to embed the video on another website.Event
getEvent()
If this object has a place, the event associated with the place.String
getFeedType()
Whether or not the video is highlighted in Video Channel.List<Video.VideoFormat>
getFormat()
The different formats of the video.From
getFrom()
An object containing the name and ID of the user who posted the video.String
getIcon()
An icon URL which represents the video.Boolean
getIsCrosspostingEligible()
Specifies if the video is eligible for crossposting.Boolean
getIsCrosspostVideo()
Boolean
getIsEpisode()
Whether this video is episode or not.Boolean
getIsInstagramEligible()
Whether the video is eligible to be promoted on InstagramBoolean
getIsReferenceOnly()
Whether the video is exclusively used for copyright monitoring.Double
getLength()
The length of the video, in seconds.Likes
getLikes()
People who like this.Long
getLikesCount()
The number of likes on this video.Integer
getLiveAudienceCount()
Number of unique people who watched the video broadcast when it was live.String
getLiveStatus()
The live status of the video.String
getMessage()
Deprecated.FB seems to have removed this field.MusicVideoCopyright
getMusicVideoCopyright()
The music video copyright of this video because of a missing object description in the graph reference, we use a Map hereString
getPermalinkUrl()
URL to the permalink page of the videoString
getPicture()
A URL for the thumbnail picture of the video.Place
getPlace()
Location associated with the video, if any.Integer
getPostViews()
The public view count of the video post, not aggregated with any other crossposts of the video.String
getPremiereLivingRoomStatus()
The status of the Premiere Watch Party, if anyPrivacy
getPrivacy()
Privacy setting for the video.Boolean
getPublished()
Whether a post about this video is published.Reactions
getReactions()
The reactions for this video.Date
getScheduledPublishTime()
The time that the video is scheduled to be published.String
getSource()
A URL to the raw, playable video file.Video.VideoStatus
getStatus()
Object describing the status attributes of a video.List<NamedFacebookType>
getTags()
Tags for the video.Connection<Video.Thumbnail>
getThumbnails()
String
getTitle()
The video title or captionString
getUniversalVideoId()
The publishers asset management code for this video.Date
getUpdatedTime()
The last time the video or its caption were updated.Connection<Insight>
getVideoInsights()
Integer
getViews()
The public view count of the video.boolean
removeAdBreak(Integer adBreak)
boolean
removeCaption(VideoCaption caption)
boolean
removeContentTag(String contentTag)
boolean
removeCustomLabel(String customLabel)
boolean
removeFormat(Video.VideoFormat videoFormat)
boolean
removeTag(NamedFacebookType tag)
void
setBackdatedTime(Date backdatedTime)
Back dated timevoid
setBackdatedTimeGranularity(String backdatedTimeGranularity)
String that represents the back dated time granularityvoid
setComments(Comments comments)
The comments for this video.void
setContentCategory(String contentCategory)
The content category of this video.void
setCreatedTime(Date createdTime)
The time the video was initially published.void
setDescription(String description)
The long-form HTML description of the video.void
setEmbeddable(Boolean embeddable)
Whether the video is embeddable.void
setEmbedHtml(String embedHtml)
HTML that may be used to embed the video on another website.void
setEvent(Event event)
If this object has a place, the event associated with the place.void
setFeedType(String feedType)
Whether or not the video is highlighted in Video Channel.void
setFrom(From from)
An object containing the name and ID of the user who posted the video.void
setIcon(String icon)
An icon URL which represents the video.void
setIsCrosspostingEligible(Boolean isCrosspostingEligible)
Specifies if the video is eligible for crossposting.void
setIsCrosspostVideo(Boolean isCrosspostVideo)
void
setIsEpisode(Boolean isEpisode)
Whether this video is episode or not.void
setIsInstagramEligible(Boolean isInstagramEligible)
Whether the video is eligible to be promoted on Instagramvoid
setIsReferenceOnly(Boolean isReferenceOnly)
Whether the video is exclusively used for copyright monitoring.void
setLength(Double length)
The length of the video, in seconds.void
setLikes(Likes likes)
People who like this.void
setLiveAudienceCount(Integer liveAudienceCount)
Number of unique people who watched the video broadcast when it was live.void
setLiveStatus(String liveStatus)
The live status of the video.void
setMessage(String message)
Deprecated.FB seems to have removed this field.void
setMusicVideoCopyright(MusicVideoCopyright musicVideoCopyright)
The music video copyright of this video because of a missing object description in the graph reference, we use a Map herevoid
setPermalinkUrl(String permalinkUrl)
URL to the permalink page of the videovoid
setPicture(String picture)
A URL for the thumbnail picture of the video.void
setPlace(Place place)
Location associated with the video, if any.void
setPostViews(Integer postViews)
The public view count of the video post, not aggregated with any other crossposts of the video.void
setPremiereLivingRoomStatus(String premiereLivingRoomStatus)
The status of the Premiere Watch Party, if anyvoid
setPrivacy(Privacy privacy)
Privacy setting for the video.void
setPublished(Boolean published)
Whether a post about this video is published.void
setReactions(Reactions reactions)
The reactions for this video.void
setScheduledPublishTime(Date scheduledPublishTime)
The time that the video is scheduled to be published.void
setSource(String source)
A URL to the raw, playable video file.void
setStatus(Video.VideoStatus status)
Object describing the status attributes of a video.void
setThumbnails(Connection<Video.Thumbnail> thumbnails)
void
setTitle(String title)
The video title or captionvoid
setUniversalVideoId(String universalVideoId)
The publishers asset management code for this video.void
setUpdatedTime(Date updatedTime)
The last time the video or its caption were updated.void
setVideoInsights(Connection<Insight> videoInsights)
void
setViews(Integer views)
The public view count of the video.-
Methods inherited from class com.restfb.types.NamedFacebookType
getName, setName
-
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
-
Video
public Video()
-
-
Method Detail
-
getCaptions
public List<VideoCaption> getCaptions()
-
addCaption
public boolean addCaption(VideoCaption caption)
-
removeCaption
public boolean removeCaption(VideoCaption caption)
-
getFormat
public List<Video.VideoFormat> getFormat()
The different formats of the video.- Returns:
- The different formats of the video.
-
addFormat
public boolean addFormat(Video.VideoFormat videoFormat)
-
removeFormat
public boolean removeFormat(Video.VideoFormat videoFormat)
-
getTags
public List<NamedFacebookType> getTags()
Tags for the video.- Returns:
- Tags for the video.
- Since:
- 1.6.5
-
addTag
public boolean addTag(NamedFacebookType tag)
-
removeTag
public boolean removeTag(NamedFacebookType tag)
-
getContentTags
public List<String> getContentTags()
Tags that describe the contents of the video.- Returns:
- Tags that describe the contents of the video.
-
addContentTag
public boolean addContentTag(String contentTag)
-
removeContentTag
public boolean removeContentTag(String contentTag)
-
getAdBreaks
public List<Integer> getAdBreaks()
Time offsets of ad breaks in milliseconds. Ad breaks are short ads that play within a video.- Returns:
- Time offsets of ad breaks in milliseconds. Ad breaks are short ads that play within a video.
-
addAdBreak
public boolean addAdBreak(Integer adBreak)
-
removeAdBreak
public boolean removeAdBreak(Integer adBreak)
-
getCustomLabels
public List<String> getCustomLabels()
Labels used to describe the video. Unlike content tags, custom labels are not published and only appear in insights data.- Returns:
- Labels used to describe the video.
-
addCustomLabel
public boolean addCustomLabel(String customLabel)
-
removeCustomLabel
public boolean removeCustomLabel(String customLabel)
-
getLikesCount
public Long getLikesCount()
The number of likes on this video. you have to fetch the video id with?fields=likes.summary(true)
in order to speed up the likes count generation, you may use?fields=likes.limit(1).summary(true)
, so only 1 like is fetched, but the complete summary- Returns:
- The number of likes on this video.
-
getCommentsCount
public Long getCommentsCount()
The number of comments of this video. you have to fetch the video id with?fields=comments.summary(true)
in order to speed up the comments count generation, you may use?fields=comments.limit(1).summary(true)
, so only 1 comment is fetched, but the complete summary- Returns:
- The number of comments of this video.
-
getFrom
public From getFrom()
An object containing the name and ID of the user who posted the video.- Returns:
- An object containing the name and ID of the user who posted the video.
-
setFrom
public void setFrom(From from)
An object containing the name and ID of the user who posted the video.
-
getMessage
@Deprecated public String getMessage()
Deprecated.FB seems to have removed this field.The video title / caption.- Specified by:
getMessage
in interfaceHasMessage
- Returns:
- The video title / caption.
-
setMessage
@Deprecated public void setMessage(String message)
Deprecated.FB seems to have removed this field.The video title / caption.
-
getComments
public Comments getComments()
The comments for this video.- Specified by:
getComments
in interfaceHasComments
- Returns:
- The comments for this video.
-
setComments
public void setComments(Comments comments)
The comments for this video.
-
getDescription
public String getDescription()
The long-form HTML description of the video.- Returns:
- The long-form HTML description of the video.
-
setDescription
public void setDescription(String description)
The long-form HTML description of the video.
-
getPermalinkUrl
public String getPermalinkUrl()
URL to the permalink page of the video- Returns:
- URL to the permalink page of the video
-
setPermalinkUrl
public void setPermalinkUrl(String permalinkUrl)
URL to the permalink page of the video
-
getTitle
@GraphAPI(since="2.5") public String getTitle()
The video title or caption- Returns:
- the video title or caption
-
getIsCrosspostVideo
public Boolean getIsCrosspostVideo()
-
setIsCrosspostVideo
public void setIsCrosspostVideo(Boolean isCrosspostVideo)
-
getIsCrosspostingEligible
@GraphAPI(since="2.6") public Boolean getIsCrosspostingEligible()
Specifies if the video is eligible for crossposting.- Returns:
- Specifies if the video is eligible for crossposting
-
setIsCrosspostingEligible
public void setIsCrosspostingEligible(Boolean isCrosspostingEligible)
Specifies if the video is eligible for crossposting.
-
getIsEpisode
public Boolean getIsEpisode()
Whether this video is episode or not.- Returns:
- Whether this video is episode or not.
-
setIsEpisode
public void setIsEpisode(Boolean isEpisode)
Whether this video is episode or not.
-
getIsInstagramEligible
public Boolean getIsInstagramEligible()
Whether the video is eligible to be promoted on Instagram- Returns:
- Whether the video is eligible to be promoted on Instagram
-
setIsInstagramEligible
public void setIsInstagramEligible(Boolean isInstagramEligible)
Whether the video is eligible to be promoted on Instagram
-
getIsReferenceOnly
public Boolean getIsReferenceOnly()
Whether the video is exclusively used for copyright monitoring.- Returns:
- Whether the video is exclusively used for copyright monitoring
-
setIsReferenceOnly
public void setIsReferenceOnly(Boolean isReferenceOnly)
Whether the video is exclusively used for copyright monitoring.
-
getMusicVideoCopyright
public MusicVideoCopyright getMusicVideoCopyright()
The music video copyright of this video because of a missing object description in the graph reference, we use a Map here
-
setMusicVideoCopyright
public void setMusicVideoCopyright(MusicVideoCopyright musicVideoCopyright)
The music video copyright of this video because of a missing object description in the graph reference, we use a Map here
-
getPostViews
public Integer getPostViews()
The public view count of the video post, not aggregated with any other crossposts of the video.
-
setPostViews
public void setPostViews(Integer postViews)
The public view count of the video post, not aggregated with any other crossposts of the video.
-
getReactions
public Reactions getReactions()
The reactions for this video.- Returns:
- The reactions for this video.
-
setReactions
public void setReactions(Reactions reactions)
The reactions for this video.
-
getEmbeddable
@GraphAPI(since="2.4") public Boolean getEmbeddable()
Whether the video is embeddable.- Returns:
- Whether the video is embeddable.
-
setEmbeddable
public void setEmbeddable(Boolean embeddable)
Whether the video is embeddable.
-
getEvent
@GraphAPI(since="2.3") public Event getEvent()
If this object has a place, the event associated with the place.- Returns:
- the event associated with the place
-
setEvent
public void setEvent(Event event)
If this object has a place, the event associated with the place.
-
getFeedType
@GraphAPI(since="2.7") public String getFeedType()
Whether or not the video is highlighted in Video Channel.- Returns:
- Whether or not the video is highlighted in Video Channel.
-
setFeedType
public void setFeedType(String feedType)
Whether or not the video is highlighted in Video Channel.
-
getUniversalVideoId
public String getUniversalVideoId()
The publishers asset management code for this video.
-
setUniversalVideoId
public void setUniversalVideoId(String universalVideoId)
The publishers asset management code for this video.
-
getLikes
public Likes getLikes()
People who like this. you need to add the field to the fields query parameter to get the likes list otherwise null is returned- Returns:
- People who like this
-
setLikes
public void setLikes(Likes likes)
People who like this. you need to add the field to the fields query parameter to get the likes list otherwise null is returned
-
getPlace
public Place getPlace()
Location associated with the video, if any.- Returns:
- Location associated with the video, if any.
-
getContentCategory
@GraphAPI(since="2.4") public String getContentCategory()
The content category of this video.- Returns:
- The content category of this video.
-
setContentCategory
public void setContentCategory(String contentCategory)
The content category of this video.
-
getPicture
public String getPicture()
A URL for the thumbnail picture of the video.- Returns:
- A URL for the thumbnail picture of the video.
-
setPicture
public void setPicture(String picture)
A URL for the thumbnail picture of the video.
-
getIcon
public String getIcon()
An icon URL which represents the video.- Returns:
- An icon URL which represents the video.
-
getSource
public String getSource()
A URL to the raw, playable video file.- Returns:
- A URL to the raw, playable video file.
- Since:
- 1.6.5
-
getEmbedHtml
public String getEmbedHtml()
HTML that may be used to embed the video on another website.- Returns:
- HTML that may be used to embed the video on another website.
-
setEmbedHtml
public void setEmbedHtml(String embedHtml)
HTML that may be used to embed the video on another website.
-
getLength
public Double getLength()
The length of the video, in seconds.- Returns:
- The length of the video, in seconds.
-
getLiveAudienceCount
@GraphAPI(since="2.6") public Integer getLiveAudienceCount()
Number of unique people who watched the video broadcast when it was live.- Returns:
- Number of unique people who watched the video broadcast when it was live.
-
setLiveAudienceCount
public void setLiveAudienceCount(Integer liveAudienceCount)
Number of unique people who watched the video broadcast when it was live.
-
getLiveStatus
@GraphAPI(since="2.6") public String getLiveStatus()
The live status of the video. Possible values contain LIVE, LIVE_STOPPED, VOD- Returns:
- The live status of the video
-
setLiveStatus
public void setLiveStatus(String liveStatus)
The live status of the video. Possible values contain LIVE, LIVE_STOPPED, VOD
-
getPrivacy
public Privacy getPrivacy()
Privacy setting for the video.- Returns:
- Privacy setting for the video.
-
setPrivacy
public void setPrivacy(Privacy privacy)
Privacy setting for the video.
-
getPremiereLivingRoomStatus
public String getPremiereLivingRoomStatus()
The status of the Premiere Watch Party, if any
-
setPremiereLivingRoomStatus
public void setPremiereLivingRoomStatus(String premiereLivingRoomStatus)
The status of the Premiere Watch Party, if any
-
getStatus
public Video.VideoStatus getStatus()
Object describing the status attributes of a video.- Returns:
- Object describing the status attributes of a video.
-
setStatus
public void setStatus(Video.VideoStatus status)
Object describing the status attributes of a video.
-
getPublished
@GraphAPI(since="2.3") public Boolean getPublished()
Whether a post about this video is published. This field is only accessible in Graph API 2.3 or later.- Returns:
- whether a post about this video is published.
- Since:
- 1.10.0
-
setPublished
public void setPublished(Boolean published)
Whether a post about this video is published. This field is only accessible in Graph API 2.3 or later.- Since:
- 1.10.0
-
getBackdatedTime
public Date getBackdatedTime()
Back dated time- Since:
- 1.10.0
-
setBackdatedTime
public void setBackdatedTime(Date backdatedTime)
Back dated time- Since:
- 1.10.0
-
getBackdatedTimeGranularity
public String getBackdatedTimeGranularity()
String that represents the back dated time granularity- Since:
- 1.10.0
-
setBackdatedTimeGranularity
public void setBackdatedTimeGranularity(String backdatedTimeGranularity)
String that represents the back dated time granularity- Since:
- 1.10.0
-
getCreatedTime
public Date getCreatedTime()
The time the video was initially published.- Specified by:
getCreatedTime
in interfaceHasCreatedTime
- Returns:
- The time the video was initially published.
-
setCreatedTime
public void setCreatedTime(Date createdTime)
The time the video was initially published.
-
getUpdatedTime
public Date getUpdatedTime()
The last time the video or its caption were updated.- Returns:
- The last time the video or its caption were updated.
-
setUpdatedTime
public void setUpdatedTime(Date updatedTime)
The last time the video or its caption were updated.
-
getScheduledPublishTime
@GraphAPI(since="2.3") public Date getScheduledPublishTime()
The time that the video is scheduled to be published. This field is only accessible in Graph API 2.3 or later.- Returns:
- The time that the video is scheduled to be published.
- Since:
- 1.10.0
-
setScheduledPublishTime
public void setScheduledPublishTime(Date scheduledPublishTime)
The time that the video is scheduled to be published. This field is only accessible in Graph API 2.3 or later.- Since:
- 1.10.0
-
getVideoInsights
public Connection<Insight> getVideoInsights()
-
setVideoInsights
public void setVideoInsights(Connection<Insight> videoInsights)
-
getThumbnails
public Connection<Video.Thumbnail> getThumbnails()
-
setThumbnails
public void setThumbnails(Connection<Video.Thumbnail> thumbnails)
-
-