Class: Vk::API::Photos

Inherits:
Schema::Namespace show all
Defined in:
lib/vk/api/methods.rb,
lib/vk/api/objects.rb,
lib/vk/api/responses.rb,
lib/vk/api/photos/photo.rb,
lib/vk/api/photos/photo_tag.rb,
lib/vk/api/photos/photo_full.rb,
lib/vk/api/photos/methods/get.rb,
lib/vk/api/photos/photo_album.rb,
lib/vk/api/photos/photo_sizes.rb,
lib/vk/api/photos/methods/copy.rb,
lib/vk/api/photos/methods/edit.rb,
lib/vk/api/photos/methods/move.rb,
lib/vk/api/photos/methods/save.rb,
lib/vk/api/photos/photo_upload.rb,
lib/vk/api/photos/methods/delete.rb,
lib/vk/api/photos/methods/report.rb,
lib/vk/api/photos/methods/search.rb,
lib/vk/api/photos/comment_xtr_pid.rb,
lib/vk/api/photos/methods/get_all.rb,
lib/vk/api/photos/methods/put_tag.rb,
lib/vk/api/photos/methods/restore.rb,
lib/vk/api/photos/methods/get_tags.rb,
lib/vk/api/photos/photo_album_full.rb,
lib/vk/api/photos/methods/get_by_id.rb,
lib/vk/api/photos/methods/edit_album.rb,
lib/vk/api/photos/methods/get_albums.rb,
lib/vk/api/photos/methods/make_cover.rb,
lib/vk/api/photos/methods/remove_tag.rb,
lib/vk/api/photos/photo_xtr_tag_info.rb,
lib/vk/api/photos/methods/confirm_tag.rb,
lib/vk/api/photos/methods/create_album.rb,
lib/vk/api/photos/methods/delete_album.rb,
lib/vk/api/photos/methods/edit_comment.rb,
lib/vk/api/photos/methods/get_comments.rb,
lib/vk/api/photos/methods/get_new_tags.rb,
lib/vk/api/photos/wall_upload_response.rb,
lib/vk/api/photos/owner_upload_response.rb,
lib/vk/api/photos/photo_upload_response.rb,
lib/vk/api/photos/photo_xtr_real_offset.rb,
lib/vk/api/photos/market_upload_response.rb,
lib/vk/api/photos/methods/create_comment.rb,
lib/vk/api/photos/methods/delete_comment.rb,
lib/vk/api/photos/methods/reorder_albums.rb,
lib/vk/api/photos/methods/reorder_photos.rb,
lib/vk/api/photos/methods/report_comment.rb,
lib/vk/api/photos/responses/get_response.rb,
lib/vk/api/photos/message_upload_response.rb,
lib/vk/api/photos/methods/get_user_photos.rb,
lib/vk/api/photos/methods/restore_comment.rb,
lib/vk/api/photos/methods/save_wall_photo.rb,
lib/vk/api/photos/responses/copy_response.rb,
lib/vk/api/photos/responses/edit_response.rb,
lib/vk/api/photos/responses/move_response.rb,
lib/vk/api/photos/responses/save_response.rb,
lib/vk/api/photos/methods/get_albums_count.rb,
lib/vk/api/photos/methods/get_all_comments.rb,
lib/vk/api/photos/methods/save_owner_photo.rb,
lib/vk/api/photos/methods/get_upload_server.rb,
lib/vk/api/photos/methods/save_market_photo.rb,
lib/vk/api/photos/responses/delete_response.rb,
lib/vk/api/photos/responses/report_response.rb,
lib/vk/api/photos/responses/search_response.rb,
lib/vk/api/photos/photo_full_xtr_real_offset.rb,
lib/vk/api/photos/responses/get_all_response.rb,
lib/vk/api/photos/responses/put_tag_response.rb,
lib/vk/api/photos/responses/restore_response.rb,
lib/vk/api/photos/methods/save_messages_photo.rb,
lib/vk/api/photos/responses/get_tags_response.rb,
lib/vk/api/photos/market_album_upload_response.rb,
lib/vk/api/photos/responses/get_by_id_response.rb,
lib/vk/api/photos/responses/edit_album_response.rb,
lib/vk/api/photos/responses/get_albums_response.rb,
lib/vk/api/photos/responses/make_cover_response.rb,
lib/vk/api/photos/responses/remove_tag_response.rb,
lib/vk/api/photos/methods/get_chat_upload_server.rb,
lib/vk/api/photos/methods/get_wall_upload_server.rb,
lib/vk/api/photos/responses/confirm_tag_response.rb,
lib/vk/api/photos/methods/save_market_album_photo.rb,
lib/vk/api/photos/responses/create_album_response.rb,
lib/vk/api/photos/responses/delete_album_response.rb,
lib/vk/api/photos/responses/edit_comment_response.rb,
lib/vk/api/photos/responses/get_comments_response.rb,
lib/vk/api/photos/responses/get_new_tags_response.rb,
lib/vk/api/photos/methods/get_market_upload_server.rb,
lib/vk/api/photos/responses/create_comment_response.rb,
lib/vk/api/photos/responses/delete_comment_response.rb,
lib/vk/api/photos/responses/get_user_photo_response.rb,
lib/vk/api/photos/responses/reorder_albums_response.rb,
lib/vk/api/photos/responses/reorder_photos_response.rb,
lib/vk/api/photos/responses/report_comment_response.rb,
lib/vk/api/photos/methods/get_messages_upload_server.rb,
lib/vk/api/photos/responses/get_user_photos_response.rb,
lib/vk/api/photos/responses/restore_comment_response.rb,
lib/vk/api/photos/responses/save_wall_photo_response.rb,
lib/vk/api/photos/responses/get_albums_count_response.rb,
lib/vk/api/photos/responses/get_all_comments_response.rb,
lib/vk/api/photos/responses/save_owner_photo_response.rb,
lib/vk/api/photos/responses/get_upload_server_response.rb,
lib/vk/api/photos/responses/save_market_photo_response.rb,
lib/vk/api/photos/methods/get_owner_photo_upload_server.rb,
lib/vk/api/photos/methods/get_market_album_upload_server.rb,
lib/vk/api/photos/responses/save_messages_photo_response.rb,
lib/vk/api/photos/responses/get_chat_upload_server_response.rb,
lib/vk/api/photos/responses/get_wall_upload_server_response.rb,
lib/vk/api/photos/responses/save_market_album_photo_response.rb,
lib/vk/api/photos/responses/get_market_upload_server_response.rb,
lib/vk/api/photos/responses/get_messages_upload_server_response.rb,
lib/vk/api/photos/responses/get_owner_photo_upload_server_response.rb,
lib/vk/api/photos/responses/get_market_album_upload_server_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: CommentXtrPid, MarketAlbumUploadResponse, MarketUploadResponse, MessageUploadResponse, OwnerUploadResponse, Photo, PhotoAlbum, PhotoAlbumFull, PhotoFull, PhotoFullXtrRealOffset, PhotoSizes, PhotoTag, PhotoUpload, PhotoUploadResponse, PhotoXtrRealOffset, PhotoXtrTagInfo, WallUploadResponse

