|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MediaOperations
Defines operations for working with albums, photos, and videos.
Method Summary | |
---|---|
String |
createAlbum(String name,
String description)
Creates a new photo album. |
Album |
getAlbum(String albumId)
Retrieves data for a specific album. |
byte[] |
getAlbumImage(String albumId)
Retrieves an album's image as an array of bytes. |
byte[] |
getAlbumImage(String albumId,
ImageType imageType)
Retrieves an album's image as an array of bytes. |
PagedList<Album> |
getAlbums()
Retrieves a list of albums belonging to the authenticated user. |
PagedList<Album> |
getAlbums(int offset,
int limit)
Deprecated. Use getAlbums(PagingParameters) instead. |
PagedList<Album> |
getAlbums(PagingParameters pagedListParameters)
Retrieves a list of albums belonging to the authenticated user. |
PagedList<Album> |
getAlbums(String ownerId)
Retrieves a list of albums belonging to a specific owner (user, page, etc). |
PagedList<Album> |
getAlbums(String ownerId,
int offset,
int limit)
Deprecated. Use getAlbums(String, PagingParameters) instead |
PagedList<Album> |
getAlbums(String ownerId,
PagingParameters pagedListParameters)
Retrieves a list of albums belonging to a specific owner (user, page, etc). |
Photo |
getPhoto(String photoId)
Retrieve data for a specified photo. |
byte[] |
getPhotoImage(String photoId)
Retrieves a photo's image as an array of bytes. |
byte[] |
getPhotoImage(String photoId,
ImageType imageType)
Retrieves a photo's image as an array of bytes. |
PagedList<Photo> |
getPhotos(String objectId)
Retrieves data for up to 25 photos from a specific album or that a user is tagged in. |
PagedList<Photo> |
getPhotos(String objectId,
int offset,
int limit)
Deprecated. Use getPhotos(String, PagingParameters) instead. |
PagedList<Photo> |
getPhotos(String objectId,
PagingParameters pagedListParameters)
Retrieves photo data from a specific album or that a user is tagged in. |
Video |
getVideo(String videoId)
Retrieves data for a specific video. |
byte[] |
getVideoImage(String videoId)
Retrieves a video's image as an array of bytes. |
byte[] |
getVideoImage(String videoId,
ImageType imageType)
Retrieves a video's image as an array of bytes. |
PagedList<Video> |
getVideos()
Retrieves a list of up to 25 videos that the authenticated user is tagged in. |
PagedList<Video> |
getVideos(int offset,
int limit)
Deprecated. Use getVideos(PagingParameters) instead. |
PagedList<Video> |
getVideos(PagingParameters pagedListParameters)
Retrieves a list of videos that the authenticated user is tagged in. |
PagedList<Video> |
getVideos(String userId)
Retrieves a list of up to 25 videos that a specified user is tagged in. |
PagedList<Video> |
getVideos(String userId,
int offset,
int limit)
Deprecated. Use getVideos(String, PagingParameters) instead. |
PagedList<Video> |
getVideos(String userId,
PagingParameters pagedListParameters)
Retrieves a list of videos that a specified user is tagged in. |
String |
postPhoto(Resource photo)
Uploads a photo to an album created specifically for the application. |
String |
postPhoto(Resource photo,
String caption)
Uploads a photo to an album created specifically for the application. |
String |
postPhoto(String albumId,
Resource photo)
Uploads a photo to a specific album. |
String |
postPhoto(String albumId,
Resource photo,
String caption)
Uploads a photo to a specific album. |
String |
postVideo(Resource video)
Uploads a video for the authenticated user. |
String |
postVideo(Resource video,
String title,
String description)
Uploads a video for the authenticated user. |
Method Detail |
---|
PagedList<Album> getAlbums()
Album
s for the user, or an empty list if not available.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_photos" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.@Deprecated PagedList<Album> getAlbums(int offset, int limit)
getAlbums(PagingParameters)
instead.
offset
- the offset into the list of albumslimit
- the maximum number of albums to return
Album
s for the user, or an empty list if not available.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_photos" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.PagedList<Album> getAlbums(PagingParameters pagedListParameters)
pagedListParameters
- the parameters defining the bounds of the list to return.
Album
s for the user, or an empty list if not available.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_photos" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.PagedList<Album> getAlbums(String ownerId)
ownerId
- the album owner's ID
Album
s for the user, or an empty list if not available.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_photos" or "friends_photos" permission.@Deprecated PagedList<Album> getAlbums(String ownerId, int offset, int limit)
getAlbums(String, PagingParameters)
instead
ownerId
- the album owner's IDoffset
- the offset into the list of albumslimit
- the maximum number of albums to return
Album
s for the user, or an empty list if not available.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_photos" or "friends_photos" permission.PagedList<Album> getAlbums(String ownerId, PagingParameters pagedListParameters)
ownerId
- the album owner's IDpagedListParameters
- the parameters defining the bounds of the list to return.
Album
s for the user, or an empty list if not available.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_photos" or "friends_photos" permission.Album getAlbum(String albumId)
albumId
- the album ID
Album
object.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the album is not public and if the user has not granted "user_photos" or "friends_photos" permission.String createAlbum(String name, String description)
name
- the name of the album.description
- the album's description.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.byte[] getAlbumImage(String albumId)
albumId
- the album ID
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the album is not public and if the user has not granted "user_photos" or "friends_photos" permission.byte[] getAlbumImage(String albumId, ImageType imageType)
albumId
- the album IDimageType
- the image type (eg., small, normal, large. square)
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the album is not public and if the user has not granted "user_photos" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.PagedList<Photo> getPhotos(String objectId)
objectId
- either an album ID or a user ID
Photo
s in the specified album.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the album is not public and if the user has not granted "user_photos" or "friends_photos" permission.@Deprecated PagedList<Photo> getPhotos(String objectId, int offset, int limit)
getPhotos(String, PagingParameters)
instead.
objectId
- either an album ID or a user IDoffset
- the offset into the list of photoslimit
- the maximum number of photos to return
Photo
s in the specified album.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the album is not public and if the user has not granted "user_photos" or "friends_photos" permission.PagedList<Photo> getPhotos(String objectId, PagingParameters pagedListParameters)
objectId
- either an album ID or a user IDpagedListParameters
- the parameters defining the bounds of the list to return.
Photo
s in the specified album.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the album is not public and if the user has not granted "user_photos" or "friends_photos" permission.Photo getPhoto(String photoId)
photoId
- the photo's ID
Photo
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the photo is not public and if the user has not granted "user_photos" or "friends_photos" permission.byte[] getPhotoImage(String photoId)
photoId
- the photo ID
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the photo is not public and if the user has not granted "user_photos" or "friends_photos" permission.byte[] getPhotoImage(String photoId, ImageType imageType)
photoId
- the photo IDimageType
- the image type (eg., small, normal, large. square)
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the photo is not public and if the user has not granted "user_photos" or "friends_photos" permission.String postPhoto(Resource photo)
photo
- A Resource
for the photo data. The given Resource must implement the getFilename() method (such as FileSystemResource
or ClassPathResource
).
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.String postPhoto(Resource photo, String caption)
photo
- A Resource
for the photo data. The given Resource must implement the getFilename() method (such as FileSystemResource
or ClassPathResource
).caption
- A caption describing the photo.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.String postPhoto(String albumId, Resource photo)
albumId
- the ID of the album to upload the photo to.photo
- A Resource
for the photo data. The given Resource must implement the getFilename() method (such as FileSystemResource
or ClassPathResource
).
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.String postPhoto(String albumId, Resource photo, String caption)
albumId
- the ID of the album to upload the photo to.photo
- A Resource
for the photo data. The given Resource must implement the getFilename() method (such as FileSystemResource
or ClassPathResource
).caption
- A caption describing the photo.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.PagedList<Video> getVideos()
Video
belonging to the authenticated user.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_videos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.@Deprecated PagedList<Video> getVideos(int offset, int limit)
getVideos(PagingParameters)
instead.
offset
- the offset into the list of videoslimit
- the maximum number of videos to return
Video
belonging to the authenticated user.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_videos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.PagedList<Video> getVideos(PagingParameters pagedListParameters)
pagedListParameters
- the parameters defining the bounds of the list to return.
Video
belonging to the authenticated user.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_videos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.PagedList<Video> getVideos(String userId)
userId
- the ID of the user who is tagged in the videos
Video
which the specified user is tagged in.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_videos" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.@Deprecated PagedList<Video> getVideos(String userId, int offset, int limit)
getVideos(String, PagingParameters)
instead.
userId
- the ID of the user who is tagged in the videosoffset
- the offset into the list of videoslimit
- the maximum number of videos to return
Video
which the specified user is tagged in.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_videos" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.PagedList<Video> getVideos(String userId, PagingParameters pagedListParameters)
userId
- the ID of the user who is tagged in the videospagedListParameters
- the parameters defining the bounds of the list to return.
Video
which the specified user is tagged in.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_videos" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.Video getVideo(String videoId)
videoId
- the ID of the video.
Video
data.
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_videos" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.byte[] getVideoImage(String videoId)
videoId
- the video ID
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_videos" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.byte[] getVideoImage(String videoId, ImageType imageType)
videoId
- the video IDimageType
- the image type (eg., small, normal, large. square)
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "user_videos" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.String postVideo(Resource video)
video
- A Resource
for the video data. The given Resource must implement the getFilename() method (such as FileSystemResource
or ClassPathResource
).
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.String postVideo(Resource video, String title, String description)
video
- A Resource
for the video data. The given Resource must implement the getFilename() method (such as FileSystemResource
or ClassPathResource
).
org.springframework.social.ApiException
- if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException
- if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException
- if FacebookTemplate was not created with an access token.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |