Class: Vk::API::Fave

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/fave/faves_link.rb,
lib/vk/api/fave/methods/add_link.rb,
lib/vk/api/fave/methods/add_user.rb,
lib/vk/api/fave/methods/add_group.rb,
lib/vk/api/fave/methods/get_links.rb,
lib/vk/api/fave/methods/get_posts.rb,
lib/vk/api/fave/methods/get_users.rb,
lib/vk/api/fave/methods/get_photos.rb,
lib/vk/api/fave/methods/get_videos.rb,
lib/vk/api/fave/methods/remove_link.rb,
lib/vk/api/fave/methods/remove_user.rb,
lib/vk/api/fave/methods/remove_group.rb,
lib/vk/api/fave/methods/get_market_items.rb,
lib/vk/api/fave/responses/add_link_response.rb,
lib/vk/api/fave/responses/add_user_response.rb,
lib/vk/api/fave/responses/add_group_response.rb,
lib/vk/api/fave/responses/get_links_response.rb,
lib/vk/api/fave/responses/get_posts_response.rb,
lib/vk/api/fave/responses/get_users_response.rb,
lib/vk/api/fave/responses/get_photos_response.rb,
lib/vk/api/fave/responses/get_videos_response.rb,
lib/vk/api/fave/responses/remove_link_response.rb,
lib/vk/api/fave/responses/remove_user_response.rb,
lib/vk/api/fave/responses/remove_group_response.rb,
lib/vk/api/fave/responses/get_market_items_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: FavesLink

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

#add_group(arguments = {}) ⇒ Vk::API::Fave::Responses::AddGroupResponse

Returns Adds a community to user faves.

Parameters:

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

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

Returns:

See Also:


5107
5108
5109
5110
5111
5112
5113
# File 'lib/vk/api/methods.rb', line 5107

def add_group(arguments = {})
  require "vk/api/fave/methods/add_group"
  method = Methods::AddGroup.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/add_group_response"
  Responses::AddGroupResponse.new(response.deep_symbolize_keys)
end

Returns Adds a link to user faves.

Parameters:

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

Options Hash (arguments):

  • :link (String)

    Link URL.

  • :text (String)

    Description text.

Returns:

See Also:


5130
5131
5132
5133
5134
5135
5136
# File 'lib/vk/api/methods.rb', line 5130

def add_link(arguments = {})
  require "vk/api/fave/methods/add_link"
  method = Methods::AddLink.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/add_link_response"
  Responses::AddLinkResponse.new(response.deep_symbolize_keys)
end

#add_user(arguments = {}) ⇒ Vk::API::Fave::Responses::AddUserResponse

Returns Adds a profile to user faves.

Parameters:

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

Options Hash (arguments):

  • :user_id (Integer)

    Profile ID.

Returns:

See Also:


5085
5086
5087
5088
5089
5090
5091
# File 'lib/vk/api/methods.rb', line 5085

def add_user(arguments = {})
  require "vk/api/fave/methods/add_user"
  method = Methods::AddUser.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/add_user_response"
  Responses::AddUserResponse.new(response.deep_symbolize_keys)
end

Returns a list of links that the current user has bookmarked.

Parameters:

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

Options Hash (arguments):

  • :offset (Integer)

    Offset needed to return a specific subset of users.

  • :count (Integer) — default: 50

    Number of results to return.

Returns:

See Also:


5062
5063
5064
5065
5066
5067
5068
# File 'lib/vk/api/methods.rb', line 5062

def get_links(arguments = {})
  require "vk/api/fave/methods/get_links"
  method = Methods::GetLinks.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/get_links_response"
  Responses::GetLinksResponse.new(response.deep_symbolize_keys)
end

#get_market_items(arguments = {}) ⇒ Vk::API::Fave::Responses::GetMarketItemsResponse

Returns market items bookmarked by current user.

Parameters:

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

Options Hash (arguments):

  • :count (Integer) — default: 50

    Number of results to return. ;

  • :extended (Boolean)

    '1' – to return additional fields 'likes, can_comment, can_repost, photos'. By default: '0'.

Returns:

See Also:


5074
5075
5076
5077
5078
5079
5080
# File 'lib/vk/api/methods.rb', line 5074

def get_market_items(arguments = {})
  require "vk/api/fave/methods/get_market_items"
  method = Methods::GetMarketItems.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/get_market_items_response"
  Responses::GetMarketItemsResponse.new(response.deep_symbolize_keys)
end

#get_photos(arguments = {}) ⇒ Vk::API::Fave::Responses::GetPhotosResponse

Returns a list of photos that the current user has liked.; ;

Parameters:

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