Instance Attribute Summary

Attributes inherited from Schema::Namespace

#client

DSL collapse

Methods inherited from Schema::Namespace

#call, #initialize

Constructor Details

This class inherits a constructor from Vk::Schema::Namespace

Instance Method Details

#confirm_tag(arguments = {}) ⇒ Vk::API::Photos::Responses::ConfirmTagResponse

Returns Confirms a tag on a photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :photo_id (String)

    Photo ID.

  • :tag_id (Integer)

    Tag ID.

Returns:

See Also:



1043
1044
1045
1046
1047
1048
1049
# File 'lib/vk/api/methods.rb', line 1043

def confirm_tag(arguments = {})
  require "vk/api/photos/methods/confirm_tag"
  method = Methods::ConfirmTag.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/confirm_tag_response"
  Responses::ConfirmTagResponse.new(response.deep_symbolize_keys)
end

#copy(arguments = {}) ⇒ Vk::API::Photos::Responses::CopyResponse

Returns Allows to copy a photo to the "Saved photos" album.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    photo's owner ID

  • :photo_id (Integer)

    photo ID

  • :access_key (String)

    for private photos

Returns:

See Also:



889
890
891
892
893
894
895
# File 'lib/vk/api/methods.rb', line 889

def copy(arguments = {})
  require "vk/api/photos/methods/copy"
  method = Methods::Copy.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/copy_response"
  Responses::CopyResponse.new(response.deep_symbolize_keys)
end

#create_album(arguments = {}) ⇒ Vk::API::Photos::Responses::CreateAlbumResponse

Returns Creates an empty photo album.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



578
579
580
581
582
583
584
# File 'lib/vk/api/methods.rb', line 578

def create_album(arguments = {})
  require "vk/api/photos/methods/create_album"
  method = Methods::CreateAlbum.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/create_album_response"
  Responses::CreateAlbumResponse.new(response.deep_symbolize_keys)
end

#create_comment(arguments = {}) ⇒ Vk::API::Photos::Responses::CreateCommentResponse

Returns Adds a new comment on the photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



1097
1098
1099
1100
1101
1102
1103
# File 'lib/vk/api/methods.rb', line 1097

def create_comment(arguments = {})
  require "vk/api/photos/methods/create_comment"
  method = Methods::CreateComment.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/create_comment_response"
  Responses::CreateCommentResponse.new(response.deep_symbolize_keys)
end

#delete(arguments = {}) ⇒ Vk::API::Photos::Responses::DeleteResponse

