Class: Vk::Schema::Method Abstract

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/vk/schema/method.rb

Overview

This class is abstract.

Direct Known Subclasses

API::Account::Methods::BanUser, API::Account::Methods::ChangePassword, API::Account::Methods::GetActiveOffers, API::Account::Methods::GetAppPermissions, API::Account::Methods::GetBanned, API::Account::Methods::GetCounters, API::Account::Methods::GetInfo, API::Account::Methods::GetProfileInfo, API::Account::Methods::GetPushSettings, API::Account::Methods::LookupContacts, API::Account::Methods::RegisterDevice, API::Account::Methods::SaveProfileInfo, API::Account::Methods::SetInfo, API::Account::Methods::SetNameInMenu, API::Account::Methods::SetOffline, API::Account::Methods::SetOnline, API::Account::Methods::SetPushSettings, API::Account::Methods::SetSilenceMode, API::Account::Methods::UnbanUser, API::Account::Methods::UnregisterDevice, API::Ads::Methods::AddOfficeUsers, API::Ads::Methods::CheckLink, API::Ads::Methods::CreateAds, API::Ads::Methods::CreateCampaigns, API::Ads::Methods::CreateClients, API::Ads::Methods::CreateTargetGroup, API::Ads::Methods::DeleteAds, API::Ads::Methods::DeleteCampaigns, API::Ads::Methods::DeleteClients, API::Ads::Methods::DeleteTargetGroup, API::Ads::Methods::GetAccounts, API::Ads::Methods::GetAds, API::Ads::Methods::GetAdsLayout, API::Ads::Methods::GetAdsPostsReach, API::Ads::Methods::GetAdsTargeting, API::Ads::Methods::GetBudget, API::Ads::Methods::GetCampaigns, API::Ads::Methods::GetCategories, API::Ads::Methods::GetClients, API::Ads::Methods::GetDemographics, API::Ads::Methods::GetFloodStats, API::Ads::Methods::GetOfficeUsers, API::Ads::Methods::GetRejectionReason, API::Ads::Methods::GetStatistics, API::Ads::Methods::GetSuggestions, API::Ads::Methods::GetTargetGroups, API::Ads::Methods::GetTargetingStats, API::Ads::Methods::GetUploadUrl, API::Ads::Methods::GetVideoUploadUrl, API::Ads::Methods::ImportTargetContacts, API::Ads::Methods::RemoveOfficeUsers, API::Ads::Methods::UpdateAds, API::Ads::Methods::UpdateCampaigns, API::Ads::Methods::UpdateClients, API::Ads::Methods::UpdateTargetGroup, API::Apps::Methods::DeleteAppRequests, API::Apps::Methods::Get, API::Apps::Methods::GetCatalog, API::Apps::Methods::GetFriendsList, API::Apps::Methods::GetLeaderboard, API::Apps::Methods::GetScore, API::Apps::Methods::SendRequest, API::Audio::Methods::Add, API::Audio::Methods::AddAlbum, API::Audio::Methods::Delete, API::Audio::Methods::DeleteAlbum, API::Audio::Methods::Edit, API::Audio::Methods::EditAlbum, API::Audio::Methods::Get, API::Audio::Methods::GetAlbums, API::Audio::Methods::GetBroadcastList, API::Audio::Methods::GetById, API::Audio::Methods::GetCount, API::Audio::Methods::GetLyrics, API::Audio::Methods::GetPopular, API::Audio::Methods::GetRecommendations, API::Audio::Methods::GetUploadServer, API::Audio::Methods::MoveToAlbum, API::Audio::Methods::Reorder, API::Audio::Methods::Restore, API::Audio::Methods::Save, API::Audio::Methods::Search, API::Audio::Methods::SetBroadcast, API::Auth::Methods::CheckPhone, API::Auth::Methods::Confirm, API::Auth::Methods::Restore, API::Auth::Methods::Signup, API::Board::Methods::AddTopic, API::Board::Methods::CloseTopic, API::Board::Methods::CreateComment, API::Board::Methods::DeleteComment, API::Board::Methods::DeleteTopic, API::Board::Methods::EditComment, API::Board::Methods::EditTopic, API::Board::Methods::FixTopic, API::Board::Methods::GetComments, API::Board::Methods::GetTopics, API::Board::Methods::OpenTopic, API::Board::Methods::RestoreComment, API::Board::Methods::UnfixTopic, API::Database::Methods::GetChairs, API::Database::Methods::GetCities, API::Database::Methods::GetCitiesById, API::Database::Methods::GetCountries, API::Database::Methods::GetCountriesById, API::Database::Methods::GetFaculties, API::Database::Methods::GetRegions, API::Database::Methods::GetSchoolClasses, API::Database::Methods::GetSchools, API::Database::Methods::GetStreetsById, API::Database::Methods::GetUniversities, API::Docs::Methods::Add, API::Docs::Methods::Delete, API::Docs::Methods::Edit, API::Docs::Methods::Get, API::Docs::Methods::GetById, API::Docs::Methods::GetTypes, API::Docs::Methods::GetUploadServer, API::Docs::Methods::GetWallUploadServer, API::Docs::Methods::Save, API::Docs::Methods::Search, API::Fave::Methods::AddGroup, API::Fave::Methods::AddLink, API::Fave::Methods::AddUser, API::Fave::Methods::GetLinks, API::Fave::Methods::GetMarketItems, API::Fave::Methods::GetPhotos, API::Fave::Methods::GetPosts, API::Fave::Methods::GetUsers, API::Fave::Methods::GetVideos, API::Fave::Methods::RemoveGroup, API::Fave::Methods::RemoveLink, API::Fave::Methods::RemoveUser, API::Friends::Methods::Add, API::Friends::Methods::AddList, API::Friends::Methods::AreFriends, API::Friends::Methods::Delete, API::Friends::Methods::DeleteAllRequests, API::Friends::Methods::DeleteList, API::Friends::Methods::Edit, API::Friends::Methods::EditList, API::Friends::Methods::Get, API::Friends::Methods::GetAppUsers, API::Friends::Methods::GetAvailableForCall, API::Friends::Methods::GetByPhones, API::Friends::Methods::GetLists, API::Friends::Methods::GetMutual, API::Friends::Methods::GetOnline, API::Friends::Methods::GetRecent, API::Friends::Methods::GetRequests, API::Friends::Methods::GetSuggestions, API::Friends::Methods::Search, API::Gifts::Methods::Get, API::Groups::Methods::AddLink, API::Groups::Methods::ApproveRequest, API::Groups::Methods::BanUser, API::Groups::Methods::Create, API::Groups::Methods::DeleteLink, API::Groups::Methods::Edit, API::Groups::Methods::EditLink, API::Groups::Methods::EditManager, API::Groups::Methods::EditPlace, API::Groups::Methods::Get, API::Groups::Methods::GetBanned, API::Groups::Methods::GetById, API::Groups::Methods::GetCallbackConfirmationCode, API::Groups::Methods::GetCallbackServerSettings, API::Groups::Methods::GetCallbackSettings, API::Groups::Methods::GetCatalog, API::Groups::Methods::GetCatalogInfo, API::Groups::Methods::GetInvitedUsers, API::Groups::Methods::GetInvites, API::Groups::Methods::GetMembers, API::Groups::Methods::GetRequests, API::Groups::Methods::GetSettings, API::Groups::Methods::Invite, API::Groups::Methods::IsMember, API::Groups::Methods::Join, API::Groups::Methods::Leave, API::Groups::Methods::RemoveUser, API::Groups::Methods::ReorderLink, API::Groups::Methods::Search, API::Groups::Methods::SetCallbackServer, API::Groups::Methods::SetCallbackServerSettings, API::Groups::Methods::SetCallbackSettings, API::Groups::Methods::UnbanUser, API::Leads::Methods::CheckUser, API::Leads::Methods::Complete, API::Leads::Methods::GetStats, API::Leads::Methods::GetUsers, API::Leads::Methods::MetricHit, API::Leads::Methods::Start, API::Likes::Methods::Add, API::Likes::Methods::Delete, API::Likes::Methods::GetList, API::Likes::Methods::IsLiked, API::Market::Methods::Add, API::Market::Methods::AddAlbum, API::Market::Methods::AddToAlbum, API::Market::Methods::CreateComment, API::Market::Methods::Delete, API::Market::Methods::DeleteAlbum, API::Market::Methods::DeleteComment, API::Market::Methods::Edit, API::Market::Methods::EditAlbum, API::Market::Methods::EditComment, API::Market::Methods::Get, API::Market::Methods::GetAlbumById, API::Market::Methods::GetAlbums, API::Market::Methods::GetById, API::Market::Methods::GetCategories, API::Market::Methods::GetComments, API::Market::Methods::RemoveFromAlbum, API::Market::Methods::ReorderAlbums, API::Market::Methods::ReorderItems, API::Market::Methods::Report, API::Market::Methods::ReportComment, API::Market::Methods::Restore, API::Market::Methods::RestoreComment, API::Market::Methods::Search, API::Messages::Methods::AddChatUser, API::Messages::Methods::CreateChat, API::Messages::Methods::Delete, API::Messages::Methods::DeleteChatPhoto, API::Messages::Methods::DeleteDialog, API::Messages::Methods::EditChat, API::Messages::Methods::Get, API::Messages::Methods::GetById, API::Messages::Methods::GetChat, API::Messages::Methods::GetChatUsers, API::Messages::Methods::GetDialogs, API::Messages::Methods::GetHistory, API::Messages::Methods::GetHistoryAttachments, API::Messages::Methods::GetLastActivity, API::Messages::Methods::GetLongPollHistory, API::Messages::Methods::GetLongPollServer, API::Messages::Methods::MarkAsImportant, API::Messages::Methods::MarkAsRead, API::Messages::Methods::RemoveChatUser, API::Messages::Methods::Restore, API::Messages::Methods::Search, API::Messages::Methods::SearchDialogs, API::Messages::Methods::Send, API::Messages::Methods::SetActivity, API::Messages::Methods::SetChatPhoto, API::Newsfeed::Methods::AddBan, API::Newsfeed::Methods::DeleteBan, API::Newsfeed::Methods::DeleteList, API::Newsfeed::Methods::Get, API::Newsfeed::Methods::GetBanned, API::Newsfeed::Methods::GetComments, API::Newsfeed::Methods::GetLists, API::Newsfeed::Methods::GetMentions, API::Newsfeed::Methods::GetRecommended, API::Newsfeed::Methods::GetSuggestedSources, API::Newsfeed::Methods::IgnoreItem, API::Newsfeed::Methods::SaveList, API::Newsfeed::Methods::Search, API::Newsfeed::Methods::UnignoreItem, API::Newsfeed::Methods::Unsubscribe, API::Notes::Methods::Add, API::Notes::Methods::CreateComment, API::Notes::Methods::Delete, API::Notes::Methods::DeleteComment, API::Notes::Methods::Edit, API::Notes::Methods::EditComment, API::Notes::Methods::Get, API::Notes::Methods::GetById, API::Notes::Methods::GetComments, API::Notes::Methods::RestoreComment, API::Notifications::Methods::Get, API::Notifications::Methods::MarkAsViewed, API::Orders::Methods::ChangeState, API::Orders::Methods::Get, API::Orders::Methods::GetAmount, API::Orders::Methods::GetById, API::Pages::Methods::ClearCache, API::Pages::Methods::Get, API::Pages::Methods::GetHistory, API::Pages::Methods::GetTitles, API::Pages::Methods::GetVersion, API::Pages::Methods::ParseWiki, API::Pages::Methods::Save, API::Pages::Methods::SaveAccess, API::Photos::Methods::ConfirmTag, API::Photos::Methods::Copy, API::Photos::Methods::CreateAlbum, API::Photos::Methods::CreateComment, API::Photos::Methods::Delete, API::Photos::Methods::DeleteAlbum, API::Photos::Methods::DeleteComment, API::Photos::Methods::Edit, API::Photos::Methods::EditAlbum, API::Photos::Methods::EditComment, API::Photos::Methods::Get, API::Photos::Methods::GetAlbums, API::Photos::Methods::GetAlbumsCount, API::Photos::Methods::GetAll, API::Photos::Methods::GetAllComments, API::Photos::Methods::GetById, API::Photos::Methods::GetChatUploadServer, API::Photos::Methods::GetComments, API::Photos::Methods::GetMarketAlbumUploadServer, API::Photos::Methods::GetMarketUploadServer, API::Photos::Methods::GetMessagesUploadServer, API::Photos::Methods::GetNewTags, API::Photos::Methods::GetOwnerPhotoUploadServer, API::Photos::Methods::GetTags, API::Photos::Methods::GetUploadServer, API::Photos::Methods::GetUserPhotos, API::Photos::Methods::GetWallUploadServer, API::Photos::Methods::MakeCover, API::Photos::Methods::Move, API::Photos::Methods::PutTag, API::Photos::Methods::RemoveTag, API::Photos::Methods::ReorderAlbums, API::Photos::Methods::ReorderPhotos, API::Photos::Methods::Report, API::Photos::Methods::ReportComment, API::Photos::Methods::Restore, API::Photos::Methods::RestoreComment, API::Photos::Methods::Save, API::Photos::Methods::SaveMarketAlbumPhoto, API::Photos::Methods::SaveMarketPhoto, API::Photos::Methods::SaveMessagesPhoto, API::Photos::Methods::SaveOwnerPhoto, API::Photos::Methods::SaveWallPhoto, API::Photos::Methods::Search, API::Places::Methods::Add, API::Places::Methods::Checkin, API::Places::Methods::GetById, API::Places::Methods::GetCheckins, API::Places::Methods::GetTypes, API::Places::Methods::Search, API::Polls::Methods::AddVote, API::Polls::Methods::Create, API::Polls::Methods::DeleteVote, API::Polls::Methods::Edit, API::Polls::Methods::GetById, API::Polls::Methods::GetVoters, API::Search::Methods::GetHints, API::Secure::Methods::AddAppEvent, API::Secure::Methods::CheckToken, API::Secure::Methods::GetAppBalance, API::Secure::Methods::GetSmsHistory, API::Secure::Methods::GetTransactionsHistory, API::Secure::Methods::GetUserLevel, API::Secure::Methods::SendNotification, API::Secure::Methods::SendSmsNotification, API::Secure::Methods::SetCounter, API::Secure::Methods::SetUserLevel, API::Stats::Methods::Get, API::Stats::Methods::GetPostReach, API::Stats::Methods::TrackVisitor, API::Status::Methods::Get, API::Status::Methods::Set, API::Storage::Methods::Get, API::Storage::Methods::GetKeys, API::Storage::Methods::Set, API::Users::Methods::Get, API::Users::Methods::GetFollowers, API::Users::Methods::GetNearby, API::Users::Methods::GetSubscriptions, API::Users::Methods::IsAppUser, API::Users::Methods::Report, API::Users::Methods::Search, API::Utils::Methods::CheckLink, API::Utils::Methods::GetServerTime, API::Utils::Methods::ResolveScreenName, API::Video::Methods::Add, API::Video::Methods::AddAlbum, API::Video::Methods::AddToAlbum, API::Video::Methods::CreateComment, API::Video::Methods::Delete, API::Video::Methods::DeleteAlbum, API::Video::Methods::DeleteComment, API::Video::Methods::Edit, API::Video::Methods::EditAlbum, API::Video::Methods::EditComment, API::Video::Methods::Get, API::Video::Methods::GetAlbumById, API::Video::Methods::GetAlbums, API::Video::Methods::GetAlbumsByVideo, API::Video::Methods::GetCatalog, API::Video::Methods::GetCatalogSection, API::Video::Methods::GetComments, API::Video::Methods::GetNewTags, API::Video::Methods::GetTags, API::Video::Methods::GetUserVideos, API::Video::Methods::HideCatalogSection, API::Video::Methods::PutTag, API::Video::Methods::RemoveFromAlbum, API::Video::Methods::RemoveTag, API::Video::Methods::ReorderAlbums, API::Video::Methods::ReorderVideos, API::Video::Methods::Report, API::Video::Methods::ReportComment, API::Video::Methods::Restore, API::Video::Methods::RestoreComment, API::Video::Methods::Save, API::Video::Methods::Search, API::Wall::Methods::CreateComment, API::Wall::Methods::Delete, API::Wall::Methods::DeleteComment, API::Wall::Methods::Edit, API::Wall::Methods::EditComment, API::Wall::Methods::Get, API::Wall::Methods::GetById, API::Wall::Methods::GetComments, API::Wall::Methods::GetReposts, API::Wall::Methods::Pin, API::Wall::Methods::Post, API::Wall::Methods::ReportComment, API::Wall::Methods::ReportPost, API::Wall::Methods::Repost, API::Wall::Methods::Restore, API::Wall::Methods::RestoreComment, API::Wall::Methods::Search, API::Wall::Methods::Unpin, API::Widgets::Methods::GetComments, API::Widgets::Methods::GetPages

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.methodString

Returns:

  • (String)


16
17
18
# File 'lib/vk/schema/method.rb', line 16

def method
  @method
end

.openBoolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/vk/schema/method.rb', line 14

def open
  @open
end

Instance Method Details

#call(client) ⇒ Hash

Parameters:

Returns:

  • (Hash)


26
27
28
# File 'lib/vk/schema/method.rb', line 26

def call(client)
  client.request(method, to_hash).deep_symbolize_keys
end

#methodString

Returns:

  • (String)


20
21
22
# File 'lib/vk/schema/method.rb', line 20

def method
  self.class.method
end

#to_hashObject



30
31
32
33
34
# File 'lib/vk/schema/method.rb', line 30

def to_hash
  super.each_with_object({}) do |(key, value), memo|
    memo[key] = value unless value.nil?
  end
end