Class Photos

    • Constructor Detail

      • Photos

        public Photos​(VkApiClient client)
        Constructor
        Parameters:
        client - vk api client
    • Method Detail

      • confirmTag

        public PhotosConfirmTagQuery confirmTag​(UserActor actor,
                                                java.lang.String photoId,
                                                int tagId)
        Confirms a tag on a photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        tagId - Tag ID.
        Returns:
        query
      • copy

        public PhotosCopyQuery copy​(UserActor actor,
                                    int ownerId,
                                    int photoId)
        Allows to copy a photo to the "Saved photos" album
        Parameters:
        actor - vk actor
        ownerId - photo's owner ID
        photoId - photo ID
        Returns:
        query
      • createAlbum

        public PhotosCreateAlbumQuery createAlbum​(UserActor actor,
                                                  java.lang.String title)
        Creates an empty photo album.
        Parameters:
        actor - vk actor
        title - Album title.
        Returns:
        query
      • createComment

        public PhotosCreateCommentQuery createComment​(UserActor actor,
                                                      int photoId)
        Adds a new comment on the photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        Returns:
        query
      • delete

        public PhotosDeleteQuery delete​(UserActor actor,
                                        int photoId)
        Deletes a photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        Returns:
        query
      • deleteAlbum

        public PhotosDeleteAlbumQuery deleteAlbum​(UserActor actor,
                                                  int albumId)
        Deletes a photo album belonging to the current user.
        Parameters:
        actor - vk actor
        albumId - Album ID.
        Returns:
        query
      • deleteComment

        public PhotosDeleteCommentQuery deleteComment​(UserActor actor,
                                                      int commentId)
        Deletes a comment on the photo.
        Parameters:
        actor - vk actor
        commentId - Comment ID.
        Returns:
        query
      • edit

        public PhotosEditQuery edit​(UserActor actor,
                                    int photoId)
        Edits the caption of a photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        Returns:
        query
      • editAlbum

        public PhotosEditAlbumQuery editAlbum​(UserActor actor,
                                              int albumId)
        Edits information about a photo album.
        Parameters:
        actor - vk actor
        albumId - ID of the photo album to be edited.
        Returns:
        query
      • editComment

        public PhotosEditCommentQuery editComment​(UserActor actor,
                                                  int commentId)
        Edits a comment on a photo.
        Parameters:
        actor - vk actor
        commentId - Comment ID.
        Returns:
        query
      • get

        public PhotosGetQuery get​(UserActor actor)
        Returns a list of a user's or community's photos.
        Parameters:
        actor - vk actor
        Returns:
        query
      • get

        public PhotosGetQuery get​(ServiceActor actor)
        Returns a list of a user's or community's photos.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getExtended

        public PhotosGetQueryWithExtended getExtended​(UserActor actor)
        Returns a list of a user's or community's photos.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getAlbums

        public PhotosGetAlbumsQuery getAlbums​(UserActor actor)
        Returns a list of a user's or community's photo albums.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getAlbums

        public PhotosGetAlbumsQuery getAlbums​(ServiceActor actor)
        Returns a list of a user's or community's photo albums.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getAlbumsCount

        public PhotosGetAlbumsCountQuery getAlbumsCount​(UserActor actor)
        Returns the number of photo albums belonging to a user or community.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getAllExtended

        public PhotosGetAllQueryWithExtended getAllExtended​(UserActor actor)
        Returns a list of photos belonging to a user or community, in reverse chronological order.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getAll

        public PhotosGetAllQuery getAll​(UserActor actor)
        Returns a list of photos belonging to a user or community, in reverse chronological order.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getAllComments

        public PhotosGetAllCommentsQuery getAllComments​(UserActor actor)
        Returns a list of comments on a specific photo album or all albums of the user sorted in reverse chronological order.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getByIdLegacyExtended

        public PhotosGetByIdQueryWithLegacyExtended getByIdLegacyExtended​(UserActor actor,
                                                                          java.lang.String... photos)
        Returns information about photos by their IDs.
        Parameters:
        actor - vk actor
        photos - IDs separated with a comma, that are IDs of users who posted photos and IDs of photos themselves with an underscore character between such IDs. To get information about a photo in the group album, you shall specify group ID instead of user ID. Example: "1_129207899,6492_135055734, , -20629724_271945303"
        Returns:
        query
      • getByIdLegacyExtended

        public PhotosGetByIdQueryWithLegacyExtended getByIdLegacyExtended​(UserActor actor,
                                                                          java.util.List<java.lang.String> photos)
        Returns information about photos by their IDs.
        Parameters:
        actor - vk actor
        photos - IDs separated with a comma, that are IDs of users who posted photos and IDs of photos themselves with an underscore character between such IDs. To get information about a photo in the group album, you shall specify group ID instead of user ID. Example: "1_129207899,6492_135055734, , -20629724_271945303"
        Returns:
        query
      • getByIdLegacyExtended

        public PhotosGetByIdQueryWithLegacyExtended getByIdLegacyExtended​(ServiceActor actor,
                                                                          java.lang.String... photos)
        Returns information about photos by their IDs.
        Parameters:
        actor - vk actor
        photos - IDs separated with a comma, that are IDs of users who posted photos and IDs of photos themselves with an underscore character between such IDs. To get information about a photo in the group album, you shall specify group ID instead of user ID. Example: "1_129207899,6492_135055734, , -20629724_271945303"
        Returns:
        query
      • getByIdLegacyExtended

        public PhotosGetByIdQueryWithLegacyExtended getByIdLegacyExtended​(ServiceActor actor,
                                                                          java.util.List<java.lang.String> photos)
        Returns information about photos by their IDs.
        Parameters:
        actor - vk actor
        photos - IDs separated with a comma, that are IDs of users who posted photos and IDs of photos themselves with an underscore character between such IDs. To get information about a photo in the group album, you shall specify group ID instead of user ID. Example: "1_129207899,6492_135055734, , -20629724_271945303"
        Returns:
        query
      • getByIdLegacy

        public PhotosGetByIdQueryWithLegacy getByIdLegacy​(UserActor actor,
                                                          java.lang.String... photos)
        Returns information about photos by their IDs.
        Parameters:
        actor - vk actor
        photos - IDs separated with a comma, that are IDs of users who posted photos and IDs of photos themselves with an underscore character between such IDs. To get information about a photo in the group album, you shall specify group ID instead of user ID. Example: "1_129207899,6492_135055734, , -20629724_271945303"
        Returns:
        query
      • getByIdLegacy

        public PhotosGetByIdQueryWithLegacy getByIdLegacy​(UserActor actor,
                                                          java.util.List<java.lang.String> photos)
        Returns information about photos by their IDs.
        Parameters:
        actor - vk actor
        photos - IDs separated with a comma, that are IDs of users who posted photos and IDs of photos themselves with an underscore character between such IDs. To get information about a photo in the group album, you shall specify group ID instead of user ID. Example: "1_129207899,6492_135055734, , -20629724_271945303"
        Returns:
        query
      • getByIdLegacy

        public PhotosGetByIdQueryWithLegacy getByIdLegacy​(ServiceActor actor,
                                                          java.lang.String... photos)
        Returns information about photos by their IDs.
        Parameters:
        actor - vk actor
        photos - IDs separated with a comma, that are IDs of users who posted photos and IDs of photos themselves with an underscore character between such IDs. To get information about a photo in the group album, you shall specify group ID instead of user ID. Example: "1_129207899,6492_135055734, , -20629724_271945303"
        Returns:
        query
      • getByIdLegacy

        public PhotosGetByIdQueryWithLegacy getByIdLegacy​(ServiceActor actor,
                                                          java.util.List<java.lang.String> photos)
        Returns information about photos by their IDs.
        Parameters:
        actor - vk actor
        photos - IDs separated with a comma, that are IDs of users who posted photos and IDs of photos themselves with an underscore character between such IDs. To get information about a photo in the group album, you shall specify group ID instead of user ID. Example: "1_129207899,6492_135055734, , -20629724_271945303"
        Returns:
        query
      • getChatUploadServer

        public PhotosGetChatUploadServerQuery getChatUploadServer​(UserActor actor,
                                                                  int chatId)
        Returns an upload link for chat cover pictures.
        Parameters:
        actor - vk actor
        chatId - ID of the chat for which you want to upload a cover photo.
        Returns:
        query
      • getChatUploadServer

        public PhotosGetChatUploadServerQuery getChatUploadServer​(GroupActor actor,
                                                                  int chatId)
        Returns an upload link for chat cover pictures.
        Parameters:
        actor - vk actor
        chatId - ID of the chat for which you want to upload a cover photo.
        Returns:
        query
      • getComments

        public PhotosGetCommentsQuery getComments​(UserActor actor,
                                                  int photoId)
        Returns a list of comments on a photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        Returns:
        query
      • getCommentsExtended

        public PhotosGetCommentsQueryWithExtended getCommentsExtended​(UserActor actor,
                                                                      int photoId)
        Returns a list of comments on a photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        Returns:
        query
      • getMarketAlbumUploadServer

        public PhotosGetMarketAlbumUploadServerQuery getMarketAlbumUploadServer​(UserActor actor,
                                                                                int groupId)
        Returns the server address for market album photo upload.
        Parameters:
        actor - vk actor
        groupId - Community ID.
        Returns:
        query
      • getMarketUploadServer

        public PhotosGetMarketUploadServerQuery getMarketUploadServer​(UserActor actor,
                                                                      int groupId)
        Returns the server address for market photo upload.
        Parameters:
        actor - vk actor
        groupId - Community ID.
        Returns:
        query
      • getMessagesUploadServer

        public PhotosGetMessagesUploadServerQuery getMessagesUploadServer​(UserActor actor)
        Returns the server address for photo upload in a private message for a user.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getMessagesUploadServer

        public PhotosGetMessagesUploadServerQuery getMessagesUploadServer​(GroupActor actor)
        Returns the server address for photo upload in a private message for a user.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getNewTags

        public PhotosGetNewTagsQuery getNewTags​(UserActor actor)
        Returns a list of photos with tags that have not been viewed.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getOwnerCoverPhotoUploadServer

        public PhotosGetOwnerCoverPhotoUploadServerQuery getOwnerCoverPhotoUploadServer​(UserActor actor,
                                                                                        int groupId)
        Returns the server address for owner cover upload.
        Parameters:
        actor - vk actor
        groupId - ID of community that owns the album (if the photo will be uploaded to a community album).
        Returns:
        query
      • getOwnerCoverPhotoUploadServer

        public PhotosGetOwnerCoverPhotoUploadServerQuery getOwnerCoverPhotoUploadServer​(GroupActor actor,
                                                                                        int groupId)
        Returns the server address for owner cover upload.
        Parameters:
        actor - vk actor
        groupId - ID of community that owns the album (if the photo will be uploaded to a community album).
        Returns:
        query
      • getOwnerPhotoUploadServer

        public PhotosGetOwnerPhotoUploadServerQuery getOwnerPhotoUploadServer​(UserActor actor)
        Returns an upload server address for a profile or community photo.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getTags

        public PhotosGetTagsQuery getTags​(UserActor actor,
                                          int photoId)
        Returns a list of tags on a photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        Returns:
        query
      • getUploadServer

        public PhotosGetUploadServerQuery getUploadServer​(UserActor actor)
        Returns the server address for photo upload.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getUserPhotos

        public PhotosGetUserPhotosQuery getUserPhotos​(UserActor actor)
        Returns a list of photos in which a user is tagged.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getWallUploadServer

        public PhotosGetWallUploadServerQuery getWallUploadServer​(UserActor actor)
        Returns the server address for photo upload onto a user's wall.
        Parameters:
        actor - vk actor
        Returns:
        query
      • makeCover

        public PhotosMakeCoverQuery makeCover​(UserActor actor,
                                              int photoId)
        Makes a photo into an album cover.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        Returns:
        query
      • move

        public PhotosMoveQuery move​(UserActor actor,
                                    int targetAlbumId,
                                    int photoId)
        Moves a photo from one album to another.
        Parameters:
        actor - vk actor
        targetAlbumId - ID of the album to which the photo will be moved.
        photoId - Photo ID.
        Returns:
        query
      • putTag

        public PhotosPutTagQuery putTag​(UserActor actor,
                                        int photoId,
                                        int userId)
        Adds a tag on the photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        userId - ID of the user to be tagged.
        Returns:
        query
      • removeTag

        public PhotosRemoveTagQuery removeTag​(UserActor actor,
                                              int photoId,
                                              int tagId)
        Removes a tag from a photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        tagId - Tag ID.
        Returns:
        query
      • reorderAlbums

        public PhotosReorderAlbumsQuery reorderAlbums​(UserActor actor,
                                                      int albumId)
        Reorders the album in the list of user albums.
        Parameters:
        actor - vk actor
        albumId - Album ID.
        Returns:
        query
      • reorderPhotos

        public PhotosReorderPhotosQuery reorderPhotos​(UserActor actor,
                                                      int photoId)
        Reorders the photo in the list of photos of the user album.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        Returns:
        query
      • report

        public PhotosReportQuery report​(UserActor actor,
                                        int ownerId,
                                        int photoId)
        Reports (submits a complaint about) a photo.
        Parameters:
        actor - vk actor
        ownerId - ID of the user or community that owns the photo.
        photoId - Photo ID.
        Returns:
        query
      • reportComment

        public PhotosReportCommentQuery reportComment​(UserActor actor,
                                                      int ownerId,
                                                      int commentId)
        Reports (submits a complaint about) a comment on a photo.
        Parameters:
        actor - vk actor
        ownerId - ID of the user or community that owns the photo.
        commentId - ID of the comment being reported.
        Returns:
        query
      • restore

        public PhotosRestoreQuery restore​(UserActor actor,
                                          int photoId)
        Restores a deleted photo.
        Parameters:
        actor - vk actor
        photoId - Photo ID.
        Returns:
        query
      • restoreComment

        public PhotosRestoreCommentQuery restoreComment​(UserActor actor,
                                                        int commentId)
        Restores a deleted comment on a photo.
        Parameters:
        actor - vk actor
        commentId - ID of the deleted comment.
        Returns:
        query
      • save

        public PhotosSaveQuery save​(UserActor actor)
        Saves photos after successful uploading.
        Parameters:
        actor - vk actor
        Returns:
        query
      • saveMarketAlbumPhoto

        public PhotosSaveMarketAlbumPhotoQuery saveMarketAlbumPhoto​(UserActor actor,
                                                                    int groupId,
                                                                    java.lang.String photo,
                                                                    int server,
                                                                    java.lang.String hash)
        Saves market album photos after successful uploading.
        Parameters:
        actor - vk actor
        groupId - Community ID.
        photo - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        server - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        hash - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        Returns:
        query
      • saveMarketPhoto

        public PhotosSaveMarketPhotoQuery saveMarketPhoto​(UserActor actor,
                                                          java.lang.String photo,
                                                          int server,
                                                          java.lang.String hash)
        Saves market photos after successful uploading.
        Parameters:
        actor - vk actor
        photo - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        server - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        hash - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        Returns:
        query
      • saveMessagesPhoto

        public PhotosSaveMessagesPhotoQuery saveMessagesPhoto​(UserActor actor,
                                                              java.lang.String photo)
        Saves a photo after being successfully uploaded. URL obtained with [vk.com/dev/photos.getMessagesUploadServer|photos.getMessagesUploadServer] method.
        Parameters:
        actor - vk actor
        photo - Parameter returned when the photo is [vk.com/dev/upload_files|uploaded to the server].
        Returns:
        query
      • saveMessagesPhoto

        public PhotosSaveMessagesPhotoQuery saveMessagesPhoto​(GroupActor actor,
                                                              java.lang.String photo)
        Saves a photo after being successfully uploaded. URL obtained with [vk.com/dev/photos.getMessagesUploadServer|photos.getMessagesUploadServer] method.
        Parameters:
        actor - vk actor
        photo - Parameter returned when the photo is [vk.com/dev/upload_files|uploaded to the server].
        Returns:
        query
      • saveOwnerCoverPhoto

        public PhotosSaveOwnerCoverPhotoQuery saveOwnerCoverPhoto​(UserActor actor,
                                                                  java.lang.String hash,
                                                                  java.lang.String photo)
        Saves cover photo after successful uploading.
        Parameters:
        actor - vk actor
        hash - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        photo - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        Returns:
        query
      • saveOwnerCoverPhoto

        public PhotosSaveOwnerCoverPhotoQuery saveOwnerCoverPhoto​(GroupActor actor,
                                                                  java.lang.String hash,
                                                                  java.lang.String photo)
        Saves cover photo after successful uploading.
        Parameters:
        actor - vk actor
        hash - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        photo - Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].
        Returns:
        query
      • saveOwnerPhoto

        public PhotosSaveOwnerPhotoQuery saveOwnerPhoto​(UserActor actor)
        Saves a profile or community photo. Upload URL can be got with the [vk.com/dev/photos.getOwnerPhotoUploadServer|photos.getOwnerPhotoUploadServer] method.
        Parameters:
        actor - vk actor
        Returns:
        query
      • saveWallPhoto

        public PhotosSaveWallPhotoQuery saveWallPhoto​(UserActor actor,
                                                      java.lang.String photo)
        Saves a photo to a user's or community's wall after being uploaded.
        Parameters:
        actor - vk actor
        photo - Parameter returned when the the photo is [vk.com/dev/upload_files|uploaded to the server].
        Returns:
        query
      • search

        public PhotosSearchQuery search​(UserActor actor)
        Returns a list of photos.
        Parameters:
        actor - vk actor
        Returns:
        query