Returns Deletes a photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :photo_id (Integer)

    Photo ID.

Returns:

See Also:



1018
1019
1020
1021
1022
1023
1024
# File 'lib/vk/api/methods.rb', line 1018

def delete(arguments = {})
  require "vk/api/photos/methods/delete"
  method = Methods::Delete.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/delete_response"
  Responses::DeleteResponse.new(response.deep_symbolize_keys)
end

#delete_album(arguments = {}) ⇒ Vk::API::Photos::Responses::DeleteAlbumResponse

Returns Deletes a photo album belonging to the current user.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :album_id (Integer)

    Album ID.

  • :group_id (Integer)

    ID of the community that owns the album.

Returns:

See Also:



1006
1007
1008
1009
1010
1011
1012
# File 'lib/vk/api/methods.rb', line 1006

def delete_album(arguments = {})
  require "vk/api/photos/methods/delete_album"
  method = Methods::DeleteAlbum.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/delete_album_response"
  Responses::DeleteAlbumResponse.new(response.deep_symbolize_keys)
end

#delete_comment(arguments = {}) ⇒ Vk::API::Photos::Responses::DeleteCommentResponse

Returns Deletes a comment on the photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :comment_id (Integer)

    Comment ID.

Returns:

See Also:



1109
1110
1111
1112
1113
1114
1115
# File 'lib/vk/api/methods.rb', line 1109

def delete_comment(arguments = {})
  require "vk/api/photos/methods/delete_comment"
  method = Methods::DeleteComment.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/delete_comment_response"
  Responses::DeleteCommentResponse.new(response.deep_symbolize_keys)
end

#edit(arguments = {}) ⇒ Vk::API::Photos::Responses::EditResponse

Returns Edits the caption of a photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



907
908
909
910
911
912
913
# File 'lib/vk/api/methods.rb', line 907

def edit(arguments = {})
  require "vk/api/photos/methods/edit"
  method = Methods::Edit.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/edit_response"
  Responses::EditResponse.new(response.deep_symbolize_keys)
end

#edit_album(arguments = {}) ⇒ Vk::API::Photos::Responses::EditAlbumResponse

Returns Edits information about a photo album.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



596
597
598
599
600
601
602
# File 'lib/vk/api/methods.rb', line 596

def edit_album(arguments = {})
  require "vk/api/photos/methods/edit_album"
  method = Methods::EditAlbum.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/edit_album_response"
  Responses::EditAlbumResponse.new(response.deep_symbolize_keys)
end

#edit_comment(arguments = {}) ⇒ Vk::API::Photos::Responses::EditCommentResponse

Returns Edits a comment on a photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :comment_id (Integer)

    Comment ID.

  • :message (String)

    New text of the comment.

  • :attachments (Array) — default: Required if 'message' is not set.

    List of objects attached to the post, in the following format:; ","; '' — Type of media attachment:; 'photo' — photo; 'video' — video; 'audio' — audio; 'doc' — document; '' — Media attachment owner ID.; '' — Media attachment ID.; ; Example:; "photo100172_166443618,photo66748_265827614"

Returns:

See Also:



1135
1136
1137
1138
1139
1140
1141
# File 'lib/vk/api/methods.rb', line 1135

def edit_comment(arguments = {})
  require "vk/api/photos/methods/edit_comment"
  method = Methods::EditComment.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/edit_comment_response"
  Responses::EditCommentResponse.new(response.deep_symbolize_keys)
end

#get(arguments = {}) ⇒ Vk::API::Photos::Responses::GetResponse

Returns a list of a user's or community's photos.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photos. Use a negative value to designate a community ID.

  • :album_id (String)

    Photo album ID. To return information about photos from service albums, use the following string values: 'profile, wall, saved'.

  • :photo_ids (Array)

    Photo IDs.

  • :rev (Boolean)

    Sort order:; '1' — reverse chronological; '0' — chronological

  • :extended (Boolean)

    '1' — to return additional 'likes', 'comments', and 'tags' fields; '0' — (default)

  • :feed_type (String)

    Type of feed obtained in 'feed' field of the method.

  • :feed (Integer)

    unixtime, that can be obtained with method in date field to get all photos uploaded by the user on a specific day, or photos the user has been tagged on. Also, 'uid' parameter of the user the event happened with shall be specified.

  • :photo_sizes (Boolean)

    '1' — to return photo sizes in a

  • :offset (Integer)
  • :count (Integer)

Returns:

See Also:



633
634
635
636
637
638
639
# File 'lib/vk/api/methods.rb', line 633

def get(arguments = {})
  require "vk/api/photos/methods/get"
  method = Methods::Get.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_response"
  Responses::GetResponse.new(response.deep_symbolize_keys)
end

#get_albums(arguments = {}) ⇒ Vk::API::Photos::Responses::GetAlbumsResponse