Options Hash (arguments):

  • :offset (Integer)

    Offset needed to return a specific subset of photos.

  • :count (Integer) — default: 50

    Number of photos to return.

  • :photo_sizes (Boolean)

    '1' — to return photo sizes in a .

Returns:

See Also:


5024
5025
5026
5027
5028
5029
5030
# File 'lib/vk/api/methods.rb', line 5024

def get_photos(arguments = {})
  require "vk/api/fave/methods/get_photos"
  method = Methods::GetPhotos.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/get_photos_response"
  Responses::GetPhotosResponse.new(response.deep_symbolize_keys)
end

#get_posts(arguments = {}) ⇒ Vk::API::Fave::Responses::GetPostsResponse

Returns a list of wall posts that the current user has liked.;

Parameters:

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

Options Hash (arguments):

  • :offset (Integer)

    Offset needed to return a specific subset of posts.

  • :count (Integer) — default: 50

    Number of posts to return.

  • :extended (Boolean)

    '1' — to return additional 'wall', 'profiles', and 'groups' fields.; ; By default: '0'.

Returns:

See Also:


5037
5038
5039
5040
5041
5042
5043
# File 'lib/vk/api/methods.rb', line 5037

def get_posts(arguments = {})
  require "vk/api/fave/methods/get_posts"
  method = Methods::GetPosts.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/get_posts_response"
  Responses::GetPostsResponse.new(response.deep_symbolize_keys)
end

#get_users(arguments = {}) ⇒ Vk::API::Fave::Responses::GetUsersResponse

Returns a list of users whom the current user has bookmarked.; ;

Parameters:

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

Options Hash (arguments):

  • :offset (Integer)

    Offset needed to return a specific subset of users.

  • :count (Integer) — default: 50

    Number of users to return.

Returns:

See Also:


5011
5012
5013
5014
5015
5016
5017
# File 'lib/vk/api/methods.rb', line 5011

def get_users(arguments = {})
  require "vk/api/fave/methods/get_users"
  method = Methods::GetUsers.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/get_users_response"
  Responses::GetUsersResponse.new(response.deep_symbolize_keys)
end

#get_videos(arguments = {}) ⇒ Vk::API::Fave::Responses::GetVideosResponse

Returns a list of videos that the current user has liked.;

Parameters:

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

Options Hash (arguments):

  • :offset (Integer)

    Offset needed to return a specific subset of videos.

  • :count (Integer) — default: 50

    Number of videos to return.

  • :extended (Boolean)

    Return an additional information about videos. Also returns all owners profiles and groups.

Returns:

See Also:


5050
5051
5052
5053
5054
5055
5056
# File 'lib/vk/api/methods.rb', line 5050

def get_videos(arguments = {})
  require "vk/api/fave/methods/get_videos"
  method = Methods::GetVideos.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/get_videos_response"
  Responses::GetVideosResponse.new(response.deep_symbolize_keys)
end

#remove_group(arguments = {}) ⇒ Vk::API::Fave::Responses::RemoveGroupResponse

Returns Removes a community from user faves.

Parameters:

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

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

Returns:

See Also:


5118
5119
5120
5121
5122
5123
5124
# File 'lib/vk/api/methods.rb', line 5118

def remove_group(arguments = {})
  require "vk/api/fave/methods/remove_group"
  method = Methods::RemoveGroup.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/remove_group_response"
  Responses::RemoveGroupResponse.new(response.deep_symbolize_keys)
end

Returns Removes link from the user's faves.

Parameters:

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

Options Hash (arguments):

  • :link_id (String)

    Link ID (can be obtained by method).

Returns:

See Also:


5141
5142
5143
5144
5145
5146
5147
# File 'lib/vk/api/methods.rb', line 5141

def remove_link(arguments = {})
  require "vk/api/fave/methods/remove_link"
  method = Methods::RemoveLink.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/remove_link_response"
  Responses::RemoveLinkResponse.new(response.deep_symbolize_keys)
end

#remove_user(arguments = {}) ⇒ Vk::API::Fave::Responses::RemoveUserResponse

Returns Removes a profile from user faves.

Parameters:

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

Options Hash (arguments):

  • :user_id (Integer)

    Profile ID.

Returns:

See Also:


5096
5097
5098
5099
5100
5101
5102
# File 'lib/vk/api/methods.rb', line 5096

def remove_user(arguments = {})
  require "vk/api/fave/methods/remove_user"
  method = Methods::RemoveUser.new(arguments)
  response = method.call(@client)
  require "vk/api/fave/responses/remove_user_response"
  Responses::RemoveUserResponse.new(response.deep_symbolize_keys)
end