Returns a list of a user's or community's photo albums.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the albums.

  • :album_ids (Array)

    Album IDs.

  • :offset (Integer)

    Offset needed to return a specific subset of albums.

  • :count (Integer)

    Number of albums to return.

  • :need_system (Boolean)

    '1' — to return system albums with negative IDs

  • :need_covers (Boolean)

    '1' — to return an additional 'thumb_src' field; '0' — (default)

  • :photo_sizes (Boolean)

    '1' — to return photo sizes in a

Returns:

See Also:



613
614
615
616
617
618
619
# File 'lib/vk/api/methods.rb', line 613

def get_albums(arguments = {})
  require "vk/api/photos/methods/get_albums"
  method = Methods::GetAlbums.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_albums_response"
  Responses::GetAlbumsResponse.new(response.deep_symbolize_keys)
end

#get_albums_count(arguments = {}) ⇒ Vk::API::Photos::Responses::GetAlbumsCountResponse

Returns the number of photo albums belonging to a user or community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :user_id (Integer)

    User ID.

  • :group_id (Integer)

    Community ID.

Returns:

See Also:



645
646
647
648
649
650
651
# File 'lib/vk/api/methods.rb', line 645

def get_albums_count(arguments = {})
  require "vk/api/photos/methods/get_albums_count"
  method = Methods::GetAlbumsCount.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_albums_count_response"
  Responses::GetAlbumsCountResponse.new(response.deep_symbolize_keys)
end

#get_all(arguments = {}) ⇒ Vk::API::Photos::Responses::GetAllResponse

Returns a list of photos belonging to a user or community, in reverse chronological order.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of a user or community that owns the photos.; Use a negative value to designate a community ID.

  • :extended (Boolean)

    '1' — to return detailed information about photos

  • :offset (Integer)

    Offset needed to return a specific subset of photos. By default, '0'.

  • :count (Integer) — default: 20

    Number of photos to return.

  • :photo_sizes (Boolean)

    '1' – to return image sizes in .

  • :no_service_albums (Boolean)

    '1' – to return photos only from standard albums; '0' – to return all photos including those in service albums, e.g., 'My wall photos' (default)

  • :need_hidden (Boolean)

    '1' – to show information about photos being hidden from the block above the wall.

  • :skip_hidden (Boolean)

    '1' – not to return photos being hidden from the block above the wall. Works only with owner_id>0, no_service_albums is ignored.

Returns:

See Also:



979
980
981
982
983
984
985
# File 'lib/vk/api/methods.rb', line 979

def get_all(arguments = {})
  require "vk/api/photos/methods/get_all"
  method = Methods::GetAll.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_all_response"
  Responses::GetAllResponse.new(response.deep_symbolize_keys)
end

#get_all_comments(arguments = {}) ⇒ Vk::API::Photos::Responses::GetAllCommentsResponse

Returns a list of comments on a specific photo album or all albums of the user sorted in reverse chronological order.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the album(s).

  • :album_id (Integer)

    Album ID. If the parameter is not set, comments on all of the user's albums will be returned.

  • :need_likes (Boolean)

    '1' — to return an additional 'likes' field; '0' — (default)

  • :offset (Integer)

    Offset needed to return a specific subset of comments. By default, '0'.

  • :count (Integer)

    Number of comments to return. By default, '20'. Maximum value, '100'.

Returns:

See Also:



1078
1079
1080
1081
1082
1083
1084
# File 'lib/vk/api/methods.rb', line 1078

def get_all_comments(arguments = {})
  require "vk/api/photos/methods/get_all_comments"
  method = Methods::GetAllComments.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_all_comments_response"
  Responses::GetAllCommentsResponse.new(response.deep_symbolize_keys)
end

#get_by_id(arguments = {}) ⇒ Vk::API::Photos::Responses::GetByIdResponse

Returns information about photos by their IDs.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :photos (Array)

    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"

  • :extended (Boolean)

    '1' — to return additional fields; '0' — (default)

  • :photo_sizes (Boolean)

    '1' — to return photo sizes in a

Returns:

See Also:



658
659
660
661
662
663
664
# File 'lib/vk/api/methods.rb', line 658

def get_by_id(arguments = {})
  require "vk/api/photos/methods/get_by_id"
  method = Methods::GetById.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_by_id_response"
  Responses::GetByIdResponse.new(response.deep_symbolize_keys)
end

#get_chat_upload_server(arguments = {}) ⇒ Vk::API::Photos::Responses::GetChatUploadServerResponse

Returns an upload link for chat cover pictures.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :chat_id (Integer)

    ID of the chat for which you want to upload a cover photo.

  • :crop_x (Integer)
  • :crop_y (Integer)
  • :crop_width (Integer)

    Width (in pixels) of the photo after cropping.

Returns:

See Also:



695
696
697
698
699
700
701
# File 'lib/vk/api/methods.rb', line 695

def get_chat_upload_server(arguments = {})
  require "vk/api/photos/methods/get_chat_upload_server"
  method = Methods::GetChatUploadServer.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_chat_upload_server_response"
  Responses::GetChatUploadServerResponse.new(response.deep_symbolize_keys)
end

#get_comments(arguments = {}) ⇒ Vk::API::Photos::Responses::GetCommentsResponse

Returns a list of comments on a photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



1063
1064
1065
1066
1067
1068
1069
# File 'lib/vk/api/methods.rb', line 1063

def get_comments(arguments = {})
  require "vk/api/photos/methods/get_comments"
  method = Methods::GetComments.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_comments_response"
  Responses::GetCommentsResponse.new(response.deep_symbolize_keys)
end

#get_market_album_upload_server(arguments = {}) ⇒ Vk::API::Photos::Responses::GetMarketAlbumUploadServerResponse

Returns the server address for market album photo upload.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

Returns:

See Also:



721
722
723
724
725
726
727
# File 'lib/vk/api/methods.rb', line 721

def get_market_album_upload_server(arguments = {})
  require "vk/api/photos/methods/get_market_album_upload_server"
  method = Methods::GetMarketAlbumUploadServer.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_market_album_upload_server_response"
  Responses::GetMarketAlbumUploadServerResponse.new(response.deep_symbolize_keys)
end

#get_market_upload_server(arguments = {}) ⇒ Vk::API::Photos::Responses::GetMarketUploadServerResponse

Returns the server address for market photo upload.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :main_photo (Boolean)

    '1' if you want to upload the main item photo.

  • :crop_x (Integer)

    X coordinate of the crop left upper corner.

  • :crop_y (Integer)

    Y coordinate of the crop left upper corner.

  • :crop_width (Integer)

    Width of the cropped photo in px.

Returns:

See Also:



710
711
712
713
714
715
716
# File 'lib/vk/api/methods.rb', line 710

def get_market_upload_server(arguments = {})
  require "vk/api/photos/methods/get_market_upload_server"
  method = Methods::GetMarketUploadServer.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_market_upload_server_response"
  Responses::GetMarketUploadServerResponse.new(response.deep_symbolize_keys)
end

#get_messages_upload_server(arguments = {}) ⇒ Vk::API::Photos::Responses::GetMessagesUploadServerResponse

Returns the server address for photo upload in a private message for a user.

Parameters:

  • arguments (Hash) (defaults to: {})

Returns:

See Also:



800
801
802
803
804
805
806
# File 'lib/vk/api/methods.rb', line 800

def get_messages_upload_server(arguments = {})
  require "vk/api/photos/methods/get_messages_upload_server"
  method = Methods::GetMessagesUploadServer.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_messages_upload_server_response"
  Responses::GetMessagesUploadServerResponse.new(response.deep_symbolize_keys)
end

#get_new_tags(arguments = {}) ⇒ Vk::API::Photos::Responses::GetNewTagsResponse

Returns a list of photos with tags that have not been viewed.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :offset (Integer)

    Offset needed to return a specific subset of photos.

  • :count (Integer) — default: 20

    Number of photos to return.

Returns:

See Also:



1190
1191
1192
1193
1194
1195
1196
# File 'lib/vk/api/methods.rb', line 1190

def get_new_tags(arguments = {})
  require "vk/api/photos/methods/get_new_tags"
  method = Methods::GetNewTags.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_new_tags_response"
  Responses::GetNewTagsResponse.new(response.deep_symbolize_keys)
end

#get_owner_photo_upload_server(arguments = {}) ⇒ Vk::API::Photos::Responses::GetOwnerPhotoUploadServerResponse

Returns an upload server address for a profile or community photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    identifier of a community or current user.; ; "Note that community id must be negative.; 'owner_id=1' – user; 'owner_id=-1' – community; "

Returns:

See Also:



681
682
683
684
685
686
687
# File 'lib/vk/api/methods.rb', line 681

def get_owner_photo_upload_server(arguments = {})
  require "vk/api/photos/methods/get_owner_photo_upload_server"
  method = Methods::GetOwnerPhotoUploadServer.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_owner_photo_upload_server_response"
  Responses::GetOwnerPhotoUploadServerResponse.new(response.deep_symbolize_keys)
end

#get_tags(arguments = {}) ⇒ Vk::API::Photos::Responses::GetTagsResponse

Returns a list of tags on a photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



1148
1149
1150
1151
1152
1153
1154
# File 'lib/vk/api/methods.rb', line 1148

def get_tags(arguments = {})
  require "vk/api/photos/methods/get_tags"
  method = Methods::GetTags.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_tags_response"
  Responses::GetTagsResponse.new(response.deep_symbolize_keys)
end

#get_upload_server(arguments = {}) ⇒ Vk::API::Photos::Responses::GetUploadServerResponse

Returns the server address for photo upload.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :album_id (Integer)

    Album ID.

  • :group_id (Integer)

    ID of community that owns the album (if the photo will be uploaded to a community album).

Returns:

See Also:



670
671
672
673
674
675
676
# File 'lib/vk/api/methods.rb', line 670

def get_upload_server(arguments = {})
  require "vk/api/photos/methods/get_upload_server"
  method = Methods::GetUploadServer.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_upload_server_response"
  Responses::GetUploadServerResponse.new(response.deep_symbolize_keys)
end

#get_user_photos(arguments = {}) ⇒ Vk::API::Photos::Responses::GetUserPhotosResponse

Returns a list of photos in which a user is tagged.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :user_id (Integer)

    User ID.

  • :offset (Integer)

    Offset needed to return a specific subset of photos. By default, '0'.

  • :count (Integer) — default: 20

    Number of photos to return. Maximum value is 100.

  • :extended (Boolean)

    '1' — to return an additional 'likes' field; '0' — (default)

  • :sort (String)

    Sort order:; '1' — by date the tag was added in ascending order; '0' — by date the tag was added in descending order

Returns:

See Also:



994
995
996
997
998
999
1000
# File 'lib/vk/api/methods.rb', line 994

def get_user_photos(arguments = {})
  require "vk/api/photos/methods/get_user_photos"
  method = Methods::GetUserPhotos.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_user_photos_response"
  Responses::GetUserPhotosResponse.new(response.deep_symbolize_keys)
end

#get_wall_upload_server(arguments = {}) ⇒ Vk::API::Photos::Responses::GetWallUploadServerResponse

Returns the server address for photo upload onto a user's wall.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    ID of community to whose wall the photo will be uploaded.

Returns:

See Also:



790
791
792
793
794
795
796
# File 'lib/vk/api/methods.rb', line 790

def get_wall_upload_server(arguments = {})
  require "vk/api/photos/methods/get_wall_upload_server"
  method = Methods::GetWallUploadServer.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/get_wall_upload_server_response"
  Responses::GetWallUploadServerResponse.new(response.deep_symbolize_keys)
end

#make_cover(arguments = {}) ⇒ Vk::API::Photos::Responses::MakeCoverResponse

Returns Makes a photo into an album cover.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :photo_id (Integer)

    Photo ID.

  • :album_id (Integer)

    Album ID.

Returns:

See Also:



933
934
935
936
937
938
939
# File 'lib/vk/api/methods.rb', line 933

def make_cover(arguments = {})
  require "vk/api/photos/methods/make_cover"
  method = Methods::MakeCover.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/make_cover_response"
  Responses::MakeCoverResponse.new(response.deep_symbolize_keys)
end

#move(arguments = {}) ⇒ Vk::API::Photos::Responses::MoveResponse

Returns Moves a photo from one album to another.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :target_album_id (Integer)

    ID of the album to which the photo will be moved.

  • :photo_id (Integer)

    Photo ID.

Returns:

See Also:



920
921
922
923
924
925
926
# File 'lib/vk/api/methods.rb', line 920

def move(arguments = {})
  require "vk/api/photos/methods/move"
  method = Methods::Move.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/move_response"
  Responses::MoveResponse.new(response.deep_symbolize_keys)
end

#put_tag(arguments = {}) ⇒ Vk::API::Photos::Responses::PutTagResponse

Returns Adds a tag on the photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :photo_id (Integer)

    Photo ID.

  • :user_id (Integer)

    ID of the user to be tagged.

  • :x (Number)

    Upper left-corner coordinate of the tagged area (as a percentage of the photo's width).

  • :y (Number)

    Upper left-corner coordinate of the tagged area (as a percentage of the photo's height).

  • :x2 (Number)

    Lower right-corner coordinate of the tagged area (as a percentage of the photo's width).

  • :y2 (Number)

    Lower right-corner coordinate of the tagged area (as a percentage of the photo's height).

Returns:

See Also:



1165
1166
1167
1168
1169
1170
1171
# File 'lib/vk/api/methods.rb', line 1165

def put_tag(arguments = {})
  require "vk/api/photos/methods/put_tag"
  method = Methods::PutTag.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/put_tag_response"
  Responses::PutTagResponse.new(response.deep_symbolize_keys)
end

#remove_tag(arguments = {}) ⇒ Vk::API::Photos::Responses::RemoveTagResponse

Returns Removes a tag from a photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :photo_id (Integer)

    Photo ID.

  • :tag_id (Integer)

    Tag ID.

Returns:

See Also:



1178
1179
1180
1181
1182
1183
1184
# File 'lib/vk/api/methods.rb', line 1178

def remove_tag(arguments = {})
  require "vk/api/photos/methods/remove_tag"
  method = Methods::RemoveTag.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/remove_tag_response"
  Responses::RemoveTagResponse.new(response.deep_symbolize_keys)
end

#reorder_albums(arguments = {}) ⇒ Vk::API::Photos::Responses::ReorderAlbumsResponse

Returns Reorders the album in the list of user albums.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the album.

  • :album_id (Integer)

    Album ID.

  • :before (Integer)

    ID of the album before which the album in question shall be placed.

  • :after (Integer)

    ID of the album after which the album in question shall be placed.

Returns:

See Also:



947
948
949
950
951
952
953
# File 'lib/vk/api/methods.rb', line 947

def reorder_albums(arguments = {})
  require "vk/api/photos/methods/reorder_albums"
  method = Methods::ReorderAlbums.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/reorder_albums_response"
  Responses::ReorderAlbumsResponse.new(response.deep_symbolize_keys)
end

#reorder_photos(arguments = {}) ⇒ Vk::API::Photos::Responses::ReorderPhotosResponse

Returns Reorders the photo in the list of photos of the user album.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :photo_id (Integer)

    Photo ID.

  • :before (Integer)

    ID of the photo before which the photo in question shall be placed.

  • :after (Integer)

    ID of the photo after which the photo in question shall be placed.

Returns:

See Also:



961
962
963
964
965
966
967
# File 'lib/vk/api/methods.rb', line 961

def reorder_photos(arguments = {})
  require "vk/api/photos/methods/reorder_photos"
  method = Methods::ReorderPhotos.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/reorder_photos_response"
  Responses::ReorderPhotosResponse.new(response.deep_symbolize_keys)
end

#report(arguments = {}) ⇒ Vk::API::Photos::Responses::ReportResponse

Returns Reports (submits a complaint about) a photo.;.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :photo_id (Integer)

    Photo ID.

  • :reason (Integer)

    Reason for the complaint:; '0' – spam; '1' – child pornography; '2' – extremism; '3' – violence; '4' – drug propaganda; '5' – adult material; '6' – insult; abuse

Returns:

See Also:



826
827
828
829
830
831
832
# File 'lib/vk/api/methods.rb', line 826

def report(arguments = {})
  require "vk/api/photos/methods/report"
  method = Methods::Report.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/report_response"
  Responses::ReportResponse.new(response.deep_symbolize_keys)
end

#report_comment(arguments = {}) ⇒ Vk::API::Photos::Responses::ReportCommentResponse

Returns Reports (submits a complaint about) a comment on a photo.;.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :comment_id (Integer)

    ID of the comment being reported.

  • :reason (Integer)

    Reason for the complaint:; '0' – spam; '1' – child pornography; '2' – extremism; '3' – violence; '4' – drug propaganda; '5' – adult material; '6' – insult; abuse

Returns:

See Also:



839
840
841
842
843
844
845
# File 'lib/vk/api/methods.rb', line 839

def report_comment(arguments = {})
  require "vk/api/photos/methods/report_comment"
  method = Methods::ReportComment.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/report_comment_response"
  Responses::ReportCommentResponse.new(response.deep_symbolize_keys)
end

#restore(arguments = {}) ⇒ Vk::API::Photos::Responses::RestoreResponse

Returns Restores a deleted photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :photo_id (Integer)

    Photo ID.

Returns:

See Also:



1030
1031
1032
1033
1034
1035
1036
# File 'lib/vk/api/methods.rb', line 1030

def restore(arguments = {})
  require "vk/api/photos/methods/restore"
  method = Methods::Restore.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/restore_response"
  Responses::RestoreResponse.new(response.deep_symbolize_keys)
end

#restore_comment(arguments = {}) ⇒ Vk::API::Photos::Responses::RestoreCommentResponse

Returns Restores a deleted comment on a photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :owner_id (Integer)

    ID of the user or community that owns the photo.

  • :comment_id (Integer)

    ID of the deleted comment.

Returns:

See Also:



1121
1122
1123
1124
1125
1126
1127
# File 'lib/vk/api/methods.rb', line 1121

def restore_comment(arguments = {})
  require "vk/api/photos/methods/restore_comment"
  method = Methods::RestoreComment.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/restore_comment_response"
  Responses::RestoreCommentResponse.new(response.deep_symbolize_keys)
end

#save(arguments = {}) ⇒ Vk::API::Photos::Responses::SaveResponse

Returns Saves photos after successful uploading.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :album_id (Integer)

    ID of the album to save photos to.

  • :group_id (Integer)

    ID of the community to save photos to.

  • :server (Integer)

    Parameter returned when .

  • :photos_list (String)

    Parameter returned when .

  • :hash (String)

    Parameter returned when .

  • :latitude (Number)

    Geographical latitude, in degrees (from '-90' to '90').

  • :longitude (Number)

    Geographical longitude, in degrees (from '-180' to '180').

  • :caption (String)

    Text describing the photo. 2048 digits max.

Returns:

See Also:



876
877
878
879
880
881
882
# File 'lib/vk/api/methods.rb', line 876

def save(arguments = {})
  require "vk/api/photos/methods/save"
  method = Methods::Save.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/save_response"
  Responses::SaveResponse.new(response.deep_symbolize_keys)
end

#save_market_album_photo(arguments = {}) ⇒ Vk::API::Photos::Responses::SaveMarketAlbumPhotoResponse

Returns Saves market album photos after successful uploading.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :photo (String)

    Parameter returned when photos are .

  • :server (Integer)

    Parameter returned when photos are .

  • :hash (String)

    Parameter returned when photos are .

Returns:

See Also:



751
752
753
754
755
756
757
# File 'lib/vk/api/methods.rb', line 751

def save_market_album_photo(arguments = {})
  require "vk/api/photos/methods/save_market_album_photo"
  method = Methods::SaveMarketAlbumPhoto.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/save_market_album_photo_response"
  Responses::SaveMarketAlbumPhotoResponse.new(response.deep_symbolize_keys)
end

#save_market_photo(arguments = {}) ⇒ Vk::API::Photos::Responses::SaveMarketPhotoResponse

Returns Saves market photos after successful uploading.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :photo (String)

    Parameter returned when photos are .

  • :server (Integer)

    Parameter returned when photos are .

  • :hash (String)

    Parameter returned when photos are .

  • :crop_data (String)

    Parameter returned when photos are .

  • :crop_hash (String)

    Parameter returned when photos are .

Returns:

See Also:



737
738
739
740
741
742
743
# File 'lib/vk/api/methods.rb', line 737

def save_market_photo(arguments = {})
  require "vk/api/photos/methods/save_market_photo"
  method = Methods::SaveMarketPhoto.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/save_market_photo_response"
  Responses::SaveMarketPhotoResponse.new(response.deep_symbolize_keys)
end

#save_messages_photo(arguments = {}) ⇒ Vk::API::Photos::Responses::SaveMessagesPhotoResponse

Returns Saves a photo after being successfully uploaded. URL obtained with method.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



813
814
815
816
817
818
819
# File 'lib/vk/api/methods.rb', line 813

def save_messages_photo(arguments = {})
  require "vk/api/photos/methods/save_messages_photo"
  method = Methods::SaveMessagesPhoto.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/save_messages_photo_response"
  Responses::SaveMessagesPhotoResponse.new(response.deep_symbolize_keys)
end

#save_owner_photo(arguments = {}) ⇒ Vk::API::Photos::Responses::SaveOwnerPhotoResponse

Returns Saves a profile or community photo.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :server (String)

    parameter returned after .

  • :hash (String)

    parameter returned after .

  • :photo (String)

    parameter returned after .

Returns:

See Also:



764
765
766
767
768
769
770
# File 'lib/vk/api/methods.rb', line 764

def save_owner_photo(arguments = {})
  require "vk/api/photos/methods/save_owner_photo"
  method = Methods::SaveOwnerPhoto.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/save_owner_photo_response"
  Responses::SaveOwnerPhotoResponse.new(response.deep_symbolize_keys)
end

#save_wall_photo(arguments = {}) ⇒ Vk::API::Photos::Responses::SaveWallPhotoResponse

Returns Saves a photo to a user's or community's wall after being uploaded.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



779
780
781
782
783
784
785
# File 'lib/vk/api/methods.rb', line 779

def save_wall_photo(arguments = {})
  require "vk/api/photos/methods/save_wall_photo"
  method = Methods::SaveWallPhoto.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/save_wall_photo_response"
  Responses::SaveWallPhotoResponse.new(response.deep_symbolize_keys)
end

#search(arguments = {}) ⇒ Vk::API::Photos::Responses::SearchResponse

Returns a list of photos.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :q (String)

    Search query string.

  • :lat (Number)

    Geographical latitude, in degrees (from '-90' to '90').

  • :long (Number)

    Geographical longitude, in degrees (from '-180' to '180').;

  • :start_time (Integer)
  • :end_time (Integer)
  • :sort (Integer)

    Sort order:

  • :offset (Integer)

    Offset needed to return a specific subset of photos.

  • :count (Integer) — default: 100

    Number of photos to return.

  • :radius (Integer) — default: 5000

    Radius of search in meters (works very approximately). Available values: '10', '100', '800', '6000', '50000'.

Returns:

See Also:



858
859
860
861
862
863
864
# File 'lib/vk/api/methods.rb', line 858

def search(arguments = {})
  require "vk/api/photos/methods/search"
  method = Methods::Search.new(arguments)
  response = method.call(@client)
  require "vk/api/photos/responses/search_response"
  Responses::SearchResponse.new(response.deep_symbolize_keys)
end