From 2e628db9fd7487116df84a9fbadaedda3379706f Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Tue, 22 Sep 2020 13:45:38 +0300 Subject: [PATCH] version 2.4.0 --- README.md | 6 +- dependencies.gradle | 8 +- vk-sdk-api/README.md | 2 +- .../java/com/vk/sdk/api/ApiRequestBase.kt | 39 ++++ .../src/main/java/com/vk/sdk/api/Constants.kt | 34 +++ .../vk/sdk/api/account/methods/AccountBan.kt | 4 +- .../account/methods/AccountChangePassword.kt | 4 +- .../account/methods/AccountGetActiveOffers.kt | 4 +- .../methods/AccountGetAppPermissions.kt | 4 +- .../api/account/methods/AccountGetBanned.kt | 4 +- .../api/account/methods/AccountGetCounters.kt | 4 +- .../sdk/api/account/methods/AccountGetInfo.kt | 12 +- .../account/methods/AccountGetProfileInfo.kt | 5 +- .../account/methods/AccountGetPushSettings.kt | 4 +- .../account/methods/AccountRegisterDevice.kt | 4 +- .../account/methods/AccountSaveProfileInfo.kt | 16 +- .../sdk/api/account/methods/AccountSetInfo.kt | 4 +- .../account/methods/AccountSetNameInMenu.kt | 4 +- .../api/account/methods/AccountSetOffline.kt | 4 +- .../api/account/methods/AccountSetOnline.kt | 4 +- .../account/methods/AccountSetPushSettings.kt | 4 +- .../account/methods/AccountSetSilenceMode.kt | 6 +- .../sdk/api/account/methods/AccountUnban.kt | 4 +- .../methods/AccountUnregisterDevice.kt | 4 +- .../sdk/api/ads/methods/AdsAddOfficeUsers.kt | 4 +- .../vk/sdk/api/ads/methods/AdsCheckLink.kt | 8 +- .../vk/sdk/api/ads/methods/AdsCreateAds.kt | 4 +- .../sdk/api/ads/methods/AdsCreateCampaigns.kt | 4 +- .../sdk/api/ads/methods/AdsCreateClients.kt | 4 +- .../api/ads/methods/AdsCreateTargetGroup.kt | 6 +- .../vk/sdk/api/ads/methods/AdsDeleteAds.kt | 4 +- .../sdk/api/ads/methods/AdsDeleteCampaigns.kt | 4 +- .../sdk/api/ads/methods/AdsDeleteClients.kt | 4 +- .../api/ads/methods/AdsDeleteTargetGroup.kt | 4 +- .../vk/sdk/api/ads/methods/AdsGetAccounts.kt | 4 +- .../com/vk/sdk/api/ads/methods/AdsGetAds.kt | 12 +- .../vk/sdk/api/ads/methods/AdsGetAdsLayout.kt | 8 +- .../sdk/api/ads/methods/AdsGetAdsTargeting.kt | 8 +- .../vk/sdk/api/ads/methods/AdsGetBudget.kt | 4 +- .../vk/sdk/api/ads/methods/AdsGetCampaigns.kt | 8 +- .../sdk/api/ads/methods/AdsGetCategories.kt | 4 +- .../vk/sdk/api/ads/methods/AdsGetClients.kt | 4 +- .../sdk/api/ads/methods/AdsGetDemographics.kt | 18 +- .../sdk/api/ads/methods/AdsGetFloodStats.kt | 4 +- .../ads/methods/AdsGetLookalikeRequests.kt | 4 +- .../vk/sdk/api/ads/methods/AdsGetMusicians.kt | 4 +- .../sdk/api/ads/methods/AdsGetOfficeUsers.kt | 4 +- .../sdk/api/ads/methods/AdsGetPostsReach.kt | 6 +- .../api/ads/methods/AdsGetRejectionReason.kt | 4 +- .../sdk/api/ads/methods/AdsGetStatistics.kt | 20 +- .../sdk/api/ads/methods/AdsGetSuggestions.kt | 24 +- .../ads/methods/AdsGetSuggestionsCities.kt | 24 +- .../ads/methods/AdsGetSuggestionsRegions.kt | 24 +- .../ads/methods/AdsGetSuggestionsSchools.kt | 24 +- .../sdk/api/ads/methods/AdsGetTargetGroups.kt | 6 +- .../api/ads/methods/AdsGetTargetingStats.kt | 16 +- .../vk/sdk/api/ads/methods/AdsGetUploadURL.kt | 8 +- .../api/ads/methods/AdsGetVideoUploadURL.kt | 4 +- .../ads/methods/AdsImportTargetContacts.kt | 4 +- .../api/ads/methods/AdsRemoveOfficeUsers.kt | 4 +- .../vk/sdk/api/ads/methods/AdsUpdateAds.kt | 4 +- .../sdk/api/ads/methods/AdsUpdateCampaigns.kt | 4 +- .../sdk/api/ads/methods/AdsUpdateClients.kt | 4 +- .../api/ads/methods/AdsUpdateOfficeUsers.kt | 4 +- .../api/ads/methods/AdsUpdateTargetGroup.kt | 6 +- .../AppWidgetsGetAppImageUploadServer.kt | 5 +- .../methods/AppWidgetsGetAppImages.kt | 4 +- .../AppWidgetsGetGroupImageUploadServer.kt | 7 +- .../methods/AppWidgetsGetGroupImages.kt | 4 +- .../methods/AppWidgetsGetImagesById.kt | 4 +- .../methods/AppWidgetsSaveAppImage.kt | 4 +- .../methods/AppWidgetsSaveGroupImage.kt | 4 +- .../appWidgets/methods/AppWidgetsUpdate.kt | 4 +- .../api/apps/methods/AppsDeleteAppRequests.kt | 5 +- .../com/vk/sdk/api/apps/methods/AppsGet.kt | 12 +- .../vk/sdk/api/apps/methods/AppsGetCatalog.kt | 14 +- .../api/apps/methods/AppsGetFriendsList.kt | 8 +- .../api/apps/methods/AppsGetLeaderboard.kt | 12 +- .../methods/AppsGetLeaderboardExtended.kt | 12 +- .../vk/sdk/api/apps/methods/AppsGetScopes.kt | 4 +- .../vk/sdk/api/apps/methods/AppsGetScore.kt | 4 +- .../apps/methods/AppsPromoHasActiveGift.kt | 4 +- .../sdk/api/apps/methods/AppsPromoUseGift.kt | 4 +- .../sdk/api/apps/methods/AppsSendRequest.kt | 8 +- .../vk/sdk/api/auth/methods/AuthCheckPhone.kt | 4 +- .../vk/sdk/api/auth/methods/AuthRestore.kt | 4 +- .../vk/sdk/api/board/methods/BoardAddTopic.kt | 10 +- .../sdk/api/board/methods/BoardCloseTopic.kt | 4 +- .../api/board/methods/BoardCreateComment.kt | 12 +- .../api/board/methods/BoardDeleteComment.kt | 4 +- .../sdk/api/board/methods/BoardDeleteTopic.kt | 4 +- .../sdk/api/board/methods/BoardEditComment.kt | 10 +- .../sdk/api/board/methods/BoardEditTopic.kt | 4 +- .../vk/sdk/api/board/methods/BoardFixTopic.kt | 4 +- .../sdk/api/board/methods/BoardGetComments.kt | 10 +- .../board/methods/BoardGetCommentsExtended.kt | 10 +- .../sdk/api/board/methods/BoardGetTopics.kt | 16 +- .../board/methods/BoardGetTopicsExtended.kt | 16 +- .../sdk/api/board/methods/BoardOpenTopic.kt | 4 +- .../api/board/methods/BoardRestoreComment.kt | 4 +- .../sdk/api/board/methods/BoardUnfixTopic.kt | 4 +- .../api/database/methods/DatabaseGetChairs.kt | 4 +- .../api/database/methods/DatabaseGetCities.kt | 6 +- .../database/methods/DatabaseGetCitiesById.kt | 4 +- .../database/methods/DatabaseGetCountries.kt | 6 +- .../methods/DatabaseGetCountriesById.kt | 4 +- .../database/methods/DatabaseGetFaculties.kt | 4 +- .../methods/DatabaseGetMetroStations.kt | 4 +- .../methods/DatabaseGetMetroStationsById.kt | 4 +- .../database/methods/DatabaseGetRegions.kt | 4 +- .../methods/DatabaseGetSchoolClasses.kt | 4 +- .../database/methods/DatabaseGetSchools.kt | 4 +- .../methods/DatabaseGetUniversities.kt | 4 +- .../com/vk/sdk/api/docs/methods/DocsAdd.kt | 4 +- .../com/vk/sdk/api/docs/methods/DocsDelete.kt | 4 +- .../com/vk/sdk/api/docs/methods/DocsEdit.kt | 4 +- .../com/vk/sdk/api/docs/methods/DocsGet.kt | 4 +- .../vk/sdk/api/docs/methods/DocsGetById.kt | 4 +- .../methods/DocsGetMessagesUploadServer.kt | 4 +- .../vk/sdk/api/docs/methods/DocsGetTypes.kt | 4 +- .../api/docs/methods/DocsGetUploadServer.kt | 4 +- .../docs/methods/DocsGetWallUploadServer.kt | 4 +- .../com/vk/sdk/api/docs/methods/DocsSave.kt | 4 +- .../com/vk/sdk/api/docs/methods/DocsSearch.kt | 4 +- .../methods/DownloadedGamesGetPaidStatus.kt | 5 +- .../vk/sdk/api/fave/methods/FaveAddArticle.kt | 4 +- .../vk/sdk/api/fave/methods/FaveAddLink.kt | 4 +- .../vk/sdk/api/fave/methods/FaveAddPage.kt | 4 +- .../vk/sdk/api/fave/methods/FaveAddPost.kt | 4 +- .../vk/sdk/api/fave/methods/FaveAddProduct.kt | 4 +- .../com/vk/sdk/api/fave/methods/FaveAddTag.kt | 4 +- .../vk/sdk/api/fave/methods/FaveAddVideo.kt | 4 +- .../vk/sdk/api/fave/methods/FaveEditTag.kt | 4 +- .../com/vk/sdk/api/fave/methods/FaveGet.kt | 6 +- .../sdk/api/fave/methods/FaveGetExtended.kt | 6 +- .../vk/sdk/api/fave/methods/FaveGetPages.kt | 4 +- .../vk/sdk/api/fave/methods/FaveGetTags.kt | 4 +- .../vk/sdk/api/fave/methods/FaveMarkSeen.kt | 4 +- .../sdk/api/fave/methods/FaveRemoveArticle.kt | 4 +- .../vk/sdk/api/fave/methods/FaveRemoveLink.kt | 4 +- .../vk/sdk/api/fave/methods/FaveRemovePage.kt | 4 +- .../vk/sdk/api/fave/methods/FaveRemovePost.kt | 4 +- .../sdk/api/fave/methods/FaveRemoveProduct.kt | 4 +- .../vk/sdk/api/fave/methods/FaveRemoveTag.kt | 4 +- .../sdk/api/fave/methods/FaveRemoveVideo.kt | 4 +- .../sdk/api/fave/methods/FaveReorderTags.kt | 4 +- .../sdk/api/fave/methods/FaveSetPageTags.kt | 4 +- .../vk/sdk/api/fave/methods/FaveSetTags.kt | 4 +- .../fave/methods/FaveTrackPageInteraction.kt | 4 +- .../vk/sdk/api/friends/methods/FriendsAdd.kt | 4 +- .../sdk/api/friends/methods/FriendsAddList.kt | 4 +- .../api/friends/methods/FriendsAreFriends.kt | 6 +- .../methods/FriendsAreFriendsExtended.kt | 6 +- .../sdk/api/friends/methods/FriendsDelete.kt | 4 +- .../methods/FriendsDeleteAllRequests.kt | 5 +- .../api/friends/methods/FriendsDeleteList.kt | 4 +- .../vk/sdk/api/friends/methods/FriendsEdit.kt | 4 +- .../api/friends/methods/FriendsEditList.kt | 4 +- .../vk/sdk/api/friends/methods/FriendsGet.kt | 12 +- .../api/friends/methods/FriendsGetAppUsers.kt | 4 +- .../api/friends/methods/FriendsGetByPhones.kt | 4 +- .../api/friends/methods/FriendsGetFields.kt | 12 +- .../api/friends/methods/FriendsGetLists.kt | 6 +- .../api/friends/methods/FriendsGetMutual.kt | 6 +- .../methods/FriendsGetMutualTargetuids.kt | 6 +- .../api/friends/methods/FriendsGetOnline.kt | 8 +- .../methods/FriendsGetOnlineOnlinemobile.kt | 8 +- .../api/friends/methods/FriendsGetRecent.kt | 4 +- .../api/friends/methods/FriendsGetRequests.kt | 14 +- .../methods/FriendsGetRequestsExtended.kt | 14 +- .../methods/FriendsGetRequestsNeedmutual.kt | 14 +- .../friends/methods/FriendsGetSuggestions.kt | 14 +- .../sdk/api/friends/methods/FriendsSearch.kt | 8 +- .../com/vk/sdk/api/gifts/methods/GiftsGet.kt | 4 +- .../vk/sdk/api/groups/dto/GroupsGroupFull.kt | 4 +- .../api/groups/methods/GroupsAddAddress.kt | 4 +- .../groups/methods/GroupsAddCallbackServer.kt | 4 +- .../sdk/api/groups/methods/GroupsAddLink.kt | 4 +- .../groups/methods/GroupsApproveRequest.kt | 4 +- .../vk/sdk/api/groups/methods/GroupsBan.kt | 4 +- .../vk/sdk/api/groups/methods/GroupsCreate.kt | 10 +- .../api/groups/methods/GroupsDeleteAddress.kt | 4 +- .../methods/GroupsDeleteCallbackServer.kt | 4 +- .../api/groups/methods/GroupsDeleteLink.kt | 4 +- .../api/groups/methods/GroupsDisableOnline.kt | 4 +- .../vk/sdk/api/groups/methods/GroupsEdit.kt | 70 +++--- .../api/groups/methods/GroupsEditAddress.kt | 4 +- .../methods/GroupsEditCallbackServer.kt | 4 +- .../sdk/api/groups/methods/GroupsEditLink.kt | 4 +- .../api/groups/methods/GroupsEditManager.kt | 6 +- .../api/groups/methods/GroupsEnableOnline.kt | 4 +- .../vk/sdk/api/groups/methods/GroupsGet.kt | 14 +- .../api/groups/methods/GroupsGetAddresses.kt | 4 +- .../sdk/api/groups/methods/GroupsGetBanned.kt | 4 +- .../sdk/api/groups/methods/GroupsGetById.kt | 4 +- .../GroupsGetCallbackConfirmationCode.kt | 5 +- .../methods/GroupsGetCallbackServers.kt | 4 +- .../methods/GroupsGetCallbackSettings.kt | 4 +- .../api/groups/methods/GroupsGetCatalog.kt | 4 +- .../groups/methods/GroupsGetCatalogInfo.kt | 8 +- .../methods/GroupsGetCatalogInfoExtended.kt | 8 +- .../api/groups/methods/GroupsGetExtended.kt | 14 +- .../groups/methods/GroupsGetInvitedUsers.kt | 10 +- .../api/groups/methods/GroupsGetInvites.kt | 6 +- .../methods/GroupsGetInvitesExtended.kt | 6 +- .../groups/methods/GroupsGetLongPollServer.kt | 4 +- .../methods/GroupsGetLongPollSettings.kt | 4 +- .../api/groups/methods/GroupsGetMembers.kt | 6 +- .../groups/methods/GroupsGetMembersFields.kt | 6 +- .../groups/methods/GroupsGetMembersFilter.kt | 6 +- .../api/groups/methods/GroupsGetRequests.kt | 4 +- .../groups/methods/GroupsGetRequestsFields.kt | 4 +- .../api/groups/methods/GroupsGetSettings.kt | 4 +- .../api/groups/methods/GroupsGetTagList.kt | 4 +- .../methods/GroupsGetTokenPermissions.kt | 6 +- .../vk/sdk/api/groups/methods/GroupsInvite.kt | 4 +- .../sdk/api/groups/methods/GroupsIsMember.kt | 6 +- .../groups/methods/GroupsIsMemberExtended.kt | 6 +- .../groups/methods/GroupsIsMemberUserids.kt | 6 +- .../GroupsIsMemberUserids_extended_.kt | 6 +- .../vk/sdk/api/groups/methods/GroupsJoin.kt | 6 +- .../vk/sdk/api/groups/methods/GroupsLeave.kt | 4 +- .../api/groups/methods/GroupsRemoveUser.kt | 4 +- .../api/groups/methods/GroupsReorderLink.kt | 4 +- .../vk/sdk/api/groups/methods/GroupsSearch.kt | 14 +- .../methods/GroupsSetCallbackSettings.kt | 68 +++--- .../methods/GroupsSetLongPollSettings.kt | 72 +++--- .../api/groups/methods/GroupsSetSettings.kt | 4 +- .../api/groups/methods/GroupsSetUserNote.kt | 4 +- .../vk/sdk/api/groups/methods/GroupsTagAdd.kt | 4 +- .../sdk/api/groups/methods/GroupsTagBind.kt | 4 +- .../sdk/api/groups/methods/GroupsTagDelete.kt | 4 +- .../sdk/api/groups/methods/GroupsTagUpdate.kt | 4 +- .../api/groups/methods/GroupsToggleMarket.kt | 4 +- .../vk/sdk/api/groups/methods/GroupsUnban.kt | 4 +- .../sdk/api/leads/methods/LeadsCheckUser.kt | 4 +- .../vk/sdk/api/leads/methods/LeadsComplete.kt | 4 +- .../vk/sdk/api/leads/methods/LeadsGetStats.kt | 4 +- .../vk/sdk/api/leads/methods/LeadsGetUsers.kt | 10 +- .../sdk/api/leads/methods/LeadsMetricHit.kt | 4 +- .../vk/sdk/api/leads/methods/LeadsStart.kt | 4 +- .../com/vk/sdk/api/likes/methods/LikesAdd.kt | 12 +- .../vk/sdk/api/likes/methods/LikesDelete.kt | 12 +- .../vk/sdk/api/likes/methods/LikesGetList.kt | 24 +- .../api/likes/methods/LikesGetListExtended.kt | 24 +- .../vk/sdk/api/likes/methods/LikesIsLiked.kt | 10 +- .../vk/sdk/api/market/methods/MarketAdd.kt | 6 +- .../sdk/api/market/methods/MarketAddAlbum.kt | 6 +- .../api/market/methods/MarketAddToAlbum.kt | 4 +- .../api/market/methods/MarketCreateComment.kt | 4 +- .../vk/sdk/api/market/methods/MarketDelete.kt | 4 +- .../api/market/methods/MarketDeleteAlbum.kt | 4 +- .../api/market/methods/MarketDeleteComment.kt | 4 +- .../vk/sdk/api/market/methods/MarketEdit.kt | 6 +- .../sdk/api/market/methods/MarketEditAlbum.kt | 6 +- .../api/market/methods/MarketEditComment.kt | 4 +- .../sdk/api/market/methods/MarketEditOrder.kt | 4 +- .../vk/sdk/api/market/methods/MarketGet.kt | 6 +- .../api/market/methods/MarketGetAlbumById.kt | 4 +- .../sdk/api/market/methods/MarketGetAlbums.kt | 4 +- .../sdk/api/market/methods/MarketGetById.kt | 6 +- .../market/methods/MarketGetByIdExtended.kt | 6 +- .../api/market/methods/MarketGetCategories.kt | 4 +- .../api/market/methods/MarketGetComments.kt | 10 +- .../api/market/methods/MarketGetExtended.kt | 6 +- .../market/methods/MarketGetGroupOrders.kt | 4 +- .../api/market/methods/MarketGetOrderById.kt | 4 +- .../api/market/methods/MarketGetOrderItems.kt | 4 +- .../sdk/api/market/methods/MarketGetOrders.kt | 4 +- .../market/methods/MarketGetOrdersExtended.kt | 4 +- .../market/methods/MarketRemoveFromAlbum.kt | 4 +- .../api/market/methods/MarketReorderAlbums.kt | 4 +- .../api/market/methods/MarketReorderItems.kt | 4 +- .../vk/sdk/api/market/methods/MarketReport.kt | 8 +- .../api/market/methods/MarketReportComment.kt | 8 +- .../sdk/api/market/methods/MarketRestore.kt | 4 +- .../market/methods/MarketRestoreComment.kt | 4 +- .../vk/sdk/api/market/methods/MarketSearch.kt | 8 +- .../market/methods/MarketSearchExtended.kt | 8 +- .../messages/methods/MessagesAddChatUser.kt | 4 +- .../methods/MessagesAllowMessagesFromGroup.kt | 4 +- .../messages/methods/MessagesCreateChat.kt | 4 +- .../api/messages/methods/MessagesDelete.kt | 8 +- .../methods/MessagesDeleteChatPhoto.kt | 4 +- .../methods/MessagesDeleteConversation.kt | 5 +- .../methods/MessagesDenyMessagesFromGroup.kt | 4 +- .../sdk/api/messages/methods/MessagesEdit.kt | 14 +- .../api/messages/methods/MessagesEditChat.kt | 4 +- .../MessagesGetByConversationMessageId.kt | 6 +- .../api/messages/methods/MessagesGetById.kt | 4 +- .../methods/MessagesGetByIdExtended.kt | 4 +- .../methods/MessagesGetChatPreview.kt | 4 +- .../methods/MessagesGetConversationMembers.kt | 5 +- .../methods/MessagesGetConversations.kt | 12 +- .../methods/MessagesGetConversationsById.kt | 5 +- .../MessagesGetConversationsByIdExtended.kt | 5 +- .../messages/methods/MessagesGetHistory.kt | 6 +- .../methods/MessagesGetHistoryAttachments.kt | 7 +- .../methods/MessagesGetImportantMessages.kt | 5 +- .../MessagesGetImportantMessagesExtended.kt | 5 +- .../messages/methods/MessagesGetInviteLink.kt | 6 +- .../methods/MessagesGetLastActivity.kt | 4 +- .../methods/MessagesGetLongPollHistory.kt | 7 +- .../methods/MessagesGetLongPollServer.kt | 6 +- .../MessagesIsMessagesFromGroupAllowed.kt | 6 +- .../methods/MessagesJoinChatByInviteLink.kt | 5 +- .../MessagesMarkAsAnsweredConversation.kt | 6 +- .../methods/MessagesMarkAsImportant.kt | 6 +- .../MessagesMarkAsImportantConversation.kt | 6 +- .../messages/methods/MessagesMarkAsRead.kt | 4 +- .../sdk/api/messages/methods/MessagesPin.kt | 4 +- .../methods/MessagesRemoveChatUser.kt | 4 +- .../api/messages/methods/MessagesRestore.kt | 4 +- .../api/messages/methods/MessagesSearch.kt | 4 +- .../methods/MessagesSearchConversations.kt | 7 +- .../sdk/api/messages/methods/MessagesSend.kt | 12 +- .../methods/MessagesSendMessageEventAnswer.kt | 4 +- .../messages/methods/MessagesSendUserids.kt | 12 +- .../messages/methods/MessagesSetActivity.kt | 6 +- .../messages/methods/MessagesSetChatPhoto.kt | 4 +- .../sdk/api/messages/methods/MessagesUnpin.kt | 4 +- .../api/newsfeed/methods/NewsfeedAddBan.kt | 4 +- .../api/newsfeed/methods/NewsfeedDeleteBan.kt | 4 +- .../newsfeed/methods/NewsfeedDeleteList.kt | 4 +- .../api/newsfeed/methods/NewsfeedGetBanned.kt | 11 +- .../methods/NewsfeedGetBannedExtended.kt | 11 +- .../newsfeed/methods/NewsfeedGetComments.kt | 8 +- .../api/newsfeed/methods/NewsfeedGetLists.kt | 4 +- .../methods/NewsfeedGetListsExtended.kt | 4 +- .../newsfeed/methods/NewsfeedGetMentions.kt | 4 +- .../newsfeed/methods/NewsfeedIgnoreItem.kt | 10 +- .../api/newsfeed/methods/NewsfeedSaveList.kt | 4 +- .../api/newsfeed/methods/NewsfeedSearch.kt | 6 +- .../methods/NewsfeedSearchExtended.kt | 6 +- .../newsfeed/methods/NewsfeedUnignoreItem.kt | 10 +- .../newsfeed/methods/NewsfeedUnsubscribe.kt | 8 +- .../com/vk/sdk/api/notes/methods/NotesAdd.kt | 4 +- .../api/notes/methods/NotesCreateComment.kt | 4 +- .../vk/sdk/api/notes/methods/NotesDelete.kt | 4 +- .../api/notes/methods/NotesDeleteComment.kt | 4 +- .../com/vk/sdk/api/notes/methods/NotesEdit.kt | 4 +- .../sdk/api/notes/methods/NotesEditComment.kt | 4 +- .../com/vk/sdk/api/notes/methods/NotesGet.kt | 4 +- .../vk/sdk/api/notes/methods/NotesGetById.kt | 4 +- .../sdk/api/notes/methods/NotesGetComments.kt | 4 +- .../api/notes/methods/NotesRestoreComment.kt | 4 +- .../notifications/methods/NotificationsGet.kt | 12 +- .../methods/NotificationsMarkAsViewed.kt | 5 +- .../methods/NotificationsSendMessage.kt | 4 +- .../methods/OrdersCancelSubscription.kt | 4 +- .../api/orders/methods/OrdersChangeState.kt | 12 +- .../vk/sdk/api/orders/methods/OrdersGet.kt | 6 +- .../sdk/api/orders/methods/OrdersGetAmount.kt | 4 +- .../sdk/api/orders/methods/OrdersGetById.kt | 6 +- .../methods/OrdersGetUserSubscriptionById.kt | 4 +- .../methods/OrdersGetUserSubscriptions.kt | 5 +- .../methods/OrdersUpdateSubscription.kt | 4 +- .../sdk/api/pages/methods/PagesClearCache.kt | 4 +- .../com/vk/sdk/api/pages/methods/PagesGet.kt | 10 +- .../sdk/api/pages/methods/PagesGetHistory.kt | 4 +- .../sdk/api/pages/methods/PagesGetTitles.kt | 4 +- .../sdk/api/pages/methods/PagesGetVersion.kt | 6 +- .../sdk/api/pages/methods/PagesParseWiki.kt | 4 +- .../com/vk/sdk/api/pages/methods/PagesSave.kt | 4 +- .../sdk/api/pages/methods/PagesSaveAccess.kt | 12 +- .../api/photos/methods/PhotosConfirmTag.kt | 4 +- .../vk/sdk/api/photos/methods/PhotosCopy.kt | 4 +- .../api/photos/methods/PhotosCreateAlbum.kt | 4 +- .../api/photos/methods/PhotosCreateComment.kt | 12 +- .../vk/sdk/api/photos/methods/PhotosDelete.kt | 4 +- .../api/photos/methods/PhotosDeleteAlbum.kt | 4 +- .../api/photos/methods/PhotosDeleteComment.kt | 4 +- .../vk/sdk/api/photos/methods/PhotosEdit.kt | 4 +- .../sdk/api/photos/methods/PhotosEditAlbum.kt | 4 +- .../api/photos/methods/PhotosEditComment.kt | 10 +- .../vk/sdk/api/photos/methods/PhotosGet.kt | 10 +- .../sdk/api/photos/methods/PhotosGetAlbums.kt | 10 +- .../photos/methods/PhotosGetAlbumsCount.kt | 4 +- .../vk/sdk/api/photos/methods/PhotosGetAll.kt | 14 +- .../photos/methods/PhotosGetAllComments.kt | 6 +- .../photos/methods/PhotosGetAllExtended.kt | 14 +- .../sdk/api/photos/methods/PhotosGetById.kt | 8 +- .../photos/methods/PhotosGetByIdExtended.kt | 8 +- .../methods/PhotosGetChatUploadServer.kt | 4 +- .../api/photos/methods/PhotosGetComments.kt | 8 +- .../methods/PhotosGetCommentsExtended.kt | 8 +- .../api/photos/methods/PhotosGetExtended.kt | 10 +- .../PhotosGetMarketAlbumUploadServer.kt | 4 +- .../methods/PhotosGetMarketUploadServer.kt | 4 +- .../methods/PhotosGetMessagesUploadServer.kt | 4 +- .../api/photos/methods/PhotosGetNewTags.kt | 4 +- .../PhotosGetOwnerCoverPhotoUploadServer.kt | 4 +- .../PhotosGetOwnerPhotoUploadServer.kt | 6 +- .../sdk/api/photos/methods/PhotosGetTags.kt | 4 +- .../photos/methods/PhotosGetUploadServer.kt | 4 +- .../api/photos/methods/PhotosGetUserPhotos.kt | 8 +- .../methods/PhotosGetUserPhotosExtended.kt | 8 +- .../methods/PhotosGetWallUploadServer.kt | 4 +- .../sdk/api/photos/methods/PhotosMakeCover.kt | 4 +- .../vk/sdk/api/photos/methods/PhotosMove.kt | 4 +- .../vk/sdk/api/photos/methods/PhotosPutTag.kt | 4 +- .../sdk/api/photos/methods/PhotosRemoveTag.kt | 4 +- .../api/photos/methods/PhotosReorderAlbums.kt | 4 +- .../api/photos/methods/PhotosReorderPhotos.kt | 4 +- .../vk/sdk/api/photos/methods/PhotosReport.kt | 8 +- .../api/photos/methods/PhotosReportComment.kt | 8 +- .../sdk/api/photos/methods/PhotosRestore.kt | 4 +- .../photos/methods/PhotosRestoreComment.kt | 4 +- .../vk/sdk/api/photos/methods/PhotosSave.kt | 4 +- .../methods/PhotosSaveMarketAlbumPhoto.kt | 4 +- .../photos/methods/PhotosSaveMarketPhoto.kt | 4 +- .../photos/methods/PhotosSaveMessagesPhoto.kt | 4 +- .../methods/PhotosSaveOwnerCoverPhoto.kt | 4 +- .../photos/methods/PhotosSaveOwnerPhoto.kt | 4 +- .../api/photos/methods/PhotosSaveWallPhoto.kt | 4 +- .../vk/sdk/api/photos/methods/PhotosSearch.kt | 4 +- .../methods/PodcastsClearRecentSearches.kt | 5 +- .../podcasts/methods/PodcastsGetPopular.kt | 5 +- .../PodcastsGetRecentSearchRequests.kt | 6 +- .../api/podcasts/methods/PodcastsSearch.kt | 4 +- .../vk/sdk/api/polls/methods/PollsAddVote.kt | 4 +- .../vk/sdk/api/polls/methods/PollsCreate.kt | 6 +- .../sdk/api/polls/methods/PollsDeleteVote.kt | 4 +- .../com/vk/sdk/api/polls/methods/PollsEdit.kt | 6 +- .../vk/sdk/api/polls/methods/PollsGetById.kt | 6 +- .../sdk/api/polls/methods/PollsGetVoters.kt | 14 +- .../prettyCards/methods/PrettyCardsCreate.kt | 4 +- .../prettyCards/methods/PrettyCardsDelete.kt | 4 +- .../prettyCards/methods/PrettyCardsEdit.kt | 4 +- .../api/prettyCards/methods/PrettyCardsGet.kt | 4 +- .../prettyCards/methods/PrettyCardsGetById.kt | 4 +- .../methods/PrettyCardsGetUploadURL.kt | 4 +- .../sdk/api/search/methods/SearchGetHints.kt | 4 +- .../api/secure/methods/SecureAddAppEvent.kt | 8 +- .../api/secure/methods/SecureCheckToken.kt | 4 +- .../api/secure/methods/SecureGetAppBalance.kt | 4 +- .../api/secure/methods/SecureGetSMSHistory.kt | 6 +- .../methods/SecureGetTransactionsHistory.kt | 4 +- .../api/secure/methods/SecureGetUserLevel.kt | 4 +- .../secure/methods/SecureGiveEventSticker.kt | 4 +- .../secure/methods/SecureSendNotification.kt | 4 +- .../methods/SecureSendSMSNotification.kt | 4 +- .../api/secure/methods/SecureSetCounter.kt | 4 +- .../com/vk/sdk/api/stats/methods/StatsGet.kt | 4 +- .../api/stats/methods/StatsGetPostReach.kt | 4 +- .../api/stats/methods/StatsTrackVisitor.kt | 4 +- .../vk/sdk/api/status/methods/StatusGet.kt | 4 +- .../vk/sdk/api/status/methods/StatusSet.kt | 4 +- .../vk/sdk/api/storage/methods/StorageGet.kt | 4 +- .../sdk/api/storage/methods/StorageGetKeys.kt | 4 +- .../vk/sdk/api/storage/methods/StorageSet.kt | 4 +- .../api/stories/methods/StoriesBanOwner.kt | 4 +- .../sdk/api/stories/methods/StoriesDelete.kt | 4 +- .../vk/sdk/api/stories/methods/StoriesGet.kt | 6 +- .../api/stories/methods/StoriesGetBanned.kt | 6 +- .../methods/StoriesGetBannedExtended.kt | 6 +- .../sdk/api/stories/methods/StoriesGetById.kt | 6 +- .../stories/methods/StoriesGetByIdExtended.kt | 6 +- .../methods/StoriesGetPhotoUploadServer.kt | 7 +- .../api/stories/methods/StoriesGetReplies.kt | 6 +- .../api/stories/methods/StoriesGetStats.kt | 4 +- .../methods/StoriesGetVideoUploadServer.kt | 7 +- .../api/stories/methods/StoriesGetViewers.kt | 6 +- .../methods/StoriesGetViewersExtended.kt | 6 +- .../stories/methods/StoriesHideAllReplies.kt | 4 +- .../api/stories/methods/StoriesHideReply.kt | 4 +- .../vk/sdk/api/stories/methods/StoriesSave.kt | 4 +- .../sdk/api/stories/methods/StoriesSearch.kt | 4 +- .../stories/methods/StoriesSendInteraction.kt | 4 +- .../api/stories/methods/StoriesUnbanOwner.kt | 4 +- .../methods/StreamingGetServerUrl.kt | 6 +- .../streaming/methods/StreamingSetSettings.kt | 4 +- .../com/vk/sdk/api/users/methods/UsersGet.kt | 9 +- .../api/users/methods/UsersGetFollowers.kt | 9 +- .../users/methods/UsersGetFollowersFields.kt | 9 +- .../vk/sdk/api/users/methods/UsersReport.kt | 8 +- .../vk/sdk/api/users/methods/UsersSearch.kt | 16 +- .../sdk/api/utils/methods/UtilsCheckLink.kt | 4 +- .../methods/UtilsDeleteFromLastShortened.kt | 4 +- .../methods/UtilsGetLastShortenedLinks.kt | 5 +- .../api/utils/methods/UtilsGetLinkStats.kt | 6 +- .../methods/UtilsGetLinkStatsExtended.kt | 6 +- .../api/utils/methods/UtilsGetServerTime.kt | 4 +- .../api/utils/methods/UtilsGetShortLink.kt | 6 +- .../utils/methods/UtilsResolveScreenName.kt | 4 +- .../com/vk/sdk/api/video/methods/VideoAdd.kt | 4 +- .../vk/sdk/api/video/methods/VideoAddAlbum.kt | 8 +- .../sdk/api/video/methods/VideoAddToAlbum.kt | 4 +- .../api/video/methods/VideoCreateComment.kt | 12 +- .../vk/sdk/api/video/methods/VideoDelete.kt | 4 +- .../sdk/api/video/methods/VideoDeleteAlbum.kt | 4 +- .../api/video/methods/VideoDeleteComment.kt | 4 +- .../com/vk/sdk/api/video/methods/VideoEdit.kt | 6 +- .../sdk/api/video/methods/VideoEditAlbum.kt | 8 +- .../sdk/api/video/methods/VideoEditComment.kt | 10 +- .../com/vk/sdk/api/video/methods/VideoGet.kt | 6 +- .../api/video/methods/VideoGetAlbumById.kt | 4 +- .../sdk/api/video/methods/VideoGetAlbums.kt | 6 +- .../video/methods/VideoGetAlbumsByVideo.kt | 4 +- .../methods/VideoGetAlbumsByVideoExtended.kt | 5 +- .../video/methods/VideoGetAlbumsExtended.kt | 6 +- .../sdk/api/video/methods/VideoGetComments.kt | 8 +- .../video/methods/VideoGetCommentsExtended.kt | 8 +- .../sdk/api/video/methods/VideoGetExtended.kt | 6 +- .../api/video/methods/VideoRemoveFromAlbum.kt | 4 +- .../api/video/methods/VideoReorderAlbums.kt | 4 +- .../api/video/methods/VideoReorderVideos.kt | 4 +- .../vk/sdk/api/video/methods/VideoReport.kt | 8 +- .../api/video/methods/VideoReportComment.kt | 8 +- .../vk/sdk/api/video/methods/VideoRestore.kt | 4 +- .../api/video/methods/VideoRestoreComment.kt | 4 +- .../com/vk/sdk/api/video/methods/VideoSave.kt | 14 +- .../vk/sdk/api/video/methods/VideoSearch.kt | 12 +- .../api/video/methods/VideoSearchExtended.kt | 12 +- .../wall/methods/WallCheckCopyrightLink.kt | 4 +- .../sdk/api/wall/methods/WallCloseComments.kt | 4 +- .../sdk/api/wall/methods/WallCreateComment.kt | 10 +- .../com/vk/sdk/api/wall/methods/WallDelete.kt | 4 +- .../sdk/api/wall/methods/WallDeleteComment.kt | 4 +- .../com/vk/sdk/api/wall/methods/WallEdit.kt | 10 +- .../api/wall/methods/WallEditAdsStealth.kt | 16 +- .../sdk/api/wall/methods/WallEditComment.kt | 10 +- .../com/vk/sdk/api/wall/methods/WallGet.kt | 12 +- .../vk/sdk/api/wall/methods/WallGetById.kt | 6 +- .../api/wall/methods/WallGetByIdExtended.kt | 6 +- .../vk/sdk/api/wall/methods/WallGetComment.kt | 4 +- .../wall/methods/WallGetCommentExtended.kt | 4 +- .../sdk/api/wall/methods/WallGetComments.kt | 8 +- .../wall/methods/WallGetCommentsExtended.kt | 8 +- .../sdk/api/wall/methods/WallGetExtended.kt | 12 +- .../vk/sdk/api/wall/methods/WallGetReposts.kt | 4 +- .../sdk/api/wall/methods/WallOpenComments.kt | 4 +- .../com/vk/sdk/api/wall/methods/WallPin.kt | 4 +- .../com/vk/sdk/api/wall/methods/WallPost.kt | 20 +- .../api/wall/methods/WallPostAdsStealth.kt | 16 +- .../sdk/api/wall/methods/WallReportComment.kt | 8 +- .../vk/sdk/api/wall/methods/WallReportPost.kt | 8 +- .../com/vk/sdk/api/wall/methods/WallRepost.kt | 4 +- .../vk/sdk/api/wall/methods/WallRestore.kt | 4 +- .../api/wall/methods/WallRestoreComment.kt | 4 +- .../com/vk/sdk/api/wall/methods/WallSearch.kt | 6 +- .../api/wall/methods/WallSearchExtended.kt | 6 +- .../com/vk/sdk/api/wall/methods/WallUnpin.kt | 4 +- .../api/widgets/methods/WidgetsGetComments.kt | 4 +- .../api/widgets/methods/WidgetsGetPages.kt | 4 +- vk-sdk-core/src/main/AndroidManifest.xml | 15 ++ .../main/java/com/vk/api/sdk/VKApiConfig.kt | 8 +- .../main/java/com/vk/api/sdk/VKApiManager.kt | 10 + .../java/com/vk/api/sdk/auth/VKAuthManager.kt | 2 +- .../vk/api/sdk/browser/BrowserDescriptor.java | 169 ++++++++++++++ .../vk/api/sdk/browser/BrowserMatcher.java | 7 + .../vk/api/sdk/browser/BrowserSelector.java | 211 ++++++++++++++++++ .../java/com/vk/api/sdk/browser/Browsers.java | 182 +++++++++++++++ .../vk/api/sdk/browser/DelimitedVersion.java | 141 ++++++++++++ .../com/vk/api/sdk/browser/VersionRange.java | 124 ++++++++++ .../sdk/browser/VersionedBrowserMatcher.java | 135 +++++++++++ .../sdk/browser/WhiteListedBrowserHelper.java | 38 ++++ .../sdk/chain/RateLimitReachedChainCall.kt | 97 ++++++++ .../exceptions/RateLimitReachedException.kt | 8 + .../sdk/exceptions/VKApiExecutionException.kt | 12 +- .../com/vk/api/sdk/okhttp/OkHttpExecutor.kt | 3 +- .../java/com/vk/api/sdk/requests/VKRequest.kt | 8 +- .../com/vk/api/sdk/ui/VKBaseAuthActivity.kt | 106 +++++++++ .../main/java/com/vk/api/sdk/utils/VKUtils.kt | 12 +- 564 files changed, 3077 insertions(+), 1708 deletions(-) create mode 100644 vk-sdk-api/src/main/java/com/vk/sdk/api/ApiRequestBase.kt create mode 100644 vk-sdk-api/src/main/java/com/vk/sdk/api/Constants.kt create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserDescriptor.java create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserMatcher.java create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserSelector.java create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/browser/Browsers.java create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/browser/DelimitedVersion.java create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/browser/VersionRange.java create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/browser/VersionedBrowserMatcher.java create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/browser/WhiteListedBrowserHelper.java create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/chain/RateLimitReachedChainCall.kt create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/exceptions/RateLimitReachedException.kt create mode 100644 vk-sdk-core/src/main/java/com/vk/api/sdk/ui/VKBaseAuthActivity.kt diff --git a/README.md b/README.md index ab40499ff0..2415d4b03c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ VK SDK for Android [![Maven Central](https://img.shields.io/maven-central/v/com.vk/androidsdk.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.vk%22%20AND%20a:%22androidsdk%22) -Library for working with VK API, authorization through VK app, using VK functions. Minimal version of Android is 4.1 +Library for working with VK API, authorization through VK app, using VK functions. Minimal version of Android is 5.0 Prepare for Using VK SDK ---------- @@ -56,12 +56,12 @@ You can add next maven dependency in your project: You may also need to add the following to your `project/build.gradle` file. -`implementation 'com.vk:androidsdk:2.2.3` +`implementation 'com.vk:androidsdk:2.4.0` For example, your `app/build.gradle` script will contains such dependencies: ``` dependencies { - implementation 'com.vk:androidsdk:2.2.3 + implementation 'com.vk:androidsdk:2.4.0 } ``` diff --git a/dependencies.gradle b/dependencies.gradle index ec40b07cb1..c56c66a0bd 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -23,11 +23,11 @@ SOFTWARE. */ ext.sdkVersions = [ - code : '18', - name : '2.3.0', + code : '19', + name : '2.4.0', - minSdk : 16, - targetSdk : 28, + minSdk : 21, + targetSdk : 29, compileSdk : '29', buildTools : '29.0.3', diff --git a/vk-sdk-api/README.md b/vk-sdk-api/README.md index 74efb683f4..7fc87b2404 100644 --- a/vk-sdk-api/README.md +++ b/vk-sdk-api/README.md @@ -1,7 +1,7 @@ VK SDK api for Android ========== -To update it from current master please run tools/tasks/generator/generate_public_sdk_api.sh +Current version is 5.122 there are 3 packages now diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ApiRequestBase.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ApiRequestBase.kt new file mode 100644 index 0000000000..893b116049 --- /dev/null +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ApiRequestBase.kt @@ -0,0 +1,39 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2019 vk.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +// ********************************************************************* +// THIS FILE IS AUTO GENERATED! +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING. +// ********************************************************************* +package com.vk.sdk.api + +import com.vk.api.sdk.requests.VKRequest +import kotlin.String + +/** + * Base class for all Api requests + * @param methodName api method name + */ +open class ApiRequestBase( + methodName: String +) : VKRequest(method = methodName, requestApiVersion = Constants.API_VERSION) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/Constants.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/Constants.kt new file mode 100644 index 0000000000..bd0da18a2a --- /dev/null +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/Constants.kt @@ -0,0 +1,34 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2019 vk.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +// ********************************************************************* +// THIS FILE IS AUTO GENERATED! +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING. +// ********************************************************************* +package com.vk.sdk.api + +import kotlin.String + +object Constants { + const val API_VERSION: String = "5.122" +} diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountBan.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountBan.kt index 1e05d87ab9..71e9fe093b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountBan.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountBan.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class AccountBan( private val ownerId: Int? = null -) : VKRequest("account.ban") { +) : ApiRequestBase(methodName = "account.ban") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountChangePassword.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountChangePassword.kt index d439c8d06b..5877ec8daa 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountChangePassword.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountChangePassword.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.account.dto.AccountChangePasswordResponseDto import com.vk.sdk.api.account.responses.AccountChangePasswordResponse @@ -49,7 +49,7 @@ class AccountChangePassword( private val restoreSid: String? = null, private val changePasswordHash: String? = null, private val oldPassword: String? = null -) : VKRequest("account.changePassword") { +) : ApiRequestBase(methodName = "account.changePassword") { init { addParam("new_password", newPassword) restoreSid?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetActiveOffers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetActiveOffers.kt index ebe9857fbb..02e5332cab 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetActiveOffers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetActiveOffers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.account.dto.AccountGetActiveOffersResponseDto import com.vk.sdk.api.account.responses.AccountGetActiveOffersResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class AccountGetActiveOffers( private val offset: Int? = null, private val count: Int? = null -) : VKRequest("account.getActiveOffers") { +) : ApiRequestBase(methodName = "account.getActiveOffers") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetAppPermissions.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetAppPermissions.kt index 3fa0e2d071..af7bf0145d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetAppPermissions.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetAppPermissions.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.account.responses.AccountGetAppPermissionsResponse import kotlin.Int @@ -40,7 +40,7 @@ import org.json.JSONObject */ class AccountGetAppPermissions( private val userId: Int -) : VKRequest("account.getAppPermissions") { +) : ApiRequestBase(methodName = "account.getAppPermissions") { init { addParam("user_id", userId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetBanned.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetBanned.kt index 01a2298910..c1ad776f19 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetBanned.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetBanned.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.account.dto.AccountGetBannedResponseDto import com.vk.sdk.api.account.responses.AccountGetBannedResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class AccountGetBanned( private val offset: Int? = null, private val count: Int? = null -) : VKRequest("account.getBanned") { +) : ApiRequestBase(methodName = "account.getBanned") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetCounters.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetCounters.kt index ff1b2e9811..561223ebfe 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetCounters.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetCounters.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.account.dto.AccountAccountCounters import com.vk.sdk.api.account.dto.AccountGetCountersFilter @@ -41,7 +41,7 @@ import org.json.JSONObject */ class AccountGetCounters( private val filter: List? = null -) : VKRequest("account.getCounters") { +) : ApiRequestBase(methodName = "account.getCounters") { init { filter?.let { value -> addParam("filter", value.map { it.value }) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetInfo.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetInfo.kt index 40bd644aa2..ad1de330b1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetInfo.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetInfo.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.account.dto.AccountGetInfoFields import com.vk.sdk.api.account.dto.AccountInfo @@ -37,14 +37,14 @@ import org.json.JSONObject /** * Returns current account info. - * @param fields Fields to return. Possible values: *'country' � user country,, *'https_required' � - * is "HTTPS only" option enabled,, *'own_posts_default' � is "Show my posts only" option is enabled,, - * *'no_wall_replies' � are wall replies disabled or not,, *'intro' � is intro passed by user or not,, - * *'lang' � user language. By default: all. + * @param fields Fields to return. Possible values: *'country' - user country,, *'https_required' - + * is "HTTPS only" option enabled,, *'own_posts_default' - is "Show my posts only" option is enabled,, + * *'no_wall_replies' - are wall replies disabled or not,, *'intro' - is intro passed by user or not,, + * *'lang' - user language. By default: all. */ class AccountGetInfo( private val fields: List? = null -) : VKRequest("account.getInfo") { +) : ApiRequestBase(methodName = "account.getInfo") { init { fields?.let { value -> addParam("fields", value.map { it.value }) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetProfileInfo.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetProfileInfo.kt index 62d24082f6..aa8de65ec6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetProfileInfo.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetProfileInfo.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.account.dto.AccountUserSettings import com.vk.sdk.api.account.responses.AccountGetProfileInfoResponse @@ -36,7 +36,8 @@ import org.json.JSONObject /** * Returns the current account info. */ -class AccountGetProfileInfo : VKRequest("account.getProfileInfo") { +class AccountGetProfileInfo : ApiRequestBase(methodName = + "account.getProfileInfo") { override fun parse(r: JSONObject): AccountUserSettings = GsonHolder.gson.fromJson(r.toString(), AccountGetProfileInfoResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetPushSettings.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetPushSettings.kt index 1a79d4b27a..4410259ab8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetPushSettings.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetPushSettings.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.account.dto.AccountPushSettings import com.vk.sdk.api.account.responses.AccountGetPushSettingsResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class AccountGetPushSettings( private val deviceId: String? = null -) : VKRequest("account.getPushSettings") { +) : ApiRequestBase(methodName = "account.getPushSettings") { init { deviceId?.let { value -> addParam("device_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountRegisterDevice.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountRegisterDevice.kt index 126f934bcc..f9ad5df2d0 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountRegisterDevice.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountRegisterDevice.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -55,7 +55,7 @@ class AccountRegisterDevice( private val systemVersion: String? = null, private val settings: String? = null, private val sandbox: Boolean? = null -) : VKRequest("account.registerDevice") { +) : ApiRequestBase(methodName = "account.registerDevice") { init { addParam("token", token) addParam("device_id", deviceId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSaveProfileInfo.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSaveProfileInfo.kt index 8eea58f327..f288a9677a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSaveProfileInfo.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSaveProfileInfo.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.account.dto.AccountSaveProfileInfoBdateVisibility import com.vk.sdk.api.account.dto.AccountSaveProfileInfoRelation @@ -46,14 +46,14 @@ import org.json.JSONObject * @param screenName User screen name. * @param cancelRequestId ID of the name change request to be canceled. If this parameter is sent, * all the others are ignored. minimum 0 - * @param sex User sex. Possible values: , * '1' � female,, * '2' � male. minimum 0 - * @param relation User relationship status. Possible values: , * '1' � single,, * '2' � in a - * relationship,, * '3' � engaged,, * '4' � married,, * '5' � it's complicated,, * '6' � actively - * searching,, * '7' � in love,, * '0' � not specified. minimum 0 + * @param sex User sex. Possible values: , * '1' - female,, * '2' - male. minimum 0 + * @param relation User relationship status. Possible values: , * '1' - single,, * '2' - in a + * relationship,, * '3' - engaged,, * '4' - married,, * '5' - it's complicated,, * '6' - actively + * searching,, * '7' - in love,, * '0' - not specified. minimum 0 * @param relationPartnerId ID of the relationship partner. minimum 0 * @param bdate User birth date, format: DD.MM.YYYY. - * @param bdateVisibility Birth date visibility. Returned values: , * '1' � show birth date,, * '2' - * � show only month and day,, * '0' � hide birth date. minimum 0 + * @param bdateVisibility Birth date visibility. Returned values: , * '1' - show birth date,, * + * '2' - show only month and day,, * '0' - hide birth date. minimum 0 * @param homeTown User home town. * @param countryId User country. minimum 0 * @param cityId User city. minimum 0 @@ -74,7 +74,7 @@ class AccountSaveProfileInfo( private val countryId: Int? = null, private val cityId: Int? = null, private val status: String? = null -) : VKRequest("account.saveProfileInfo") { +) : ApiRequestBase(methodName = "account.saveProfileInfo") { init { firstName?.let { value -> addParam("first_name", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetInfo.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetInfo.kt index 083e4dfcca..ada1b306d4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetInfo.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetInfo.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class AccountSetInfo( private val name: String? = null, private val value: String? = null -) : VKRequest("account.setInfo") { +) : ApiRequestBase(methodName = "account.setInfo") { init { name?.let { value -> addParam("name", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetNameInMenu.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetNameInMenu.kt index 7e7a01736e..c8a57d10c7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetNameInMenu.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetNameInMenu.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class AccountSetNameInMenu( private val userId: Int, private val name: String? = null -) : VKRequest("account.setNameInMenu") { +) : ApiRequestBase(methodName = "account.setNameInMenu") { init { addParam("user_id", userId) name?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetOffline.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetOffline.kt index c7600a5008..c6924e838e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetOffline.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetOffline.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -36,7 +36,7 @@ import org.json.JSONObject /** * Marks a current user as offline. */ -class AccountSetOffline : VKRequest("account.setOffline") { +class AccountSetOffline : ApiRequestBase(methodName = "account.setOffline") { override fun parse(r: JSONObject): BaseOkResponseDto = GsonHolder.gson.fromJson(r.toString(), BaseOkResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetOnline.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetOnline.kt index 18f397ef5b..6a034013eb 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetOnline.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetOnline.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class AccountSetOnline( private val voip: Boolean? = null -) : VKRequest("account.setOnline") { +) : ApiRequestBase(methodName = "account.setOnline") { init { voip?.let { value -> addParam("voip", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetPushSettings.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetPushSettings.kt index cd7be1fe11..fc70867f6e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetPushSettings.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetPushSettings.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -47,7 +47,7 @@ class AccountSetPushSettings( private val settings: String? = null, private val key: String? = null, private val value: List? = null -) : VKRequest("account.setPushSettings") { +) : ApiRequestBase(methodName = "account.setPushSettings") { init { addParam("device_id", deviceId) settings?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetSilenceMode.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetSilenceMode.kt index aecbfd1a3d..466e0e0c66 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetSilenceMode.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountSetSilenceMode.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject * @param time Time in seconds for what notifications should be disabled. '-1' to disable forever. * @param peerId Destination ID. "For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'Chat * ID', e.g. '2000000001'. For community: '- Community ID', e.g. '-12345'. " - * @param sound '1' � to enable sound in this dialog, '0' � to disable sound. Only if 'peer_id' + * @param sound '1' - to enable sound in this dialog, '0' - to disable sound. Only if 'peer_id' * contains user or community ID. */ class AccountSetSilenceMode( @@ -49,7 +49,7 @@ class AccountSetSilenceMode( private val time: Int? = null, private val peerId: Int? = null, private val sound: Int? = null -) : VKRequest("account.setSilenceMode") { +) : ApiRequestBase(methodName = "account.setSilenceMode") { init { deviceId?.let { value -> addParam("device_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountUnban.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountUnban.kt index afcd1773b9..ea592dc293 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountUnban.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountUnban.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class AccountUnban( private val ownerId: Int? = null -) : VKRequest("account.unban") { +) : ApiRequestBase(methodName = "account.unban") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountUnregisterDevice.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountUnregisterDevice.kt index 747205b756..559fde498b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountUnregisterDevice.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountUnregisterDevice.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.account.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class AccountUnregisterDevice( private val deviceId: String? = null, private val sandbox: Boolean? = null -) : VKRequest("account.unregisterDevice") { +) : ApiRequestBase(methodName = "account.unregisterDevice") { init { deviceId?.let { value -> addParam("device_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsAddOfficeUsers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsAddOfficeUsers.kt index d26ee63346..8d247fa1ff 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsAddOfficeUsers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsAddOfficeUsers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsUserSpecification import com.vk.sdk.api.ads.responses.AdsAddOfficeUsersResponse @@ -45,7 +45,7 @@ import org.json.JSONObject class AdsAddOfficeUsers( private val accountId: Int, private val data: List -) : VKRequest("ads.addOfficeUsers") { +) : ApiRequestBase(methodName = "ads.addOfficeUsers") { init { addParam("account_id", accountId) addParam("data", GsonHolder.gson.toJson(data)) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCheckLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCheckLink.kt index b0c4664e24..1a8bcdf789 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCheckLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCheckLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsCheckLinkLinkType import com.vk.sdk.api.ads.dto.AdsLinkStatus @@ -39,8 +39,8 @@ import org.json.JSONObject /** * Allows to check the ad link. * @param accountId Advertising account ID. - * @param linkType Object type: *'community' � community,, *'post' � community post,, *'application' - * � VK application,, *'video' � video,, *'site' � external site. + * @param linkType Object type: *'community' - community,, *'post' - community post,, + * *'application' - VK application,, *'video' - video,, *'site' - external site. * @param linkUrl Object URL. * @param campaignId Campaign ID */ @@ -49,7 +49,7 @@ class AdsCheckLink( private val linkType: AdsCheckLinkLinkType, private val linkUrl: String, private val campaignId: Int? = null -) : VKRequest("ads.checkLink") { +) : ApiRequestBase(methodName = "ads.checkLink") { init { addParam("account_id", accountId) addParam("link_type", linkType.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateAds.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateAds.kt index 6c1a4cd32c..924c0a6c15 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateAds.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateAds.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsCreateAdsResponse import kotlin.Int @@ -44,7 +44,7 @@ import org.json.JSONObject class AdsCreateAds( private val accountId: Int, private val data: String -) : VKRequest>("ads.createAds") { +) : ApiRequestBase>(methodName = "ads.createAds") { init { addParam("account_id", accountId) addParam("data", data) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateCampaigns.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateCampaigns.kt index e9f223e81c..3c0fb188cf 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateCampaigns.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateCampaigns.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsCreateCampaignsResponse import kotlin.Int @@ -44,7 +44,7 @@ import org.json.JSONObject class AdsCreateCampaigns( private val accountId: Int, private val data: String -) : VKRequest>("ads.createCampaigns") { +) : ApiRequestBase>(methodName = "ads.createCampaigns") { init { addParam("account_id", accountId) addParam("data", data) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateClients.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateClients.kt index 0a444e4119..8faf8e8053 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateClients.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateClients.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsCreateClientsResponse import kotlin.Int @@ -44,7 +44,7 @@ import org.json.JSONObject class AdsCreateClients( private val accountId: Int, private val data: String -) : VKRequest>("ads.createClients") { +) : ApiRequestBase>(methodName = "ads.createClients") { init { addParam("account_id", accountId) addParam("data", data) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateTargetGroup.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateTargetGroup.kt index a76028293d..2ff1247866 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateTargetGroup.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsCreateTargetGroup.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsCreateTargetGroupResponseDto import com.vk.sdk.api.ads.responses.AdsCreateTargetGroupResponse @@ -39,7 +39,7 @@ import org.json.JSONObject * Creates a group to re-target ads for users who visited advertiser's site (viewed information * about the product, registered, etc.). * @param accountId Advertising account ID. - * @param name Name of the target group � a string up to 64 characters long. + * @param name Name of the target group - a string up to 64 characters long. * @param lifetime 'For groups with auditory created with pixel code only.', , Number of days after * that users will be automatically removed from the group. minimum 1 maximum 720 * @param clientId 'Only for advertising agencies.', ID of the client with the advertising account @@ -54,7 +54,7 @@ class AdsCreateTargetGroup( private val clientId: Int? = null, private val targetPixelId: Int? = null, private val targetPixelRules: String? = null -) : VKRequest("ads.createTargetGroup") { +) : ApiRequestBase(methodName = "ads.createTargetGroup") { init { addParam("account_id", accountId) addParam("name", name) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteAds.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteAds.kt index d3d4e6b2fd..9b6a5a7f20 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteAds.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteAds.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsDeleteAdsResponse import kotlin.Int @@ -43,7 +43,7 @@ import org.json.JSONObject class AdsDeleteAds( private val accountId: Int, private val ids: String -) : VKRequest>("ads.deleteAds") { +) : ApiRequestBase>(methodName = "ads.deleteAds") { init { addParam("account_id", accountId) addParam("ids", ids) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteCampaigns.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteCampaigns.kt index 60f42eb81f..b8306707a4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteCampaigns.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteCampaigns.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsDeleteCampaignsResponse import kotlin.Int @@ -42,7 +42,7 @@ import org.json.JSONObject class AdsDeleteCampaigns( private val accountId: Int, private val ids: String -) : VKRequest("ads.deleteCampaigns") { +) : ApiRequestBase(methodName = "ads.deleteCampaigns") { init { addParam("account_id", accountId) addParam("ids", ids) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteClients.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteClients.kt index 951c3f7a5e..5f352326fd 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteClients.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteClients.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsDeleteClientsResponse import kotlin.Int @@ -42,7 +42,7 @@ import org.json.JSONObject class AdsDeleteClients( private val accountId: Int, private val ids: String -) : VKRequest("ads.deleteClients") { +) : ApiRequestBase(methodName = "ads.deleteClients") { init { addParam("account_id", accountId) addParam("ids", ids) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteTargetGroup.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteTargetGroup.kt index 4417b95aa5..be10edab41 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteTargetGroup.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsDeleteTargetGroup.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ class AdsDeleteTargetGroup( private val accountId: Int, private val targetGroupId: Int, private val clientId: Int? = null -) : VKRequest("ads.deleteTargetGroup") { +) : ApiRequestBase(methodName = "ads.deleteTargetGroup") { init { addParam("account_id", accountId) addParam("target_group_id", targetGroupId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAccounts.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAccounts.kt index a45b8db7df..247a84824e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAccounts.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAccounts.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsAccount import com.vk.sdk.api.ads.responses.AdsGetAccountsResponse @@ -37,7 +37,7 @@ import org.json.JSONObject /** * Returns a list of advertising accounts. */ -class AdsGetAccounts : VKRequest>("ads.getAccounts") { +class AdsGetAccounts : ApiRequestBase>(methodName = "ads.getAccounts") { override fun parse(r: JSONObject): List = GsonHolder.gson.fromJson(r.toString(), AdsGetAccountsResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAds.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAds.kt index 7de3489633..305bc1a776 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAds.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAds.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsAd import com.vk.sdk.api.ads.responses.AdsGetAdsResponse @@ -46,10 +46,10 @@ import org.json.JSONObject * the parameter is null, ads of all campaigns will be shown. * @param clientId 'Available and required for advertising agencies.' ID of the client ads are * retrieved from. - * @param includeDeleted Flag that specifies whether archived ads shall be shown: *0 � show only - * active ads,, *1 � show all ads. - * @param onlyDeleted Flag that specifies whether to show only archived ads: *0 � show all ads,, *1 - * � show only archived ads. Available when include_deleted flag is *1 + * @param includeDeleted Flag that specifies whether archived ads shall be shown: *0 - show only + * active ads,, *1 - show all ads. + * @param onlyDeleted Flag that specifies whether to show only archived ads: *0 - show all ads,, + * *1 - show only archived ads. Available when include_deleted flag is *1 * @param limit Limit of number of returned ads. Used only if ad_ids parameter is null, and * 'campaign_ids' parameter contains ID of only one campaign. * @param offset Offset. Used in the same cases as 'limit' parameter. @@ -63,7 +63,7 @@ class AdsGetAds( private val onlyDeleted: Boolean? = null, private val limit: Int? = null, private val offset: Int? = null -) : VKRequest>("ads.getAds") { +) : ApiRequestBase>(methodName = "ads.getAds") { init { addParam("account_id", accountId) adIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAdsLayout.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAdsLayout.kt index fe482c2176..167ecc5787 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAdsLayout.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAdsLayout.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsAdLayout import com.vk.sdk.api.ads.responses.AdsGetAdsLayoutResponse @@ -45,8 +45,8 @@ import org.json.JSONObject * @param campaignIds Filter by advertising campaigns. Serialized JSON array with campaign IDs. If * the parameter is null, ads of all campaigns will be shown. * @param clientId 'For advertising agencies.' ID of the client ads are retrieved from. - * @param includeDeleted Flag that specifies whether archived ads shall be shown. *0 � show only - * active ads,, *1 � show all ads. + * @param includeDeleted Flag that specifies whether archived ads shall be shown. *0 - show only + * active ads,, *1 - show all ads. * @param limit Limit of number of returned ads. Used only if 'ad_ids' parameter is null, and * 'campaign_ids' parameter contains ID of only one campaign. * @param offset Offset. Used in the same cases as 'limit' parameter. @@ -59,7 +59,7 @@ class AdsGetAdsLayout( private val includeDeleted: Boolean? = null, private val limit: Int? = null, private val offset: Int? = null -) : VKRequest>("ads.getAdsLayout") { +) : ApiRequestBase>(methodName = "ads.getAdsLayout") { init { addParam("account_id", accountId) adIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAdsTargeting.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAdsTargeting.kt index 88b068ff52..b07b783b3b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAdsTargeting.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetAdsTargeting.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsTargSettings import com.vk.sdk.api.ads.responses.AdsGetAdsTargetingResponse @@ -45,8 +45,8 @@ import org.json.JSONObject * @param campaignIds Filter by advertising campaigns. Serialized JSON array with campaign IDs. If * the parameter is null, ads of all campaigns will be shown. * @param clientId 'For advertising agencies.' ID of the client ads are retrieved from. - * @param includeDeleted flag that specifies whether archived ads shall be shown: *0 � show only - * active ads,, *1 � show all ads. + * @param includeDeleted flag that specifies whether archived ads shall be shown: *0 - show only + * active ads,, *1 - show all ads. * @param limit Limit of number of returned ads. Used only if 'ad_ids' parameter is null, and * 'campaign_ids' parameter contains ID of only one campaign. * @param offset Offset needed to return a specific subset of results. @@ -59,7 +59,7 @@ class AdsGetAdsTargeting( private val includeDeleted: Boolean? = null, private val limit: Int? = null, private val offset: Int? = null -) : VKRequest>("ads.getAdsTargeting") { +) : ApiRequestBase>(methodName = "ads.getAdsTargeting") { init { addParam("account_id", accountId) adIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetBudget.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetBudget.kt index 98b53c6534..ce6a66a705 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetBudget.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetBudget.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsGetBudgetResponse import kotlin.Int @@ -39,7 +39,7 @@ import org.json.JSONObject */ class AdsGetBudget( private val accountId: Int -) : VKRequest("ads.getBudget") { +) : ApiRequestBase(methodName = "ads.getBudget") { init { addParam("account_id", accountId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetCampaigns.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetCampaigns.kt index 0737f856c2..6729304115 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetCampaigns.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetCampaigns.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsCampaign import com.vk.sdk.api.ads.dto.AdsGetCampaignsFields @@ -43,8 +43,8 @@ import org.json.JSONObject * @param accountId Advertising account ID. * @param clientId 'For advertising agencies'. ID of the client advertising campaigns are retrieved * from. - * @param includeDeleted Flag that specifies whether archived ads shall be shown. *0 � show only - * active campaigns,, *1 � show all campaigns. + * @param includeDeleted Flag that specifies whether archived ads shall be shown. *0 - show only + * active campaigns,, *1 - show all campaigns. * @param campaignIds Filter of advertising campaigns to show. Serialized JSON array with campaign * IDs. Only campaigns that exist in 'campaign_ids' and belong to the specified advertising account * will be shown. If the parameter is null, all campaigns will be shown. @@ -56,7 +56,7 @@ class AdsGetCampaigns( private val includeDeleted: Boolean? = null, private val campaignIds: String? = null, private val fields: List? = null -) : VKRequest>("ads.getCampaigns") { +) : ApiRequestBase>(methodName = "ads.getCampaigns") { init { addParam("account_id", accountId) clientId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetCategories.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetCategories.kt index d4ea45c313..d998b0cd96 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetCategories.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetCategories.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetCategoriesResponseDto import com.vk.sdk.api.ads.responses.AdsGetCategoriesResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class AdsGetCategories( private val lang: String? = null -) : VKRequest("ads.getCategories") { +) : ApiRequestBase(methodName = "ads.getCategories") { init { lang?.let { value -> addParam("lang", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetClients.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetClients.kt index c25d52e042..91ec345de1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetClients.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetClients.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsClient import com.vk.sdk.api.ads.responses.AdsGetClientsResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class AdsGetClients( private val accountId: Int -) : VKRequest>("ads.getClients") { +) : ApiRequestBase>(methodName = "ads.getClients") { init { addParam("account_id", accountId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetDemographics.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetDemographics.kt index e2d7935ec0..bf8dae38a8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetDemographics.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetDemographics.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsDemoStats import com.vk.sdk.api.ads.dto.AdsGetDemographicsIdsType @@ -41,19 +41,19 @@ import org.json.JSONObject /** * Returns demographics for ads or campaigns. * @param accountId Advertising account ID. - * @param idsType Type of requested objects listed in 'ids' parameter: *ad � ads,, *campaign � + * @param idsType Type of requested objects listed in 'ids' parameter: *ad - ads,, *campaign - * campaigns. * @param ids IDs requested ads or campaigns, separated with a comma, depending on the value set in * 'ids_type'. Maximum 2000 objects. - * @param period Data grouping by dates: *day � statistics by days,, *month � statistics by months,, - * *overall � overall statistics. 'date_from' and 'date_to' parameters set temporary limits. + * @param period Data grouping by dates: *day - statistics by days,, *month - statistics by months,, + * *overall - overall statistics. 'date_from' and 'date_to' parameters set temporary limits. * @param dateFrom Date to show statistics from. For different value of 'period' different date - * format is used: *day: YYYY-MM-DD, example: 2011-09-27 � September 27, 2011, **0 � day it was created - * on,, *month: YYYY-MM, example: 2011-09 � September 2011, **0 � month it was created in,, *overall: + * format is used: *day: YYYY-MM-DD, example: 2011-09-27 - September 27, 2011, **0 - day it was created + * on,, *month: YYYY-MM, example: 2011-09 - September 2011, **0 - month it was created in,, *overall: * 0. * @param dateTo Date to show statistics to. For different value of 'period' different date format - * is used: *day: YYYY-MM-DD, example: 2011-09-27 � September 27, 2011, **0 � current day,, *month: - * YYYY-MM, example: 2011-09 � September 2011, **0 � current month,, *overall: 0. + * is used: *day: YYYY-MM-DD, example: 2011-09-27 - September 27, 2011, **0 - current day,, *month: + * YYYY-MM, example: 2011-09 - September 2011, **0 - current month,, *overall: 0. */ class AdsGetDemographics( private val accountId: Int, @@ -62,7 +62,7 @@ class AdsGetDemographics( private val period: AdsGetDemographicsPeriod, private val dateFrom: String, private val dateTo: String -) : VKRequest>("ads.getDemographics") { +) : ApiRequestBase>(methodName = "ads.getDemographics") { init { addParam("account_id", accountId) addParam("ids_type", idsType.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetFloodStats.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetFloodStats.kt index e516a4807a..95d191dd06 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetFloodStats.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetFloodStats.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsFloodStats import com.vk.sdk.api.ads.responses.AdsGetFloodStatsResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class AdsGetFloodStats( private val accountId: Int -) : VKRequest("ads.getFloodStats") { +) : ApiRequestBase(methodName = "ads.getFloodStats") { init { addParam("account_id", accountId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetLookalikeRequests.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetLookalikeRequests.kt index fdb3154fc9..4bfb98358f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetLookalikeRequests.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetLookalikeRequests.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetLookalikeRequestsResponseDto import com.vk.sdk.api.ads.responses.AdsGetLookalikeRequestsResponse @@ -50,7 +50,7 @@ class AdsGetLookalikeRequests( private val offset: Int? = null, private val limit: Int? = null, private val sortBy: String? = null -) : VKRequest("ads.getLookalikeRequests") { +) : ApiRequestBase(methodName = "ads.getLookalikeRequests") { init { addParam("account_id", accountId) clientId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetMusicians.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetMusicians.kt index 563b40c95e..af7927591f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetMusicians.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetMusicians.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetMusiciansResponseDto import com.vk.sdk.api.ads.responses.AdsGetMusiciansResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class AdsGetMusicians( private val artistName: String -) : VKRequest("ads.getMusicians") { +) : ApiRequestBase(methodName = "ads.getMusicians") { init { addParam("artist_name", artistName) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetOfficeUsers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetOfficeUsers.kt index b035de4f0f..46f6bc412f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetOfficeUsers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetOfficeUsers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsUsers import com.vk.sdk.api.ads.responses.AdsGetOfficeUsersResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class AdsGetOfficeUsers( private val accountId: Int -) : VKRequest>("ads.getOfficeUsers") { +) : ApiRequestBase>(methodName = "ads.getOfficeUsers") { init { addParam("account_id", accountId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetPostsReach.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetPostsReach.kt index 599ba59ecb..030801ee38 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetPostsReach.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetPostsReach.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetPostsReachIdsType import com.vk.sdk.api.ads.dto.AdsPromotedPostReach @@ -40,7 +40,7 @@ import org.json.JSONObject /** * Returns detailed statistics of promoted posts reach from campaigns and ads. * @param accountId Advertising account ID. - * @param idsType Type of requested objects listed in 'ids' parameter: *ad � ads,, *campaign � + * @param idsType Type of requested objects listed in 'ids' parameter: *ad - ads,, *campaign - * campaigns. * @param ids IDs requested ads or campaigns, separated with a comma, depending on the value set in * 'ids_type'. Maximum 100 objects. @@ -49,7 +49,7 @@ class AdsGetPostsReach( private val accountId: Int, private val idsType: AdsGetPostsReachIdsType, private val ids: String -) : VKRequest>("ads.getPostsReach") { +) : ApiRequestBase>(methodName = "ads.getPostsReach") { init { addParam("account_id", accountId) addParam("ids_type", idsType.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetRejectionReason.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetRejectionReason.kt index b2194806ca..a83eb6e462 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetRejectionReason.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetRejectionReason.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsRejectReason import com.vk.sdk.api.ads.responses.AdsGetRejectionReasonResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class AdsGetRejectionReason( private val accountId: Int, private val adId: Int -) : VKRequest("ads.getRejectionReason") { +) : ApiRequestBase(methodName = "ads.getRejectionReason") { init { addParam("account_id", accountId) addParam("ad_id", adId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetStatistics.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetStatistics.kt index 5cf25afa9e..f53ad5c053 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetStatistics.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetStatistics.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetStatisticsIdsType import com.vk.sdk.api.ads.dto.AdsGetStatisticsPeriod @@ -42,19 +42,19 @@ import org.json.JSONObject /** * Returns statistics of performance indicators for ads, campaigns, clients or the whole account. * @param accountId Advertising account ID. - * @param idsType Type of requested objects listed in 'ids' parameter: *ad � ads,, *campaign � - * campaigns,, *client � clients,, *office � account. + * @param idsType Type of requested objects listed in 'ids' parameter: *ad - ads,, *campaign - + * campaigns,, *client - clients,, *office - account. * @param ids IDs requested ads, campaigns, clients or account, separated with a comma, depending on * the value set in 'ids_type'. Maximum 2000 objects. - * @param period Data grouping by dates: *day � statistics by days,, *month � statistics by months,, - * *overall � overall statistics. 'date_from' and 'date_to' parameters set temporary limits. + * @param period Data grouping by dates: *day - statistics by days,, *month - statistics by months,, + * *overall - overall statistics. 'date_from' and 'date_to' parameters set temporary limits. * @param dateFrom Date to show statistics from. For different value of 'period' different date - * format is used: *day: YYYY-MM-DD, example: 2011-09-27 � September 27, 2011, **0 � day it was created - * on,, *month: YYYY-MM, example: 2011-09 � September 2011, **0 � month it was created in,, *overall: + * format is used: *day: YYYY-MM-DD, example: 2011-09-27 - September 27, 2011, **0 - day it was created + * on,, *month: YYYY-MM, example: 2011-09 - September 2011, **0 - month it was created in,, *overall: * 0. * @param dateTo Date to show statistics to. For different value of 'period' different date format - * is used: *day: YYYY-MM-DD, example: 2011-09-27 � September 27, 2011, **0 � current day,, *month: - * YYYY-MM, example: 2011-09 � September 2011, **0 � current month,, *overall: 0. + * is used: *day: YYYY-MM-DD, example: 2011-09-27 - September 27, 2011, **0 - current day,, *month: + * YYYY-MM, example: 2011-09 - September 2011, **0 - current month,, *overall: 0. * @param statsFields Additional fields to add to statistics */ class AdsGetStatistics( @@ -65,7 +65,7 @@ class AdsGetStatistics( private val dateFrom: String, private val dateTo: String, private val statsFields: List? = null -) : VKRequest>("ads.getStatistics") { +) : ApiRequestBase>(methodName = "ads.getStatistics") { init { addParam("account_id", accountId) addParam("ids_type", idsType.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestions.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestions.kt index 81abd29a3b..7761b7b14c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestions.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestions.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetSuggestionsLang import com.vk.sdk.api.ads.dto.AdsGetSuggestionsSection @@ -40,15 +40,15 @@ import org.json.JSONObject /** * Returns a set of auto-suggestions for various targeting parameters. - * @param section Section, suggestions are retrieved in. Available values: *countries � request of a + * @param section Section, suggestions are retrieved in. Available values: *countries - request of a * list of countries. If q is not set or blank, a short list of countries is shown. Otherwise, a full - * list of countries is shown. *regions � requested list of regions. 'country' parameter is required. - * *cities � requested list of cities. 'country' parameter is required. *districts � requested list of - * districts. 'cities' parameter is required. *stations � requested list of subway stations. 'cities' - * parameter is required. *streets � requested list of streets. 'cities' parameter is required. - * *schools � requested list of educational organizations. 'cities' parameter is required. *interests � - * requested list of interests. *positions � requested list of positions (professions). *group_types � - * requested list of group types. *religions � requested list of religious commitments. *browsers � + * list of countries is shown. *regions - requested list of regions. 'country' parameter is required. + * *cities - requested list of cities. 'country' parameter is required. *districts - requested list of + * districts. 'cities' parameter is required. *stations - requested list of subway stations. 'cities' + * parameter is required. *streets - requested list of streets. 'cities' parameter is required. + * *schools - requested list of educational organizations. 'cities' parameter is required. *interests - + * requested list of interests. *positions - requested list of positions (professions). *group_types - + * requested list of group types. *religions - requested list of religious commitments. *browsers - * requested list of browsers and mobile devices. * @param ids Objects IDs separated by commas. If the parameter is passed, 'q, country, cities' * should not be passed. @@ -56,8 +56,8 @@ import org.json.JSONObject * positions). * @param country ID of the country objects are searched in. * @param cities IDs of cities where objects are searched in, separated with a comma. - * @param lang Language of the returned string values. Supported languages: *ru � Russian,, *ua � - * Ukrainian,, *en � English. + * @param lang Language of the returned string values. Supported languages: *ru - Russian,, *ua - + * Ukrainian,, *en - English. */ class AdsGetSuggestions( private val section: AdsGetSuggestionsSection, @@ -66,7 +66,7 @@ class AdsGetSuggestions( private val country: Int? = null, private val cities: String? = null, private val lang: AdsGetSuggestionsLang? = null -) : VKRequest>("ads.getSuggestions") { +) : ApiRequestBase>(methodName = "ads.getSuggestions") { init { addParam("section", section.value) ids?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsCities.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsCities.kt index 21f60d1f48..0e54242d3c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsCities.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsCities.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetSuggestionsLang import com.vk.sdk.api.ads.dto.AdsGetSuggestionsSection @@ -40,15 +40,15 @@ import org.json.JSONObject /** * Returns a set of auto-suggestions for various targeting parameters. - * @param section Section, suggestions are retrieved in. Available values: *countries � request of a + * @param section Section, suggestions are retrieved in. Available values: *countries - request of a * list of countries. If q is not set or blank, a short list of countries is shown. Otherwise, a full - * list of countries is shown. *regions � requested list of regions. 'country' parameter is required. - * *cities � requested list of cities. 'country' parameter is required. *districts � requested list of - * districts. 'cities' parameter is required. *stations � requested list of subway stations. 'cities' - * parameter is required. *streets � requested list of streets. 'cities' parameter is required. - * *schools � requested list of educational organizations. 'cities' parameter is required. *interests � - * requested list of interests. *positions � requested list of positions (professions). *group_types � - * requested list of group types. *religions � requested list of religious commitments. *browsers � + * list of countries is shown. *regions - requested list of regions. 'country' parameter is required. + * *cities - requested list of cities. 'country' parameter is required. *districts - requested list of + * districts. 'cities' parameter is required. *stations - requested list of subway stations. 'cities' + * parameter is required. *streets - requested list of streets. 'cities' parameter is required. + * *schools - requested list of educational organizations. 'cities' parameter is required. *interests - + * requested list of interests. *positions - requested list of positions (professions). *group_types - + * requested list of group types. *religions - requested list of religious commitments. *browsers - * requested list of browsers and mobile devices. * @param ids Objects IDs separated by commas. If the parameter is passed, 'q, country, cities' * should not be passed. @@ -56,8 +56,8 @@ import org.json.JSONObject * positions). * @param country ID of the country objects are searched in. * @param cities IDs of cities where objects are searched in, separated with a comma. - * @param lang Language of the returned string values. Supported languages: *ru � Russian,, *ua � - * Ukrainian,, *en � English. + * @param lang Language of the returned string values. Supported languages: *ru - Russian,, *ua - + * Ukrainian,, *en - English. */ class AdsGetSuggestionsCities( private val section: AdsGetSuggestionsSection, @@ -66,7 +66,7 @@ class AdsGetSuggestionsCities( private val country: Int? = null, private val cities: String? = null, private val lang: AdsGetSuggestionsLang? = null -) : VKRequest>("ads.getSuggestions") { +) : ApiRequestBase>(methodName = "ads.getSuggestions") { init { addParam("section", section.value) ids?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsRegions.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsRegions.kt index e82a6ce5c5..dd68a5bda1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsRegions.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsRegions.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetSuggestionsLang import com.vk.sdk.api.ads.dto.AdsGetSuggestionsSection @@ -40,15 +40,15 @@ import org.json.JSONObject /** * Returns a set of auto-suggestions for various targeting parameters. - * @param section Section, suggestions are retrieved in. Available values: *countries � request of a + * @param section Section, suggestions are retrieved in. Available values: *countries - request of a * list of countries. If q is not set or blank, a short list of countries is shown. Otherwise, a full - * list of countries is shown. *regions � requested list of regions. 'country' parameter is required. - * *cities � requested list of cities. 'country' parameter is required. *districts � requested list of - * districts. 'cities' parameter is required. *stations � requested list of subway stations. 'cities' - * parameter is required. *streets � requested list of streets. 'cities' parameter is required. - * *schools � requested list of educational organizations. 'cities' parameter is required. *interests � - * requested list of interests. *positions � requested list of positions (professions). *group_types � - * requested list of group types. *religions � requested list of religious commitments. *browsers � + * list of countries is shown. *regions - requested list of regions. 'country' parameter is required. + * *cities - requested list of cities. 'country' parameter is required. *districts - requested list of + * districts. 'cities' parameter is required. *stations - requested list of subway stations. 'cities' + * parameter is required. *streets - requested list of streets. 'cities' parameter is required. + * *schools - requested list of educational organizations. 'cities' parameter is required. *interests - + * requested list of interests. *positions - requested list of positions (professions). *group_types - + * requested list of group types. *religions - requested list of religious commitments. *browsers - * requested list of browsers and mobile devices. * @param ids Objects IDs separated by commas. If the parameter is passed, 'q, country, cities' * should not be passed. @@ -56,8 +56,8 @@ import org.json.JSONObject * positions). * @param country ID of the country objects are searched in. * @param cities IDs of cities where objects are searched in, separated with a comma. - * @param lang Language of the returned string values. Supported languages: *ru � Russian,, *ua � - * Ukrainian,, *en � English. + * @param lang Language of the returned string values. Supported languages: *ru - Russian,, *ua - + * Ukrainian,, *en - English. */ class AdsGetSuggestionsRegions( private val section: AdsGetSuggestionsSection, @@ -66,7 +66,7 @@ class AdsGetSuggestionsRegions( private val country: Int? = null, private val cities: String? = null, private val lang: AdsGetSuggestionsLang? = null -) : VKRequest>("ads.getSuggestions") { +) : ApiRequestBase>(methodName = "ads.getSuggestions") { init { addParam("section", section.value) ids?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsSchools.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsSchools.kt index efe3741668..bb8052bda9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsSchools.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetSuggestionsSchools.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetSuggestionsLang import com.vk.sdk.api.ads.dto.AdsGetSuggestionsSection @@ -40,15 +40,15 @@ import org.json.JSONObject /** * Returns a set of auto-suggestions for various targeting parameters. - * @param section Section, suggestions are retrieved in. Available values: *countries � request of a + * @param section Section, suggestions are retrieved in. Available values: *countries - request of a * list of countries. If q is not set or blank, a short list of countries is shown. Otherwise, a full - * list of countries is shown. *regions � requested list of regions. 'country' parameter is required. - * *cities � requested list of cities. 'country' parameter is required. *districts � requested list of - * districts. 'cities' parameter is required. *stations � requested list of subway stations. 'cities' - * parameter is required. *streets � requested list of streets. 'cities' parameter is required. - * *schools � requested list of educational organizations. 'cities' parameter is required. *interests � - * requested list of interests. *positions � requested list of positions (professions). *group_types � - * requested list of group types. *religions � requested list of religious commitments. *browsers � + * list of countries is shown. *regions - requested list of regions. 'country' parameter is required. + * *cities - requested list of cities. 'country' parameter is required. *districts - requested list of + * districts. 'cities' parameter is required. *stations - requested list of subway stations. 'cities' + * parameter is required. *streets - requested list of streets. 'cities' parameter is required. + * *schools - requested list of educational organizations. 'cities' parameter is required. *interests - + * requested list of interests. *positions - requested list of positions (professions). *group_types - + * requested list of group types. *religions - requested list of religious commitments. *browsers - * requested list of browsers and mobile devices. * @param ids Objects IDs separated by commas. If the parameter is passed, 'q, country, cities' * should not be passed. @@ -56,8 +56,8 @@ import org.json.JSONObject * positions). * @param country ID of the country objects are searched in. * @param cities IDs of cities where objects are searched in, separated with a comma. - * @param lang Language of the returned string values. Supported languages: *ru � Russian,, *ua � - * Ukrainian,, *en � English. + * @param lang Language of the returned string values. Supported languages: *ru - Russian,, *ua - + * Ukrainian,, *en - English. */ class AdsGetSuggestionsSchools( private val section: AdsGetSuggestionsSection, @@ -66,7 +66,7 @@ class AdsGetSuggestionsSchools( private val country: Int? = null, private val cities: String? = null, private val lang: AdsGetSuggestionsLang? = null -) : VKRequest>("ads.getSuggestions") { +) : ApiRequestBase>(methodName = "ads.getSuggestions") { init { addParam("section", section.value) ids?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetTargetGroups.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetTargetGroups.kt index 86b25a0384..541722e04a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetTargetGroups.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetTargetGroups.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsTargetGroup import com.vk.sdk.api.ads.responses.AdsGetTargetGroupsResponse @@ -41,13 +41,13 @@ import org.json.JSONObject * @param accountId Advertising account ID. * @param clientId 'Only for advertising agencies.', ID of the client with the advertising account * where the group will be created. - * @param extended '1' � to return pixel code. + * @param extended '1' - to return pixel code. */ class AdsGetTargetGroups( private val accountId: Int, private val clientId: Int? = null, private val extended: Boolean? = null -) : VKRequest>("ads.getTargetGroups") { +) : ApiRequestBase>(methodName = "ads.getTargetGroups") { init { addParam("account_id", accountId) clientId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetTargetingStats.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetTargetingStats.kt index 873a8d3803..a6820afa5f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetTargetingStats.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetTargetingStats.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetTargetingStatsAdFormat import com.vk.sdk.api.ads.dto.AdsTargStats @@ -45,12 +45,12 @@ import org.json.JSONObject * @param criteria Serialized JSON object that describes targeting parameters. Description of * 'criteria' object see below. * @param adId ID of an ad which targeting parameters shall be analyzed. - * @param adFormat Ad format. Possible values: *'1' � image and text,, *'2' � big image,, *'3' � - * exclusive format,, *'4' � community, square image,, *'7' � special app format,, *'8' � special - * community format,, *'9' � post in community,, *'10' � app board. - * @param adPlatform Platforms to use for ad showing. Possible values: (for 'ad_format' = '1'), *'0' - * � VK and partner sites,, *'1' � VK only. (for 'ad_format' = '9'), *'all' � all platforms,, - * *'desktop' � desktop version,, *'mobile' � mobile version and apps. + * @param adFormat Ad format. Possible values: *'1' - image and text,, *'2' - big image,, *'3' - + * exclusive format,, *'4' - community, square image,, *'7' - special app format,, *'8' - special + * community format,, *'9' - post in community,, *'10' - app board. + * @param adPlatform Platforms to use for ad showing. Possible values: (for 'ad_format' = '1'), + * *'0' - VK and partner sites,, *'1' - VK only. (for 'ad_format' = '9'), *'all' - all platforms,, + * *'desktop' - desktop version,, *'mobile' - mobile version and apps. * @param adPlatformNoWall * @param adPlatformNoAdNetwork * @param linkDomain Domain of the advertised object. @@ -69,7 +69,7 @@ class AdsGetTargetingStats( private val adPlatformNoAdNetwork: String? = null, private val linkDomain: String? = null, private val needPrecise: Boolean? = null -) : VKRequest("ads.getTargetingStats") { +) : ApiRequestBase(methodName = "ads.getTargetingStats") { init { addParam("account_id", accountId) addParam("link_url", linkUrl) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetUploadURL.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetUploadURL.kt index 272e22514e..166edd11df 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetUploadURL.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetUploadURL.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsGetUploadURLAdFormat import com.vk.sdk.api.ads.responses.AdsGetUploadURLResponse @@ -37,14 +37,14 @@ import org.json.JSONObject /** * Returns URL to upload an ad photo to. - * @param adFormat Ad format: *1 � image and text,, *2 � big image,, *3 � exclusive format,, *4 � - * community, square image,, *7 � special app format. + * @param adFormat Ad format: *1 - image and text,, *2 - big image,, *3 - exclusive format,, *4 - + * community, square image,, *7 - special app format. * @param icon */ class AdsGetUploadURL( private val adFormat: AdsGetUploadURLAdFormat, private val icon: Int? = null -) : VKRequest("ads.getUploadURL") { +) : ApiRequestBase(methodName = "ads.getUploadURL") { init { addParam("ad_format", adFormat.value) icon?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetVideoUploadURL.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetVideoUploadURL.kt index 2f9bae7022..b6c07b3c83 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetVideoUploadURL.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsGetVideoUploadURL.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsGetVideoUploadURLResponse import kotlin.String @@ -36,7 +36,7 @@ import org.json.JSONObject /** * Returns URL to upload an ad video to. */ -class AdsGetVideoUploadURL : VKRequest("ads.getVideoUploadURL") { +class AdsGetVideoUploadURL : ApiRequestBase(methodName = "ads.getVideoUploadURL") { override fun parse(r: JSONObject): String = GsonHolder.gson.fromJson(r.toString(), AdsGetVideoUploadURLResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsImportTargetContacts.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsImportTargetContacts.kt index 9c5d909f63..733d438fc3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsImportTargetContacts.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsImportTargetContacts.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsImportTargetContactsResponse import kotlin.Int @@ -47,7 +47,7 @@ class AdsImportTargetContacts( private val targetGroupId: Int, private val contacts: String, private val clientId: Int? = null -) : VKRequest("ads.importTargetContacts") { +) : ApiRequestBase(methodName = "ads.importTargetContacts") { init { addParam("account_id", accountId) addParam("target_group_id", targetGroupId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsRemoveOfficeUsers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsRemoveOfficeUsers.kt index 7916e7f659..b9639c550c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsRemoveOfficeUsers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsRemoveOfficeUsers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsRemoveOfficeUsersResponse import kotlin.Boolean @@ -43,7 +43,7 @@ import org.json.JSONObject class AdsRemoveOfficeUsers( private val accountId: Int, private val ids: String -) : VKRequest("ads.removeOfficeUsers") { +) : ApiRequestBase(methodName = "ads.removeOfficeUsers") { init { addParam("account_id", accountId) addParam("ids", ids) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateAds.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateAds.kt index 2fb41d39f9..75d5be3108 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateAds.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateAds.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsUpdateAdsResponse import kotlin.Int @@ -44,7 +44,7 @@ import org.json.JSONObject class AdsUpdateAds( private val accountId: Int, private val data: String -) : VKRequest>("ads.updateAds") { +) : ApiRequestBase>(methodName = "ads.updateAds") { init { addParam("account_id", accountId) addParam("data", data) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateCampaigns.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateCampaigns.kt index df36f83357..ddece74b22 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateCampaigns.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateCampaigns.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsUpdateCampaignsResponse import kotlin.Int @@ -43,7 +43,7 @@ import org.json.JSONObject class AdsUpdateCampaigns( private val accountId: Int, private val data: String -) : VKRequest("ads.updateCampaigns") { +) : ApiRequestBase(methodName = "ads.updateCampaigns") { init { addParam("account_id", accountId) addParam("data", data) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateClients.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateClients.kt index a0e6c09d00..7febd54e5e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateClients.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateClients.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.responses.AdsUpdateClientsResponse import kotlin.Int @@ -43,7 +43,7 @@ import org.json.JSONObject class AdsUpdateClients( private val accountId: Int, private val data: String -) : VKRequest("ads.updateClients") { +) : ApiRequestBase(methodName = "ads.updateClients") { init { addParam("account_id", accountId) addParam("data", data) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateOfficeUsers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateOfficeUsers.kt index 88e0d56d00..ee60abcd16 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateOfficeUsers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateOfficeUsers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.ads.dto.AdsUpdateOfficeUsersResult import com.vk.sdk.api.ads.dto.AdsUserSpecification @@ -45,7 +45,7 @@ import org.json.JSONObject class AdsUpdateOfficeUsers( private val accountId: Int, private val data: List -) : VKRequest>("ads.updateOfficeUsers") { +) : ApiRequestBase>(methodName = "ads.updateOfficeUsers") { init { addParam("account_id", accountId) addParam("data", GsonHolder.gson.toJson(data)) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateTargetGroup.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateTargetGroup.kt index 50ad043c2c..a41daff450 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateTargetGroup.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/ads/methods/AdsUpdateTargetGroup.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.ads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject * Edits a retarget group. * @param accountId Advertising account ID. * @param targetGroupId Group ID. - * @param name New name of the target group � a string up to 64 characters long. + * @param name New name of the target group - a string up to 64 characters long. * @param lifetime 'Only for the groups that get audience from sites with user accounting code.', * Time in days when users added to a retarget group will be automatically excluded from it. '0' - * automatic exclusion is off. minimum 1 maximum 720 @@ -58,7 +58,7 @@ class AdsUpdateTargetGroup( private val domain: String? = null, private val targetPixelId: Int? = null, private val targetPixelRules: String? = null -) : VKRequest("ads.updateTargetGroup") { +) : ApiRequestBase(methodName = "ads.updateTargetGroup") { init { addParam("account_id", accountId) addParam("target_group_id", targetGroupId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetAppImageUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetAppImageUploadServer.kt index 5886de552d..263454c9c7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetAppImageUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetAppImageUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.appWidgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.appWidgets.dto.AppWidgetsGetAppImageUploadServerImageType import com.vk.sdk.api.appWidgets.dto.AppWidgetsGetAppImageUploadServerResponseDto @@ -40,7 +40,8 @@ import org.json.JSONObject */ class AppWidgetsGetAppImageUploadServer( private val imageType: AppWidgetsGetAppImageUploadServerImageType -) : VKRequest("appWidgets.getAppImageUploadServer") { +) : ApiRequestBase(methodName = + "appWidgets.getAppImageUploadServer") { init { addParam("image_type", imageType.value) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetAppImages.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetAppImages.kt index 7f6f01f081..53674535d5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetAppImages.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetAppImages.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.appWidgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.appWidgets.dto.AppWidgetsGetAppImagesImageType import com.vk.sdk.api.appWidgets.dto.AppWidgetsPhotos @@ -45,7 +45,7 @@ class AppWidgetsGetAppImages( private val offset: Int? = null, private val count: Int? = null, private val imageType: AppWidgetsGetAppImagesImageType? = null -) : VKRequest("appWidgets.getAppImages") { +) : ApiRequestBase(methodName = "appWidgets.getAppImages") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetGroupImageUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetGroupImageUploadServer.kt index feafd7cb2c..d9dbaa86ae 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetGroupImageUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetGroupImageUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.appWidgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.appWidgets.dto.AppWidgetsGetGroupImageUploadServerImageType import com.vk.sdk.api.appWidgets.dto.AppWidgetsGetGroupImageUploadServerResponseDto @@ -40,9 +40,8 @@ import org.json.JSONObject */ class AppWidgetsGetGroupImageUploadServer( private val imageType: AppWidgetsGetGroupImageUploadServerImageType -) : - VKRequest("appWidgets.getGroupImageUploadServer") - { +) : ApiRequestBase(methodName = + "appWidgets.getGroupImageUploadServer") { init { addParam("image_type", imageType.value) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetGroupImages.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetGroupImages.kt index 71ef480176..71002cc383 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetGroupImages.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetGroupImages.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.appWidgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.appWidgets.dto.AppWidgetsGetGroupImagesImageType import com.vk.sdk.api.appWidgets.dto.AppWidgetsPhotos @@ -45,7 +45,7 @@ class AppWidgetsGetGroupImages( private val offset: Int? = null, private val count: Int? = null, private val imageType: AppWidgetsGetGroupImagesImageType? = null -) : VKRequest("appWidgets.getGroupImages") { +) : ApiRequestBase(methodName = "appWidgets.getGroupImages") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetImagesById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetImagesById.kt index 5571bb8956..dbd144d44e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetImagesById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsGetImagesById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.appWidgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.appWidgets.dto.AppWidgetsPhoto import com.vk.sdk.api.appWidgets.responses.AppWidgetsGetImagesByIdResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class AppWidgetsGetImagesById( private val images: List -) : VKRequest>("appWidgets.getImagesById") { +) : ApiRequestBase>(methodName = "appWidgets.getImagesById") { init { addParam("images", images) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsSaveAppImage.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsSaveAppImage.kt index 9b3e36d4c7..bd694e63c8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsSaveAppImage.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsSaveAppImage.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.appWidgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.appWidgets.dto.AppWidgetsPhoto import com.vk.sdk.api.appWidgets.responses.AppWidgetsSaveAppImageResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class AppWidgetsSaveAppImage( private val hash: String, private val image: String -) : VKRequest("appWidgets.saveAppImage") { +) : ApiRequestBase(methodName = "appWidgets.saveAppImage") { init { addParam("hash", hash) addParam("image", image) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsSaveGroupImage.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsSaveGroupImage.kt index 669e867163..3dcdb081e6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsSaveGroupImage.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsSaveGroupImage.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.appWidgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.appWidgets.dto.AppWidgetsPhoto import com.vk.sdk.api.appWidgets.responses.AppWidgetsSaveGroupImageResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class AppWidgetsSaveGroupImage( private val hash: String, private val image: String -) : VKRequest("appWidgets.saveGroupImage") { +) : ApiRequestBase(methodName = "appWidgets.saveGroupImage") { init { addParam("hash", hash) addParam("image", image) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsUpdate.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsUpdate.kt index c7f065dcef..48f3c6af33 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsUpdate.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/appWidgets/methods/AppWidgetsUpdate.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.appWidgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.appWidgets.dto.AppWidgetsUpdateType import com.vk.sdk.api.base.dto.BaseOkResponseDto @@ -43,7 +43,7 @@ import org.json.JSONObject class AppWidgetsUpdate( private val code: String, private val type: AppWidgetsUpdateType -) : VKRequest("appWidgets.update") { +) : ApiRequestBase(methodName = "appWidgets.update") { init { addParam("code", code) addParam("type", type.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsDeleteAppRequests.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsDeleteAppRequests.kt index c4224394bd..8570f61b15 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsDeleteAppRequests.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsDeleteAppRequests.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -36,7 +36,8 @@ import org.json.JSONObject /** * Deletes all request notifications from the current app. */ -class AppsDeleteAppRequests : VKRequest("apps.deleteAppRequests") { +class AppsDeleteAppRequests : ApiRequestBase(methodName = + "apps.deleteAppRequests") { override fun parse(r: JSONObject): BaseOkResponseDto = GsonHolder.gson.fromJson(r.toString(), BaseOkResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGet.kt index afcf9e78b0..07b5901a82 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.apps.dto.AppsGetNameCase import com.vk.sdk.api.apps.dto.AppsGetPlatform @@ -44,8 +44,8 @@ import org.json.JSONObject * Returns applications data. * @param appId Application ID minimum 0 * @param appIds List of application ID - * @param platform platform. Possible values: *'ios' � iOS,, *'android' � Android,, *'winphone' � - * Windows Phone,, *'web' � ���������� �� vk.com. By default: 'web'. default "web" + * @param platform platform. Possible values: *'ios' - iOS,, *'android' - Android,, *'winphone' - + * Windows Phone,, *'web' - ---------- -- vk.com. By default: 'web'. default "web" * @param extended default 0 * @param returnFriends default 0 * @param fields Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' @@ -53,8 +53,8 @@ import org.json.JSONObject * 'contacts', 'education', 'online', 'counters', 'relation', 'last_seen', 'activity', * 'can_write_private_message', 'can_see_all_posts', 'can_post', 'universities', (only if * return_friends - 1) - * @param nameCase Case for declension of user name and surname: 'nom' � nominative (default),, - * 'gen' � genitive,, 'dat' � dative,, 'acc' � accusative,, 'ins' � instrumental,, 'abl' � + * @param nameCase Case for declension of user name and surname: 'nom' - nominative (default),, + * 'gen' - genitive,, 'dat' - dative,, 'acc' - accusative,, 'ins' - instrumental,, 'abl' - * prepositional. (only if 'return_friends' = '1') */ class AppsGet( @@ -65,7 +65,7 @@ class AppsGet( private val returnFriends: Boolean? = null, private val fields: List? = null, private val nameCase: AppsGetNameCase? = null -) : VKRequest("apps.get") { +) : ApiRequestBase(methodName = "apps.get") { init { appId?.let { value -> addParam("app_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetCatalog.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetCatalog.kt index 18549062db..9eb028561f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetCatalog.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetCatalog.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.apps.dto.AppsGetCatalogFilter import com.vk.sdk.api.apps.dto.AppsGetCatalogResponseDto @@ -43,20 +43,20 @@ import org.json.JSONObject /** * Returns a list of applications (apps) available to users in the App Catalog. * @param count Number of apps to return. default 100 minimum 0 - * @param sort Sort order: 'popular_today' � popular for one day (default), 'visitors' � by visitors - * number , 'create_date' � by creation date, 'growth_rate' � by growth rate, 'popular_week' � popular + * @param sort Sort order: 'popular_today' - popular for one day (default), 'visitors' - by visitors + * number , 'create_date' - by creation date, 'growth_rate' - by growth rate, 'popular_week' - popular * for one week * @param offset Offset required to return a specific subset of apps. minimum 0 * @param platform - * @param extended '1' � to return additional fields 'screenshots', 'MAU', 'catalog_position', and - * 'international'. If set, 'count' must be less than or equal to '100'. '0' � not to return additional + * @param extended '1' - to return additional fields 'screenshots', 'MAU', 'catalog_position', and + * 'international'. If set, 'count' must be less than or equal to '100'. '0' - not to return additional * fields (default). * @param returnFriends * @param fields * @param nameCase * @param q Search query string. * @param genreId minimum 0 - * @param filter 'installed' � to return list of installed apps (only for mobile platform). + * @param filter 'installed' - to return list of installed apps (only for mobile platform). */ class AppsGetCatalog( private val count: Int, @@ -70,7 +70,7 @@ class AppsGetCatalog( private val q: String? = null, private val genreId: Int? = null, private val filter: AppsGetCatalogFilter? = null -) : VKRequest("apps.getCatalog") { +) : ApiRequestBase(methodName = "apps.getCatalog") { init { addParam("count", count) sort?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetFriendsList.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetFriendsList.kt index d7a281cccb..b07525ac0c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetFriendsList.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetFriendsList.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.apps.dto.AppsGetFriendsListResponseDto import com.vk.sdk.api.apps.dto.AppsGetFriendsListType @@ -43,8 +43,8 @@ import org.json.JSONObject * @param extended default 0 * @param count List size. default 20 minimum 0 maximum 5000 * @param offset default 0 minimum 0 - * @param type List type. Possible values: * 'invite' � available for invites (don't play the - * game),, * 'request' � available for request (play the game). By default: 'invite'. default "invite" + * @param type List type. Possible values: * 'invite' - available for invites (don't play the + * game),, * 'request' - available for request (play the game). By default: 'invite'. default "invite" * @param fields Additional profile fields, see [vk.com/dev/fields|description]. */ class AppsGetFriendsList( @@ -53,7 +53,7 @@ class AppsGetFriendsList( private val offset: Int? = null, private val type: AppsGetFriendsListType? = null, private val fields: List? = null -) : VKRequest("apps.getFriendsList") { +) : ApiRequestBase(methodName = "apps.getFriendsList") { init { extended?.let { value -> addParam("extended", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetLeaderboard.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetLeaderboard.kt index ffe0eac62e..aa3e964495 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetLeaderboard.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetLeaderboard.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.apps.dto.AppsGetLeaderboardResponseDto import com.vk.sdk.api.apps.dto.AppsGetLeaderboardType @@ -37,17 +37,17 @@ import org.json.JSONObject /** * Returns players rating in the game. - * @param type Leaderboard type. Possible values: *'level' � by level,, *'points' � by mission - * points,, *'score' � by score (). - * @param global Rating type. Possible values: *'1' � global rating among all players,, *'0' � + * @param type Leaderboard type. Possible values: *'level' - by level,, *'points' - by mission + * points,, *'score' - by score (). + * @param global Rating type. Possible values: *'1' - global rating among all players,, *'0' - * rating among user friends. default 1 - * @param extended 1 � to return additional info about users default 0 + * @param extended 1 - to return additional info about users default 0 */ class AppsGetLeaderboard( private val type: AppsGetLeaderboardType, private val global: Boolean? = null, private val extended: Boolean? = null -) : VKRequest("apps.getLeaderboard") { +) : ApiRequestBase(methodName = "apps.getLeaderboard") { init { addParam("type", type.value) global?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetLeaderboardExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetLeaderboardExtended.kt index f78a6b9121..e042642578 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetLeaderboardExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetLeaderboardExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.apps.dto.AppsGetLeaderboardExtendedResponseDto import com.vk.sdk.api.apps.dto.AppsGetLeaderboardType @@ -37,17 +37,17 @@ import org.json.JSONObject /** * Returns players rating in the game. - * @param type Leaderboard type. Possible values: *'level' � by level,, *'points' � by mission - * points,, *'score' � by score (). - * @param global Rating type. Possible values: *'1' � global rating among all players,, *'0' � + * @param type Leaderboard type. Possible values: *'level' - by level,, *'points' - by mission + * points,, *'score' - by score (). + * @param global Rating type. Possible values: *'1' - global rating among all players,, *'0' - * rating among user friends. default 1 - * @param extended 1 � to return additional info about users default 0 + * @param extended 1 - to return additional info about users default 0 */ class AppsGetLeaderboardExtended( private val type: AppsGetLeaderboardType, private val global: Boolean? = null, private val extended: Boolean? = null -) : VKRequest("apps.getLeaderboard") { +) : ApiRequestBase(methodName = "apps.getLeaderboard") { init { addParam("type", type.value) global?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetScopes.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetScopes.kt index bbf0f5fec2..0e32c424d8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetScopes.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetScopes.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.apps.dto.AppsGetScopesResponseDto import com.vk.sdk.api.apps.dto.AppsGetScopesType @@ -40,7 +40,7 @@ import org.json.JSONObject */ class AppsGetScopes( private val type: AppsGetScopesType? = null -) : VKRequest("apps.getScopes") { +) : ApiRequestBase(methodName = "apps.getScopes") { init { type?.let { value -> addParam("type", value.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetScore.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetScore.kt index fdbf663ed2..4dda80ce10 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetScore.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsGetScore.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.apps.responses.AppsGetScoreResponse import kotlin.Int @@ -39,7 +39,7 @@ import org.json.JSONObject */ class AppsGetScore( private val userId: Int -) : VKRequest("apps.getScore") { +) : ApiRequestBase(methodName = "apps.getScore") { init { addParam("user_id", userId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsPromoHasActiveGift.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsPromoHasActiveGift.kt index cf82a1bdb8..fb8ac0c1e4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsPromoHasActiveGift.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsPromoHasActiveGift.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class AppsPromoHasActiveGift( private val promoId: Int, private val userId: Int? = null -) : VKRequest("apps.promoHasActiveGift") { +) : ApiRequestBase(methodName = "apps.promoHasActiveGift") { init { addParam("promo_id", promoId) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsPromoUseGift.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsPromoUseGift.kt index 599afc0512..80c6c7d7e6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsPromoUseGift.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsPromoUseGift.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class AppsPromoUseGift( private val promoId: Int, private val userId: Int? = null -) : VKRequest("apps.promoUseGift") { +) : ApiRequestBase(methodName = "apps.promoUseGift") { init { addParam("promo_id", promoId) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsSendRequest.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsSendRequest.kt index d51a70a638..675cba17a7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsSendRequest.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/apps/methods/AppsSendRequest.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.apps.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.apps.dto.AppsSendRequestType import com.vk.sdk.api.apps.responses.AppsSendRequestResponse @@ -40,8 +40,8 @@ import org.json.JSONObject * Sends a request to another user in an app that uses VK authorization. * @param userId id of the user to send a request minimum 0 * @param text request text - * @param type request type. Values: 'invite' � if the request is sent to a user who does not have - * the app installed,, 'request' � if a user has already installed the app default "request" + * @param type request type. Values: 'invite' - if the request is sent to a user who does not have + * the app installed,, 'request' - if a user has already installed the app default "request" * @param name maxLength 128 * @param key special string key to be sent with the request * @param separate @@ -53,7 +53,7 @@ class AppsSendRequest( private val name: String? = null, private val key: String? = null, private val separate: Boolean? = null -) : VKRequest("apps.sendRequest") { +) : ApiRequestBase(methodName = "apps.sendRequest") { init { addParam("user_id", userId) text?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/auth/methods/AuthCheckPhone.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/auth/methods/AuthCheckPhone.kt index 90b6e301e4..ee2be7f5a2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/auth/methods/AuthCheckPhone.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/auth/methods/AuthCheckPhone.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.auth.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -48,7 +48,7 @@ class AuthCheckPhone( private val clientId: Int? = null, private val clientSecret: String? = null, private val authByPhone: Boolean? = null -) : VKRequest("auth.checkPhone") { +) : ApiRequestBase(methodName = "auth.checkPhone") { init { addParam("phone", phone) clientId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/auth/methods/AuthRestore.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/auth/methods/AuthRestore.kt index a2cb2f397c..d826003da3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/auth/methods/AuthRestore.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/auth/methods/AuthRestore.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.auth.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.auth.dto.AuthRestoreResponseDto import com.vk.sdk.api.auth.responses.AuthRestoreResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class AuthRestore( private val phone: String, private val lastName: String -) : VKRequest("auth.restore") { +) : ApiRequestBase(methodName = "auth.restore") { init { addParam("phone", phone) addParam("last_name", lastName) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardAddTopic.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardAddTopic.kt index de86ac6570..8d93d2c519 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardAddTopic.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardAddTopic.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.board.responses.BoardAddTopicResponse import kotlin.Boolean @@ -41,11 +41,11 @@ import org.json.JSONObject * @param groupId ID of the community that owns the discussion board. minimum 0 * @param title Topic title. * @param text Text of the topic. - * @param fromGroup For a community: '1' � to post the topic as by the community, '0' � to post the + * @param fromGroup For a community: '1' - to post the topic as by the community, '0' - to post the * topic as by the user (default) * @param attachments List of media objects attached to the topic, in the following format: - * "_,_", '' � Type of media object: 'photo' � photo, 'video' � - * video, 'audio' � audio, 'doc' � document, '' � ID of the media owner. '' � Media + * "_,_", '' - Type of media object: 'photo' - photo, 'video' - + * video, 'audio' - audio, 'doc' - document, '' - ID of the media owner. '' - Media * ID. Example: "photo100172_166443618,photo66748_265827614", , "NOTE: If you try to attach more than * one reference, an error will be thrown.", */ @@ -55,7 +55,7 @@ class BoardAddTopic( private val text: String? = null, private val fromGroup: Boolean? = null, private val attachments: List? = null -) : VKRequest("board.addTopic") { +) : ApiRequestBase(methodName = "board.addTopic") { init { addParam("group_id", groupId) addParam("title", title) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardCloseTopic.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardCloseTopic.kt index 133eb17fca..5aba7e73c2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardCloseTopic.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardCloseTopic.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class BoardCloseTopic( private val groupId: Int, private val topicId: Int -) : VKRequest("board.closeTopic") { +) : ApiRequestBase(methodName = "board.closeTopic") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardCreateComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardCreateComment.kt index ccb91d7f5e..f1962d076c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardCreateComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardCreateComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.board.responses.BoardCreateCommentResponse import kotlin.Boolean @@ -42,10 +42,10 @@ import org.json.JSONObject * @param topicId ID of the topic to be commented on. minimum 0 * @param message (Required if 'attachments' is not set.) Text of the comment. * @param attachments (Required if 'text' is not set.) List of media objects attached to the - * comment, in the following format: "_,_", '' � Type of media - * object: 'photo' � photo, 'video' � video, 'audio' � audio, 'doc' � document, '' � ID of - * the media owner. '' � Media ID. - * @param fromGroup '1' � to post the comment as by the community, '0' � to post the comment as by + * comment, in the following format: "_,_", '' - Type of media + * object: 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, '' - ID of + * the media owner. '' - Media ID. + * @param fromGroup '1' - to post the comment as by the community, '0' - to post the comment as by * the user (default) * @param stickerId Sticker ID. minimum 0 * @param guid Unique identifier to avoid repeated comments. @@ -58,7 +58,7 @@ class BoardCreateComment( private val fromGroup: Boolean? = null, private val stickerId: Int? = null, private val guid: String? = null -) : VKRequest("board.createComment") { +) : ApiRequestBase(methodName = "board.createComment") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardDeleteComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardDeleteComment.kt index e97180139d..7ab42d59ec 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardDeleteComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardDeleteComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class BoardDeleteComment( private val groupId: Int, private val topicId: Int, private val commentId: Int -) : VKRequest("board.deleteComment") { +) : ApiRequestBase(methodName = "board.deleteComment") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardDeleteTopic.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardDeleteTopic.kt index 25757c76fa..91ce008cb5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardDeleteTopic.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardDeleteTopic.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class BoardDeleteTopic( private val groupId: Int, private val topicId: Int -) : VKRequest("board.deleteTopic") { +) : ApiRequestBase(methodName = "board.deleteTopic") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardEditComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardEditComment.kt index abb3ef95a2..de05cb69c8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardEditComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardEditComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,9 +43,9 @@ import org.json.JSONObject * @param commentId ID of the comment on the topic. minimum 0 * @param message (Required if 'attachments' is not set). New comment text. * @param attachments (Required if 'message' is not set.) List of media objects attached to the - * comment, in the following format: "_,_", '' � Type of media - * object: 'photo' � photo, 'video' � video, 'audio' � audio, 'doc' � document, '' � ID of - * the media owner. '' � Media ID. Example: "photo100172_166443618,photo66748_265827614" + * comment, in the following format: "_,_", '' - Type of media + * object: 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, '' - ID of + * the media owner. '' - Media ID. Example: "photo100172_166443618,photo66748_265827614" */ class BoardEditComment( private val groupId: Int, @@ -53,7 +53,7 @@ class BoardEditComment( private val commentId: Int, private val message: String? = null, private val attachments: List? = null -) : VKRequest("board.editComment") { +) : ApiRequestBase(methodName = "board.editComment") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardEditTopic.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardEditTopic.kt index c2e3a6f41a..dfcd55262f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardEditTopic.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardEditTopic.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ class BoardEditTopic( private val groupId: Int, private val topicId: Int, private val title: String -) : VKRequest("board.editTopic") { +) : ApiRequestBase(methodName = "board.editTopic") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardFixTopic.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardFixTopic.kt index 49ec9c629b..fdd6645ce1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardFixTopic.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardFixTopic.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class BoardFixTopic( private val groupId: Int, private val topicId: Int -) : VKRequest("board.fixTopic") { +) : ApiRequestBase(methodName = "board.fixTopic") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetComments.kt index 31e69cf92a..19211c0fe2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.board.dto.BoardGetCommentsResponseDto import com.vk.sdk.api.board.dto.BoardGetCommentsSort @@ -40,14 +40,14 @@ import org.json.JSONObject * Returns a list of comments on a topic on a community's discussion board. * @param groupId ID of the community that owns the discussion board. minimum 0 * @param topicId Topic ID. minimum 0 - * @param needLikes '1' � to return the 'likes' field, '0' � not to return the 'likes' field + * @param needLikes '1' - to return the 'likes' field, '0' - not to return the 'likes' field * (default) * @param startCommentId minimum 0 * @param offset Offset needed to return a specific subset of comments. * @param count Number of comments to return. default 20 minimum 0 maximum 100 - * @param extended '1' � to return information about users who posted comments, '0' � to return no + * @param extended '1' - to return information about users who posted comments, '0' - to return no * additional fields (default) - * @param sort Sort order: 'asc' � by creation date in chronological order, 'desc' � by creation + * @param sort Sort order: 'asc' - by creation date in chronological order, 'desc' - by creation * date in reverse chronological order, */ class BoardGetComments( @@ -59,7 +59,7 @@ class BoardGetComments( private val count: Int? = null, private val extended: Boolean? = null, private val sort: BoardGetCommentsSort? = null -) : VKRequest("board.getComments") { +) : ApiRequestBase(methodName = "board.getComments") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetCommentsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetCommentsExtended.kt index 9efacdb8c5..2efc2ae564 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetCommentsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetCommentsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.board.dto.BoardGetCommentsExtendedResponseDto import com.vk.sdk.api.board.dto.BoardGetCommentsSort @@ -40,14 +40,14 @@ import org.json.JSONObject * Returns a list of comments on a topic on a community's discussion board. * @param groupId ID of the community that owns the discussion board. minimum 0 * @param topicId Topic ID. minimum 0 - * @param needLikes '1' � to return the 'likes' field, '0' � not to return the 'likes' field + * @param needLikes '1' - to return the 'likes' field, '0' - not to return the 'likes' field * (default) * @param startCommentId minimum 0 * @param offset Offset needed to return a specific subset of comments. * @param count Number of comments to return. default 20 minimum 0 maximum 100 - * @param extended '1' � to return information about users who posted comments, '0' � to return no + * @param extended '1' - to return information about users who posted comments, '0' - to return no * additional fields (default) - * @param sort Sort order: 'asc' � by creation date in chronological order, 'desc' � by creation + * @param sort Sort order: 'asc' - by creation date in chronological order, 'desc' - by creation * date in reverse chronological order, */ class BoardGetCommentsExtended( @@ -59,7 +59,7 @@ class BoardGetCommentsExtended( private val count: Int? = null, private val extended: Boolean? = null, private val sort: BoardGetCommentsSort? = null -) : VKRequest("board.getComments") { +) : ApiRequestBase(methodName = "board.getComments") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetTopics.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetTopics.kt index 946d185d02..095a9eb215 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetTopics.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetTopics.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.board.dto.BoardGetTopicsOrder import com.vk.sdk.api.board.dto.BoardGetTopicsPreview @@ -43,16 +43,16 @@ import org.json.JSONObject * @param groupId ID of the community that owns the discussion board. minimum 0 * @param topicIds IDs of topics to be returned (100 maximum). By default, all topics are returned. * If this parameter is set, the 'order', 'offset', and 'count' parameters are ignored. - * @param order Sort order: '1' � by date updated in reverse chronological order. '2' � by date - * created in reverse chronological order. '-1' � by date updated in chronological order. '-2' � by + * @param order Sort order: '1' - by date updated in reverse chronological order. '2' - by date + * created in reverse chronological order. '-1' - by date updated in chronological order. '-2' - by * date created in chronological order. If no sort order is specified, topics are returned in the order * specified by the group administrator. Pinned topics are returned first, regardless of the sorting. * @param offset Offset needed to return a specific subset of topics. minimum 0 * @param count Number of topics to return. default 40 minimum 0 maximum 100 - * @param extended '1' � to return information about users who created topics or who posted there - * last, '0' � to return no additional fields (default) - * @param preview '1' � to return the first comment in each topic,, '2' � to return the last comment - * in each topic,, '0' � to return no comments. By default: '0'. + * @param extended '1' - to return information about users who created topics or who posted there + * last, '0' - to return no additional fields (default) + * @param preview '1' - to return the first comment in each topic,, '2' - to return the last comment + * in each topic,, '0' - to return no comments. By default: '0'. * @param previewLength Number of characters after which to truncate the previewed comment. To * preview the full comment, specify '0'. default 90 minimum 0 */ @@ -65,7 +65,7 @@ class BoardGetTopics( private val extended: Boolean? = null, private val preview: BoardGetTopicsPreview? = null, private val previewLength: Int? = null -) : VKRequest("board.getTopics") { +) : ApiRequestBase(methodName = "board.getTopics") { init { addParam("group_id", groupId) topicIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetTopicsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetTopicsExtended.kt index 810ac01379..6f0a259065 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetTopicsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardGetTopicsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.board.dto.BoardGetTopicsExtendedResponseDto import com.vk.sdk.api.board.dto.BoardGetTopicsOrder @@ -43,16 +43,16 @@ import org.json.JSONObject * @param groupId ID of the community that owns the discussion board. minimum 0 * @param topicIds IDs of topics to be returned (100 maximum). By default, all topics are returned. * If this parameter is set, the 'order', 'offset', and 'count' parameters are ignored. - * @param order Sort order: '1' � by date updated in reverse chronological order. '2' � by date - * created in reverse chronological order. '-1' � by date updated in chronological order. '-2' � by + * @param order Sort order: '1' - by date updated in reverse chronological order. '2' - by date + * created in reverse chronological order. '-1' - by date updated in chronological order. '-2' - by * date created in chronological order. If no sort order is specified, topics are returned in the order * specified by the group administrator. Pinned topics are returned first, regardless of the sorting. * @param offset Offset needed to return a specific subset of topics. minimum 0 * @param count Number of topics to return. default 40 minimum 0 maximum 100 - * @param extended '1' � to return information about users who created topics or who posted there - * last, '0' � to return no additional fields (default) - * @param preview '1' � to return the first comment in each topic,, '2' � to return the last comment - * in each topic,, '0' � to return no comments. By default: '0'. + * @param extended '1' - to return information about users who created topics or who posted there + * last, '0' - to return no additional fields (default) + * @param preview '1' - to return the first comment in each topic,, '2' - to return the last comment + * in each topic,, '0' - to return no comments. By default: '0'. * @param previewLength Number of characters after which to truncate the previewed comment. To * preview the full comment, specify '0'. default 90 minimum 0 */ @@ -65,7 +65,7 @@ class BoardGetTopicsExtended( private val extended: Boolean? = null, private val preview: BoardGetTopicsPreview? = null, private val previewLength: Int? = null -) : VKRequest("board.getTopics") { +) : ApiRequestBase(methodName = "board.getTopics") { init { addParam("group_id", groupId) topicIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardOpenTopic.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardOpenTopic.kt index 503217cd98..4250fe9d5e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardOpenTopic.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardOpenTopic.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class BoardOpenTopic( private val groupId: Int, private val topicId: Int -) : VKRequest("board.openTopic") { +) : ApiRequestBase(methodName = "board.openTopic") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardRestoreComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardRestoreComment.kt index 2063b53cb6..c037b4d6dc 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardRestoreComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardRestoreComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class BoardRestoreComment( private val groupId: Int, private val topicId: Int, private val commentId: Int -) : VKRequest("board.restoreComment") { +) : ApiRequestBase(methodName = "board.restoreComment") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardUnfixTopic.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardUnfixTopic.kt index 00ee9c6d1d..af769046c2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardUnfixTopic.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/board/methods/BoardUnfixTopic.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.board.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class BoardUnfixTopic( private val groupId: Int, private val topicId: Int -) : VKRequest("board.unfixTopic") { +) : ApiRequestBase(methodName = "board.unfixTopic") { init { addParam("group_id", groupId) addParam("topic_id", topicId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetChairs.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetChairs.kt index 5884f65770..14560f48b6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetChairs.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetChairs.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.dto.DatabaseGetChairsResponseDto import com.vk.sdk.api.database.responses.DatabaseGetChairsResponse @@ -44,7 +44,7 @@ class DatabaseGetChairs( private val facultyId: Int, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("database.getChairs") { +) : ApiRequestBase(methodName = "database.getChairs") { init { addParam("faculty_id", facultyId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCities.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCities.kt index c302b336ed..7e715f41c2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCities.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCities.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.dto.DatabaseGetCitiesResponseDto import com.vk.sdk.api.database.responses.DatabaseGetCitiesResponse @@ -41,7 +41,7 @@ import org.json.JSONObject * @param countryId Country ID. minimum 0 * @param regionId Region ID. minimum 0 * @param q Search query. - * @param needAll '1' � to return all cities in the country, '0' � to return major cities in the + * @param needAll '1' - to return all cities in the country, '0' - to return major cities in the * country (default), * @param offset Offset needed to return a specific subset of cities. minimum 0 * @param count Number of cities to return. default 100 minimum 0 maximum 1000 @@ -53,7 +53,7 @@ class DatabaseGetCities( private val needAll: Boolean? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("database.getCities") { +) : ApiRequestBase(methodName = "database.getCities") { init { addParam("country_id", countryId) regionId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCitiesById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCitiesById.kt index 67e0a53ef5..833bc15197 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCitiesById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCitiesById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseObject import com.vk.sdk.api.database.responses.DatabaseGetCitiesByIdResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class DatabaseGetCitiesById( private val cityIds: List? = null -) : VKRequest>("database.getCitiesById") { +) : ApiRequestBase>(methodName = "database.getCitiesById") { init { cityIds?.let { value -> addParam("city_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCountries.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCountries.kt index 0fc615fb86..28c735e9c6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCountries.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCountries.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.dto.DatabaseGetCountriesResponseDto import com.vk.sdk.api.database.responses.DatabaseGetCountriesResponse @@ -38,7 +38,7 @@ import org.json.JSONObject /** * Returns a list of countries. - * @param needAll '1' � to return a full list of all countries, '0' � to return a list of countries + * @param needAll '1' - to return a full list of all countries, '0' - to return a list of countries * near the current user's country (default). * @param code Country codes in [vk.com/dev/country_codes|ISO 3166-1 alpha-2] standard. * @param offset Offset needed to return a specific subset of countries. minimum 0 @@ -49,7 +49,7 @@ class DatabaseGetCountries( private val code: String? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("database.getCountries") { +) : ApiRequestBase(methodName = "database.getCountries") { init { needAll?.let { value -> addParam("need_all", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCountriesById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCountriesById.kt index 390c3f90b7..34252d30c8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCountriesById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetCountriesById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseCountry import com.vk.sdk.api.database.responses.DatabaseGetCountriesByIdResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class DatabaseGetCountriesById( private val countryIds: List? = null -) : VKRequest>("database.getCountriesById") { +) : ApiRequestBase>(methodName = "database.getCountriesById") { init { countryIds?.let { value -> addParam("country_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetFaculties.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetFaculties.kt index 9295a80306..1afa849a36 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetFaculties.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetFaculties.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.dto.DatabaseGetFacultiesResponseDto import com.vk.sdk.api.database.responses.DatabaseGetFacultiesResponse @@ -44,7 +44,7 @@ class DatabaseGetFaculties( private val universityId: Int, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("database.getFaculties") { +) : ApiRequestBase(methodName = "database.getFaculties") { init { addParam("university_id", universityId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetMetroStations.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetMetroStations.kt index bcaafd3880..8d47bc44b7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetMetroStations.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetMetroStations.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.dto.DatabaseGetMetroStationsResponseDto import com.vk.sdk.api.database.responses.DatabaseGetMetroStationsResponse @@ -47,7 +47,7 @@ class DatabaseGetMetroStations( private val offset: Int? = null, private val count: Int? = null, private val extended: Boolean? = null -) : VKRequest("database.getMetroStations") { +) : ApiRequestBase(methodName = "database.getMetroStations") { init { addParam("city_id", cityId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetMetroStationsById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetMetroStationsById.kt index fd77e97494..4a4c83ecc9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetMetroStationsById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetMetroStationsById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.dto.DatabaseStation import com.vk.sdk.api.database.responses.DatabaseGetMetroStationsByIdResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class DatabaseGetMetroStationsById( private val stationIds: List? = null -) : VKRequest>("database.getMetroStationsById") { +) : ApiRequestBase>(methodName = "database.getMetroStationsById") { init { stationIds?.let { value -> addParam("station_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetRegions.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetRegions.kt index 7c178e711f..46dac96667 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetRegions.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetRegions.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.dto.DatabaseGetRegionsResponseDto import com.vk.sdk.api.database.responses.DatabaseGetRegionsResponse @@ -48,7 +48,7 @@ class DatabaseGetRegions( private val q: String? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("database.getRegions") { +) : ApiRequestBase(methodName = "database.getRegions") { init { addParam("country_id", countryId) q?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetSchoolClasses.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetSchoolClasses.kt index c8f73cf5fe..e408839484 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetSchoolClasses.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetSchoolClasses.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.responses.DatabaseGetSchoolClassesResponse import kotlin.Int @@ -41,7 +41,7 @@ import org.json.JSONObject */ class DatabaseGetSchoolClasses( private val countryId: Int? = null -) : VKRequest>>("database.getSchoolClasses") { +) : ApiRequestBase>>(methodName = "database.getSchoolClasses") { init { countryId?.let { value -> addParam("country_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetSchools.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetSchools.kt index b052739326..61ba4ebaab 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetSchools.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetSchools.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.dto.DatabaseGetSchoolsResponseDto import com.vk.sdk.api.database.responses.DatabaseGetSchoolsResponse @@ -47,7 +47,7 @@ class DatabaseGetSchools( private val q: String? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("database.getSchools") { +) : ApiRequestBase(methodName = "database.getSchools") { init { addParam("city_id", cityId) q?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetUniversities.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetUniversities.kt index 119c13b4e2..de48d73c29 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetUniversities.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/database/methods/DatabaseGetUniversities.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.database.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.database.dto.DatabaseGetUniversitiesResponseDto import com.vk.sdk.api.database.responses.DatabaseGetUniversitiesResponse @@ -49,7 +49,7 @@ class DatabaseGetUniversities( private val cityId: Int? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("database.getUniversities") { +) : ApiRequestBase(methodName = "database.getUniversities") { init { q?.let { value -> addParam("q", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsAdd.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsAdd.kt index 530f317175..ee55a76fbf 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsAdd.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsAdd.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.docs.dto.DocsAddResponseDto import com.vk.sdk.api.docs.responses.DocsAddResponse @@ -47,7 +47,7 @@ class DocsAdd( private val ownerId: Int, private val docId: Int, private val accessKey: String? = null -) : VKRequest("docs.add") { +) : ApiRequestBase(methodName = "docs.add") { init { addParam("owner_id", ownerId) addParam("doc_id", docId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsDelete.kt index 94e77337a2..873abb39a9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class DocsDelete( private val ownerId: Int, private val docId: Int -) : VKRequest("docs.delete") { +) : ApiRequestBase(methodName = "docs.delete") { init { addParam("owner_id", ownerId) addParam("doc_id", docId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsEdit.kt index 8c5aee14f5..4a0b78a8b7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -48,7 +48,7 @@ class DocsEdit( private val docId: Int, private val title: String? = null, private val tags: List? = null -) : VKRequest("docs.edit") { +) : ApiRequestBase(methodName = "docs.edit") { init { addParam("owner_id", ownerId) addParam("doc_id", docId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGet.kt index e4e0ffd8b6..300b419df8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.docs.dto.DocsGetResponseDto import com.vk.sdk.api.docs.dto.DocsGetType @@ -51,7 +51,7 @@ class DocsGet( private val type: DocsGetType? = null, private val ownerId: Int? = null, private val returnTags: Boolean? = null -) : VKRequest("docs.get") { +) : ApiRequestBase(methodName = "docs.get") { init { count?.let { value -> addParam("count", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetById.kt index 06c7230ff0..ceedf8ba16 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.docs.dto.DocsDoc import com.vk.sdk.api.docs.responses.DocsGetByIdResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class DocsGetById( private val docs: List, private val returnTags: Boolean? = null -) : VKRequest>("docs.getById") { +) : ApiRequestBase>(methodName = "docs.getById") { init { addParam("docs", docs) returnTags?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetMessagesUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetMessagesUploadServer.kt index f4229edd06..67bbc61562 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetMessagesUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetMessagesUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUploadServer import com.vk.sdk.api.base.responses.BaseGetUploadServerResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class DocsGetMessagesUploadServer( private val type: DocsGetMessagesUploadServerType? = null, private val peerId: Int? = null -) : VKRequest("docs.getMessagesUploadServer") { +) : ApiRequestBase(methodName = "docs.getMessagesUploadServer") { init { type?.let { value -> addParam("type", value.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetTypes.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetTypes.kt index 0f7899f18b..b31b9ec9e8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetTypes.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetTypes.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.docs.dto.DocsGetTypesResponseDto import com.vk.sdk.api.docs.responses.DocsGetTypesResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class DocsGetTypes( private val ownerId: Int -) : VKRequest("docs.getTypes") { +) : ApiRequestBase(methodName = "docs.getTypes") { init { addParam("owner_id", ownerId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetUploadServer.kt index 64754ae3ab..00609d5456 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUploadServer import kotlin.Int @@ -39,7 +39,7 @@ import org.json.JSONObject */ class DocsGetUploadServer( private val groupId: Int? = null -) : VKRequest("docs.getUploadServer") { +) : ApiRequestBase(methodName = "docs.getUploadServer") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetWallUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetWallUploadServer.kt index 624ade0bb4..86cad09df8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetWallUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsGetWallUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUploadServer import com.vk.sdk.api.base.responses.BaseGetUploadServerResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class DocsGetWallUploadServer( private val groupId: Int? = null -) : VKRequest("docs.getWallUploadServer") { +) : ApiRequestBase(methodName = "docs.getWallUploadServer") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsSave.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsSave.kt index f375c3b0f1..cd07edf670 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsSave.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsSave.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.docs.dto.DocsSaveResponseDto import com.vk.sdk.api.docs.responses.DocsSaveResponse @@ -48,7 +48,7 @@ class DocsSave( private val title: String? = null, private val tags: String? = null, private val returnTags: Boolean? = null -) : VKRequest("docs.save") { +) : ApiRequestBase(methodName = "docs.save") { init { addParam("file", file) title?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsSearch.kt index c813e17e8d..8da1a03ab3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/docs/methods/DocsSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.docs.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.docs.dto.DocsSearchResponseDto import com.vk.sdk.api.docs.responses.DocsSearchResponse @@ -50,7 +50,7 @@ class DocsSearch( private val count: Int? = null, private val offset: Int? = null, private val returnTags: Boolean? = null -) : VKRequest("docs.search") { +) : ApiRequestBase(methodName = "docs.search") { init { addParam("q", q) searchOwn?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/downloadedGames/methods/DownloadedGamesGetPaidStatus.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/downloadedGames/methods/DownloadedGamesGetPaidStatus.kt index 5488495d11..5e7a3b74b9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/downloadedGames/methods/DownloadedGamesGetPaidStatus.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/downloadedGames/methods/DownloadedGamesGetPaidStatus.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.downloadedGames.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.downloadedGames.dto.DownloadedGamesPaidStatusResponseDto import com.vk.sdk.api.downloadedGames.responses.DownloadedGamesPaidStatusResponse @@ -39,7 +39,8 @@ import org.json.JSONObject */ class DownloadedGamesGetPaidStatus( private val userId: Int? = null -) : VKRequest("downloadedGames.getPaidStatus") { +) : ApiRequestBase(methodName = + "downloadedGames.getPaidStatus") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddArticle.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddArticle.kt index 930c1497f0..602dc63026 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddArticle.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddArticle.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class FaveAddArticle( private val url: String -) : VKRequest("fave.addArticle") { +) : ApiRequestBase(methodName = "fave.addArticle") { init { addParam("url", url) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddLink.kt index 65cc36d171..b0317b26a1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class FaveAddLink( private val link: String -) : VKRequest("fave.addLink") { +) : ApiRequestBase(methodName = "fave.addLink") { init { addParam("link", link) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddPage.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddPage.kt index 0f1d21ecc5..8cdf86e29d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddPage.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddPage.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class FaveAddPage( private val userId: Int? = null, private val groupId: Int? = null -) : VKRequest("fave.addPage") { +) : ApiRequestBase(methodName = "fave.addPage") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddPost.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddPost.kt index 2be10c534b..421106134b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddPost.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddPost.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class FaveAddPost( private val ownerId: Int, private val id: Int, private val accessKey: String? = null -) : VKRequest("fave.addPost") { +) : ApiRequestBase(methodName = "fave.addPost") { init { addParam("owner_id", ownerId) addParam("id", id) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddProduct.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddProduct.kt index ea089c898a..f322e47ab6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddProduct.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddProduct.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class FaveAddProduct( private val ownerId: Int, private val id: Int, private val accessKey: String? = null -) : VKRequest("fave.addProduct") { +) : ApiRequestBase(methodName = "fave.addProduct") { init { addParam("owner_id", ownerId) addParam("id", id) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddTag.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddTag.kt index eadc256fbc..dc7be1277e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddTag.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddTag.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.fave.dto.FaveAddTagPosition import com.vk.sdk.api.fave.dto.FaveTag @@ -42,7 +42,7 @@ import org.json.JSONObject class FaveAddTag( private val name: String? = null, private val position: FaveAddTagPosition? = null -) : VKRequest("fave.addTag") { +) : ApiRequestBase(methodName = "fave.addTag") { init { name?.let { value -> addParam("name", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddVideo.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddVideo.kt index 801851c5ee..5cd397c00a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddVideo.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveAddVideo.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class FaveAddVideo( private val ownerId: Int, private val id: Int, private val accessKey: String? = null -) : VKRequest("fave.addVideo") { +) : ApiRequestBase(methodName = "fave.addVideo") { init { addParam("owner_id", ownerId) addParam("id", id) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveEditTag.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveEditTag.kt index 4fe925f702..b9884947f6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveEditTag.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveEditTag.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class FaveEditTag( private val id: Int, private val name: String -) : VKRequest("fave.editTag") { +) : ApiRequestBase(methodName = "fave.editTag") { init { addParam("id", id) addParam("name", name) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGet.kt index 39dba844b9..d39e772d15 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.fave.dto.FaveGetItemType import com.vk.sdk.api.fave.dto.FaveGetResponseDto @@ -38,7 +38,7 @@ import kotlin.String import org.json.JSONObject /** - * @param extended '1' � to return additional 'wall', 'profiles', and 'groups' fields. By default: + * @param extended '1' - to return additional 'wall', 'profiles', and 'groups' fields. By default: * '0'. default false * @param itemType * @param tagId Tag ID. @@ -55,7 +55,7 @@ class FaveGet( private val count: Int? = null, private val fields: String? = null, private val isFromSnackbar: Boolean? = null -) : VKRequest("fave.get") { +) : ApiRequestBase(methodName = "fave.get") { init { extended?.let { value -> addParam("extended", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetExtended.kt index 5b6fb04580..cfb607b517 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.fave.dto.FaveGetExtendedResponseDto import com.vk.sdk.api.fave.dto.FaveGetItemType @@ -38,7 +38,7 @@ import kotlin.String import org.json.JSONObject /** - * @param extended '1' � to return additional 'wall', 'profiles', and 'groups' fields. By default: + * @param extended '1' - to return additional 'wall', 'profiles', and 'groups' fields. By default: * '0'. default false * @param itemType * @param tagId Tag ID. @@ -55,7 +55,7 @@ class FaveGetExtended( private val count: Int? = null, private val fields: String? = null, private val isFromSnackbar: Boolean? = null -) : VKRequest("fave.get") { +) : ApiRequestBase(methodName = "fave.get") { init { extended?.let { value -> addParam("extended", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetPages.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetPages.kt index f2daca2c8b..1f70f4ec1b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetPages.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetPages.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.fave.dto.FaveGetPagesResponseDto @@ -50,7 +50,7 @@ class FaveGetPages( private val type: FaveGetPagesType? = null, private val fields: List? = null, private val tagId: Int? = null -) : VKRequest("fave.getPages") { +) : ApiRequestBase(methodName = "fave.getPages") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetTags.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetTags.kt index 571dfdbb4f..ea7343115d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetTags.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveGetTags.kt @@ -27,13 +27,13 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.fave.dto.FaveGetTagsResponseDto import com.vk.sdk.api.fave.responses.FaveGetTagsResponse import org.json.JSONObject -class FaveGetTags : VKRequest("fave.getTags") { +class FaveGetTags : ApiRequestBase(methodName = "fave.getTags") { override fun parse(r: JSONObject): FaveGetTagsResponseDto = GsonHolder.gson.fromJson(r.toString(), FaveGetTagsResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveMarkSeen.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveMarkSeen.kt index 13ae0fe539..ec1b69f8c9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveMarkSeen.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveMarkSeen.kt @@ -27,13 +27,13 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse import org.json.JSONObject -class FaveMarkSeen : VKRequest("fave.markSeen") { +class FaveMarkSeen : ApiRequestBase(methodName = "fave.markSeen") { override fun parse(r: JSONObject): BaseBoolInt = GsonHolder.gson.fromJson(r.toString(), BaseBoolResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveArticle.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveArticle.kt index 8cebb4b31a..3dddf61296 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveArticle.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveArticle.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class FaveRemoveArticle( private val ownerId: Int, private val articleId: Int -) : VKRequest("fave.removeArticle") { +) : ApiRequestBase(methodName = "fave.removeArticle") { init { addParam("owner_id", ownerId) addParam("article_id", articleId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveLink.kt index 1a36c9f269..25b2ee915a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class FaveRemoveLink( private val linkId: String? = null, private val link: String? = null -) : VKRequest("fave.removeLink") { +) : ApiRequestBase(methodName = "fave.removeLink") { init { linkId?.let { value -> addParam("link_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemovePage.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemovePage.kt index f90ad7b433..aff07d1212 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemovePage.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemovePage.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class FaveRemovePage( private val userId: Int? = null, private val groupId: Int? = null -) : VKRequest("fave.removePage") { +) : ApiRequestBase(methodName = "fave.removePage") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemovePost.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemovePost.kt index f0f4040e5a..6096419c09 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemovePost.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemovePost.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class FaveRemovePost( private val ownerId: Int, private val id: Int -) : VKRequest("fave.removePost") { +) : ApiRequestBase(methodName = "fave.removePost") { init { addParam("owner_id", ownerId) addParam("id", id) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveProduct.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveProduct.kt index 85a6a3bead..6335895b2d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveProduct.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveProduct.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class FaveRemoveProduct( private val ownerId: Int, private val id: Int -) : VKRequest("fave.removeProduct") { +) : ApiRequestBase(methodName = "fave.removeProduct") { init { addParam("owner_id", ownerId) addParam("id", id) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveTag.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveTag.kt index d33f0493d0..b91caba0c9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveTag.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveTag.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class FaveRemoveTag( private val id: Int -) : VKRequest("fave.removeTag") { +) : ApiRequestBase(methodName = "fave.removeTag") { init { addParam("id", id) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveVideo.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveVideo.kt index 00876c4330..3b3ce87679 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveVideo.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveRemoveVideo.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class FaveRemoveVideo( private val ownerId: Int, private val id: Int -) : VKRequest("fave.removeVideo") { +) : ApiRequestBase(methodName = "fave.removeVideo") { init { addParam("owner_id", ownerId) addParam("id", id) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveReorderTags.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveReorderTags.kt index df52af069a..75f98881db 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveReorderTags.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveReorderTags.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class FaveReorderTags( private val ids: List -) : VKRequest("fave.reorderTags") { +) : ApiRequestBase(methodName = "fave.reorderTags") { init { addParam("ids", ids) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveSetPageTags.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveSetPageTags.kt index 309205af1a..bb2e17d284 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveSetPageTags.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveSetPageTags.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class FaveSetPageTags( private val userId: Int? = null, private val groupId: Int? = null, private val tagIds: List? = null -) : VKRequest("fave.setPageTags") { +) : ApiRequestBase(methodName = "fave.setPageTags") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveSetTags.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveSetTags.kt index c1a091b9b1..d1a9dbad7f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveSetTags.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveSetTags.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -52,7 +52,7 @@ class FaveSetTags( private val tagIds: List? = null, private val linkId: String? = null, private val linkUrl: String? = null -) : VKRequest("fave.setTags") { +) : ApiRequestBase(methodName = "fave.setTags") { init { itemType?.let { value -> addParam("item_type", value.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveTrackPageInteraction.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveTrackPageInteraction.kt index 49a8341a63..f4ed4aa383 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveTrackPageInteraction.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/fave/methods/FaveTrackPageInteraction.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.fave.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class FaveTrackPageInteraction( private val userId: Int? = null, private val groupId: Int? = null -) : VKRequest("fave.trackPageInteraction") { +) : ApiRequestBase(methodName = "fave.trackPageInteraction") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAdd.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAdd.kt index 2bab6bb04f..79402fc5b6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAdd.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAdd.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsAddResponseDto import com.vk.sdk.api.friends.responses.FriendsAddResponse @@ -47,7 +47,7 @@ class FriendsAdd( private val userId: Int? = null, private val text: String? = null, private val follow: Boolean? = null -) : VKRequest("friends.add") { +) : ApiRequestBase(methodName = "friends.add") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAddList.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAddList.kt index 1461bf8f85..3314ecf12a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAddList.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAddList.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsAddListResponseDto import com.vk.sdk.api.friends.responses.FriendsAddListResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class FriendsAddList( private val name: String, private val userIds: List? = null -) : VKRequest("friends.addList") { +) : ApiRequestBase(methodName = "friends.addList") { init { addParam("name", name) userIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAreFriends.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAreFriends.kt index 31bdb72ef2..2352999ff3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAreFriends.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAreFriends.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsFriendStatus import com.vk.sdk.api.friends.responses.FriendsAreFriendsResponse @@ -39,7 +39,7 @@ import org.json.JSONObject /** * Checks the current user's friendship status with other specified users. * @param userIds IDs of the users whose friendship status to check. - * @param needSign '1' � to return 'sign' field. 'sign' is + * @param needSign '1' - to return 'sign' field. 'sign' is * md5("{id}_{user_id}_{friends_status}_{application_secret}"), where id is current user ID. This field * allows to check that data has not been modified by the client. By default: '0'. * @param extended Return friend request read_state field @@ -48,7 +48,7 @@ class FriendsAreFriends( private val userIds: List, private val needSign: Boolean? = null, private val extended: Boolean? = null -) : VKRequest>("friends.areFriends") { +) : ApiRequestBase>(methodName = "friends.areFriends") { init { addParam("user_ids", userIds) needSign?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAreFriendsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAreFriendsExtended.kt index bb7483840a..2e7fdaa831 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAreFriendsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsAreFriendsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsFriendExtendedStatus import com.vk.sdk.api.friends.responses.FriendsAreFriendsExtendedResponse @@ -39,7 +39,7 @@ import org.json.JSONObject /** * Checks the current user's friendship status with other specified users. * @param userIds IDs of the users whose friendship status to check. - * @param needSign '1' � to return 'sign' field. 'sign' is + * @param needSign '1' - to return 'sign' field. 'sign' is * md5("{id}_{user_id}_{friends_status}_{application_secret}"), where id is current user ID. This field * allows to check that data has not been modified by the client. By default: '0'. * @param extended Return friend request read_state field @@ -48,7 +48,7 @@ class FriendsAreFriendsExtended( private val userIds: List, private val needSign: Boolean? = null, private val extended: Boolean? = null -) : VKRequest>("friends.areFriends") { +) : ApiRequestBase>(methodName = "friends.areFriends") { init { addParam("user_ids", userIds) needSign?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDelete.kt index 488ee78d77..2646cd8f77 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsDeleteResponseDto import com.vk.sdk.api.friends.responses.FriendsDeleteResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class FriendsDelete( private val userId: Int? = null -) : VKRequest("friends.delete") { +) : ApiRequestBase(methodName = "friends.delete") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDeleteAllRequests.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDeleteAllRequests.kt index 077f91cbd7..ea291e2e90 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDeleteAllRequests.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDeleteAllRequests.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -36,7 +36,8 @@ import org.json.JSONObject /** * Marks all incoming friend requests as viewed. */ -class FriendsDeleteAllRequests : VKRequest("friends.deleteAllRequests") { +class FriendsDeleteAllRequests : ApiRequestBase(methodName = + "friends.deleteAllRequests") { override fun parse(r: JSONObject): BaseOkResponseDto = GsonHolder.gson.fromJson(r.toString(), BaseOkResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDeleteList.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDeleteList.kt index 79e1df1eb1..e8f995a843 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDeleteList.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsDeleteList.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class FriendsDeleteList( private val listId: Int -) : VKRequest("friends.deleteList") { +) : ApiRequestBase(methodName = "friends.deleteList") { init { addParam("list_id", listId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsEdit.kt index ff7ecf1c44..66f931e379 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class FriendsEdit( private val userId: Int, private val listIds: List? = null -) : VKRequest("friends.edit") { +) : ApiRequestBase(methodName = "friends.edit") { init { addParam("user_id", userId) listIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsEditList.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsEditList.kt index bf96f08f38..1a442cebab 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsEditList.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsEditList.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -52,7 +52,7 @@ class FriendsEditList( private val userIds: List? = null, private val addUserIds: List? = null, private val deleteUserIds: List? = null -) : VKRequest("friends.editList") { +) : ApiRequestBase(methodName = "friends.editList") { init { addParam("list_id", listId) name?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGet.kt index 54805c9248..d0decdce2d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsGetNameCase import com.vk.sdk.api.friends.dto.FriendsGetOrder @@ -42,8 +42,8 @@ import org.json.JSONObject /** * Returns a list of user IDs or detailed information about a user's friends. * @param userId User ID. By default, the current user ID. - * @param order Sort order: , 'name' � by name (enabled only if the 'fields' parameter is used), - * 'hints' � by rating, similar to how friends are sorted in My friends section, , This parameter is + * @param order Sort order: , 'name' - by name (enabled only if the 'fields' parameter is used), + * 'hints' - by rating, similar to how friends are sorted in My friends section, , This parameter is * available only for [vk.com/dev/standalone|desktop applications]. * @param listId ID of the friend list returned by the * [vk.com/dev/friends.getLists|friends.getLists] method to be used as the source. This parameter is @@ -54,8 +54,8 @@ import org.json.JSONObject * @param fields Profile fields to return. Sample values: 'uid', 'first_name', 'last_name', * 'nickname', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', * 'photo_big', 'domain', 'has_mobile', 'rate', 'contacts', 'education'. - * @param nameCase Case for declension of user name and surname: , 'nom' � nominative (default) , - * 'gen' � genitive , 'dat' � dative , 'acc' � accusative , 'ins' � instrumental , 'abl' � + * @param nameCase Case for declension of user name and surname: , 'nom' - nominative (default) , + * 'gen' - genitive , 'dat' - dative , 'acc' - accusative , 'ins' - instrumental , 'abl' - * prepositional * @param ref maxLength 255 */ @@ -68,7 +68,7 @@ class FriendsGet( private val fields: List? = null, private val nameCase: FriendsGetNameCase? = null, private val ref: String? = null -) : VKRequest("friends.get") { +) : ApiRequestBase(methodName = "friends.get") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetAppUsers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetAppUsers.kt index 6b944a8104..baadd4071f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetAppUsers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetAppUsers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.responses.FriendsGetAppUsersResponse import kotlin.Int @@ -37,7 +37,7 @@ import org.json.JSONObject /** * Returns a list of IDs of the current user's friends who installed the application. */ -class FriendsGetAppUsers : VKRequest>("friends.getAppUsers") { +class FriendsGetAppUsers : ApiRequestBase>(methodName = "friends.getAppUsers") { override fun parse(r: JSONObject): List = GsonHolder.gson.fromJson(r.toString(), FriendsGetAppUsersResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetByPhones.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetByPhones.kt index 8581b8bf4b..f006798d58 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetByPhones.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetByPhones.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsUserXtrPhone import com.vk.sdk.api.friends.responses.FriendsGetByPhonesResponse @@ -48,7 +48,7 @@ import org.json.JSONObject class FriendsGetByPhones( private val phones: List? = null, private val fields: List? = null -) : VKRequest>("friends.getByPhones") { +) : ApiRequestBase>(methodName = "friends.getByPhones") { init { phones?.let { value -> addParam("phones", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetFields.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetFields.kt index aa7d79fba8..6bf046a6aa 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetFields.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetFields.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsGetFieldsResponseDto import com.vk.sdk.api.friends.dto.FriendsGetNameCase @@ -42,8 +42,8 @@ import org.json.JSONObject /** * Returns a list of user IDs or detailed information about a user's friends. * @param userId User ID. By default, the current user ID. - * @param order Sort order: , 'name' � by name (enabled only if the 'fields' parameter is used), - * 'hints' � by rating, similar to how friends are sorted in My friends section, , This parameter is + * @param order Sort order: , 'name' - by name (enabled only if the 'fields' parameter is used), + * 'hints' - by rating, similar to how friends are sorted in My friends section, , This parameter is * available only for [vk.com/dev/standalone|desktop applications]. * @param listId ID of the friend list returned by the * [vk.com/dev/friends.getLists|friends.getLists] method to be used as the source. This parameter is @@ -54,8 +54,8 @@ import org.json.JSONObject * @param fields Profile fields to return. Sample values: 'uid', 'first_name', 'last_name', * 'nickname', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', * 'photo_big', 'domain', 'has_mobile', 'rate', 'contacts', 'education'. - * @param nameCase Case for declension of user name and surname: , 'nom' � nominative (default) , - * 'gen' � genitive , 'dat' � dative , 'acc' � accusative , 'ins' � instrumental , 'abl' � + * @param nameCase Case for declension of user name and surname: , 'nom' - nominative (default) , + * 'gen' - genitive , 'dat' - dative , 'acc' - accusative , 'ins' - instrumental , 'abl' - * prepositional * @param ref maxLength 255 */ @@ -68,7 +68,7 @@ class FriendsGetFields( private val fields: List? = null, private val nameCase: FriendsGetNameCase? = null, private val ref: String? = null -) : VKRequest("friends.get") { +) : ApiRequestBase(methodName = "friends.get") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetLists.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetLists.kt index a67112485c..875169dd65 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetLists.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetLists.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsGetListsResponseDto import com.vk.sdk.api.friends.responses.FriendsGetListsResponse @@ -38,12 +38,12 @@ import org.json.JSONObject /** * Returns a list of the user's friend lists. * @param userId User ID. minimum 0 - * @param returnSystem '1' � to return system friend lists. By default: '0'. + * @param returnSystem '1' - to return system friend lists. By default: '0'. */ class FriendsGetLists( private val userId: Int? = null, private val returnSystem: Boolean? = null -) : VKRequest("friends.getLists") { +) : ApiRequestBase(methodName = "friends.getLists") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetMutual.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetMutual.kt index 9ee5af9d7c..b434095b17 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetMutual.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetMutual.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.responses.FriendsGetMutualResponse import kotlin.Int @@ -43,7 +43,7 @@ import org.json.JSONObject * specified in 'source_uid'. minimum 0 * @param targetUids IDs of the users whose friends will be checked against the friends of the user * specified in 'source_uid'. - * @param order Sort order: 'random' � random order + * @param order Sort order: 'random' - random order * @param count Number of mutual friends to return. minimum 0 * @param offset Offset needed to return a specific subset of mutual friends. minimum 0 */ @@ -54,7 +54,7 @@ class FriendsGetMutual( private val order: String? = null, private val count: Int? = null, private val offset: Int? = null -) : VKRequest>("friends.getMutual") { +) : ApiRequestBase>(methodName = "friends.getMutual") { init { sourceUid?.let { value -> addParam("source_uid", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetMutualTargetuids.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetMutualTargetuids.kt index 16a8d20e7d..078d5550d3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetMutualTargetuids.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetMutualTargetuids.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsMutualFriend import com.vk.sdk.api.friends.responses.FriendsGetMutualTargetUidsResponse @@ -44,7 +44,7 @@ import org.json.JSONObject * specified in 'source_uid'. minimum 0 * @param targetUids IDs of the users whose friends will be checked against the friends of the user * specified in 'source_uid'. - * @param order Sort order: 'random' � random order + * @param order Sort order: 'random' - random order * @param count Number of mutual friends to return. minimum 0 * @param offset Offset needed to return a specific subset of mutual friends. minimum 0 */ @@ -55,7 +55,7 @@ class FriendsGetMutualTargetuids( private val order: String? = null, private val count: Int? = null, private val offset: Int? = null -) : VKRequest>("friends.getMutual") { +) : ApiRequestBase>(methodName = "friends.getMutual") { init { sourceUid?.let { value -> addParam("source_uid", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetOnline.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetOnline.kt index 697f57d4d3..7791524db3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetOnline.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetOnline.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.responses.FriendsGetOnlineResponse import kotlin.Boolean @@ -41,8 +41,8 @@ import org.json.JSONObject * @param userId User ID. minimum 0 * @param listId Friend list ID. If this parameter is not set, information about all online friends * is returned. minimum 0 - * @param onlineMobile '1' � to return an additional 'online_mobile' field, '0' � (default), - * @param order Sort order: 'random' � random order + * @param onlineMobile '1' - to return an additional 'online_mobile' field, '0' - (default), + * @param order Sort order: 'random' - random order * @param count Number of friends to return. minimum 0 * @param offset Offset needed to return a specific subset of friends. minimum 0 */ @@ -53,7 +53,7 @@ class FriendsGetOnline( private val order: String? = null, private val count: Int? = null, private val offset: Int? = null -) : VKRequest>("friends.getOnline") { +) : ApiRequestBase>(methodName = "friends.getOnline") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetOnlineOnlinemobile.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetOnlineOnlinemobile.kt index 6306a3617f..27ab0b360e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetOnlineOnlinemobile.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetOnlineOnlinemobile.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsGetOnlineOnlineMobileResponseDto import com.vk.sdk.api.friends.responses.FriendsGetOnlineOnlineMobileResponse @@ -41,8 +41,8 @@ import org.json.JSONObject * @param userId User ID. minimum 0 * @param listId Friend list ID. If this parameter is not set, information about all online friends * is returned. minimum 0 - * @param onlineMobile '1' � to return an additional 'online_mobile' field, '0' � (default), - * @param order Sort order: 'random' � random order + * @param onlineMobile '1' - to return an additional 'online_mobile' field, '0' - (default), + * @param order Sort order: 'random' - random order * @param count Number of friends to return. minimum 0 * @param offset Offset needed to return a specific subset of friends. minimum 0 */ @@ -53,7 +53,7 @@ class FriendsGetOnlineOnlinemobile( private val order: String? = null, private val count: Int? = null, private val offset: Int? = null -) : VKRequest("friends.getOnline") { +) : ApiRequestBase(methodName = "friends.getOnline") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRecent.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRecent.kt index a573271f60..ae46edfc6e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRecent.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRecent.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.responses.FriendsGetRecentResponse import kotlin.Int @@ -40,7 +40,7 @@ import org.json.JSONObject */ class FriendsGetRecent( private val count: Int? = null -) : VKRequest>("friends.getRecent") { +) : ApiRequestBase>(methodName = "friends.getRecent") { init { count?.let { value -> addParam("count", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequests.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequests.kt index 9d5bdb3c8a..e42fbe33ca 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequests.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequests.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsGetRequestsResponseDto import com.vk.sdk.api.friends.dto.FriendsGetRequestsSort @@ -44,13 +44,13 @@ import org.json.JSONObject * @param offset Offset needed to return a specific subset of friend requests. minimum 0 * @param count Number of friend requests to return (default 100, maximum 1000). default 100 minimum * 0 maximum 1000 - * @param extended '1' � to return response messages from users who have sent a friend request or, + * @param extended '1' - to return response messages from users who have sent a friend request or, * if 'suggested' is set to '1', to return a list of suggested friends - * @param needMutual '1' � to return a list of mutual friends (up to 20), if any - * @param out '1' � to return outgoing requests, '0' � to return incoming requests (default) - * @param sort Sort order: '1' � by number of mutual friends, '0' � by date minimum 0 + * @param needMutual '1' - to return a list of mutual friends (up to 20), if any + * @param out '1' - to return outgoing requests, '0' - to return incoming requests (default) + * @param sort Sort order: '1' - by number of mutual friends, '0' - by date minimum 0 * @param needViewed default 0 - * @param suggested '1' � to return a list of suggested friends, '0' � to return friend requests + * @param suggested '1' - to return a list of suggested friends, '0' - to return friend requests * (default) * @param ref maxLength 255 * @param fields @@ -66,7 +66,7 @@ class FriendsGetRequests( private val suggested: Boolean? = null, private val ref: String? = null, private val fields: List? = null -) : VKRequest("friends.getRequests") { +) : ApiRequestBase(methodName = "friends.getRequests") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequestsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequestsExtended.kt index 21e62b8409..69ef73d9f1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequestsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequestsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsGetRequestsExtendedResponseDto import com.vk.sdk.api.friends.dto.FriendsGetRequestsSort @@ -44,13 +44,13 @@ import org.json.JSONObject * @param offset Offset needed to return a specific subset of friend requests. minimum 0 * @param count Number of friend requests to return (default 100, maximum 1000). default 100 minimum * 0 maximum 1000 - * @param extended '1' � to return response messages from users who have sent a friend request or, + * @param extended '1' - to return response messages from users who have sent a friend request or, * if 'suggested' is set to '1', to return a list of suggested friends - * @param needMutual '1' � to return a list of mutual friends (up to 20), if any - * @param out '1' � to return outgoing requests, '0' � to return incoming requests (default) - * @param sort Sort order: '1' � by number of mutual friends, '0' � by date minimum 0 + * @param needMutual '1' - to return a list of mutual friends (up to 20), if any + * @param out '1' - to return outgoing requests, '0' - to return incoming requests (default) + * @param sort Sort order: '1' - by number of mutual friends, '0' - by date minimum 0 * @param needViewed default 0 - * @param suggested '1' � to return a list of suggested friends, '0' � to return friend requests + * @param suggested '1' - to return a list of suggested friends, '0' - to return friend requests * (default) * @param ref maxLength 255 * @param fields @@ -66,7 +66,7 @@ class FriendsGetRequestsExtended( private val suggested: Boolean? = null, private val ref: String? = null, private val fields: List? = null -) : VKRequest("friends.getRequests") { +) : ApiRequestBase(methodName = "friends.getRequests") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequestsNeedmutual.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequestsNeedmutual.kt index 9001c851cf..02ef63d8e3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequestsNeedmutual.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetRequestsNeedmutual.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsGetRequestsNeedMutualResponseDto import com.vk.sdk.api.friends.dto.FriendsGetRequestsSort @@ -44,13 +44,13 @@ import org.json.JSONObject * @param offset Offset needed to return a specific subset of friend requests. minimum 0 * @param count Number of friend requests to return (default 100, maximum 1000). default 100 minimum * 0 maximum 1000 - * @param extended '1' � to return response messages from users who have sent a friend request or, + * @param extended '1' - to return response messages from users who have sent a friend request or, * if 'suggested' is set to '1', to return a list of suggested friends - * @param needMutual '1' � to return a list of mutual friends (up to 20), if any - * @param out '1' � to return outgoing requests, '0' � to return incoming requests (default) - * @param sort Sort order: '1' � by number of mutual friends, '0' � by date minimum 0 + * @param needMutual '1' - to return a list of mutual friends (up to 20), if any + * @param out '1' - to return outgoing requests, '0' - to return incoming requests (default) + * @param sort Sort order: '1' - by number of mutual friends, '0' - by date minimum 0 * @param needViewed default 0 - * @param suggested '1' � to return a list of suggested friends, '0' � to return friend requests + * @param suggested '1' - to return a list of suggested friends, '0' - to return friend requests * (default) * @param ref maxLength 255 * @param fields @@ -66,7 +66,7 @@ class FriendsGetRequestsNeedmutual( private val suggested: Boolean? = null, private val ref: String? = null, private val fields: List? = null -) : VKRequest("friends.getRequests") { +) : ApiRequestBase(methodName = "friends.getRequests") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetSuggestions.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetSuggestions.kt index 92d699260a..d897ec0918 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetSuggestions.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsGetSuggestions.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsGetSuggestionsFilter import com.vk.sdk.api.friends.dto.FriendsGetSuggestionsNameCase @@ -40,17 +40,17 @@ import org.json.JSONObject /** * Returns a list of profiles of users whom the current user may know. - * @param filter Types of potential friends to return: 'mutual' � users with many mutual friends , - * 'contacts' � users found with the [vk.com/dev/account.importContacts|account.importContacts] method - * , 'mutual_contacts' � users who imported the same contacts as the current user with the + * @param filter Types of potential friends to return: 'mutual' - users with many mutual friends , + * 'contacts' - users found with the [vk.com/dev/account.importContacts|account.importContacts] method + * , 'mutual_contacts' - users who imported the same contacts as the current user with the * [vk.com/dev/account.importContacts|account.importContacts] method * @param count Number of suggestions to return. default 500 minimum 0 maximum 500 * @param offset Offset needed to return a specific subset of suggestions. minimum 0 * @param fields Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' * (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', * 'rate', 'contacts', 'education', 'online', 'counters'. - * @param nameCase Case for declension of user name and surname: , 'nom' � nominative (default) , - * 'gen' � genitive , 'dat' � dative , 'acc' � accusative , 'ins' � instrumental , 'abl' � + * @param nameCase Case for declension of user name and surname: , 'nom' - nominative (default) , + * 'gen' - genitive , 'dat' - dative , 'acc' - accusative , 'ins' - instrumental , 'abl' - * prepositional */ class FriendsGetSuggestions( @@ -59,7 +59,7 @@ class FriendsGetSuggestions( private val offset: Int? = null, private val fields: List? = null, private val nameCase: FriendsGetSuggestionsNameCase? = null -) : VKRequest("friends.getSuggestions") { +) : ApiRequestBase(methodName = "friends.getSuggestions") { init { filter?.let { value -> addParam("filter", value.map { it.value }) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsSearch.kt index 5a43b40714..58f891f00f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/friends/methods/FriendsSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.friends.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.friends.dto.FriendsSearchNameCase import com.vk.sdk.api.friends.dto.FriendsSearchResponseDto @@ -45,8 +45,8 @@ import org.json.JSONObject * @param fields Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' * (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', * 'rate', 'contacts', 'education', 'online', - * @param nameCase Case for declension of user name and surname: 'nom' � nominative (default), 'gen' - * � genitive , 'dat' � dative, 'acc' � accusative , 'ins' � instrumental , 'abl' � prepositional + * @param nameCase Case for declension of user name and surname: 'nom' - nominative (default), + * 'gen' - genitive , 'dat' - dative, 'acc' - accusative , 'ins' - instrumental , 'abl' - prepositional * default "Nom" * @param offset Offset needed to return a specific subset of friends. minimum 0 * @param count Number of friends to return. default 20 minimum 0 maximum 1000 @@ -58,7 +58,7 @@ class FriendsSearch( private val nameCase: FriendsSearchNameCase? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("friends.search") { +) : ApiRequestBase(methodName = "friends.search") { init { addParam("user_id", userId) q?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/gifts/methods/GiftsGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/gifts/methods/GiftsGet.kt index 26d3970406..15a4f2ae8a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/gifts/methods/GiftsGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/gifts/methods/GiftsGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.gifts.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.gifts.dto.GiftsGetResponseDto import com.vk.sdk.api.gifts.responses.GiftsGetResponse @@ -44,7 +44,7 @@ class GiftsGet( private val userId: Int? = null, private val count: Int? = null, private val offset: Int? = null -) : VKRequest("gifts.get") { +) : ApiRequestBase(methodName = "gifts.get") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/dto/GroupsGroupFull.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/dto/GroupsGroupFull.kt index 3dd8380f54..7afc0b4fb2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/dto/GroupsGroupFull.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/dto/GroupsGroupFull.kt @@ -67,8 +67,8 @@ import kotlin.collections.List * @param canUploadStory Information whether current user can upload story * @param canUploadVideo Information whether current user can upload video * @param hasPhoto Information whether community has photo - * @param cropPhoto ������ � ������, �� ������� �������� ���������� � ����������� ���������� - * ���������� + * @param + * cropPhoto ------ - ------, -- ------- -------- ---------- - ----------- ---------- ---------- * @param status Community status * @param mainAlbumId Community's main photo album ID * @param links no description diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddAddress.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddAddress.kt index f0c4e60c35..a757c2a626 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddAddress.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddAddress.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsAddAddressWorkInfoStatus import com.vk.sdk.api.groups.dto.GroupsAddress @@ -67,7 +67,7 @@ class GroupsAddAddress( private val workInfoStatus: GroupsAddAddressWorkInfoStatus? = null, private val timetable: String? = null, private val isMainAddress: Boolean? = null -) : VKRequest("groups.addAddress") { +) : ApiRequestBase(methodName = "groups.addAddress") { init { addParam("group_id", groupId) addParam("title", title) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddCallbackServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddCallbackServer.kt index f0d0bc81d3..0e831ee3eb 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddCallbackServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddCallbackServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsAddCallbackServerResponseDto import com.vk.sdk.api.groups.responses.GroupsAddCallbackServerResponse @@ -46,7 +46,7 @@ class GroupsAddCallbackServer( private val url: String, private val title: String, private val secretKey: String? = null -) : VKRequest("groups.addCallbackServer") { +) : ApiRequestBase(methodName = "groups.addCallbackServer") { init { addParam("group_id", groupId) addParam("url", url) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddLink.kt index d46378a0d3..dd0ed0f2b0 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsAddLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGroupLink import com.vk.sdk.api.groups.responses.GroupsAddLinkResponse @@ -45,7 +45,7 @@ class GroupsAddLink( private val groupId: Int, private val link: String, private val text: String? = null -) : VKRequest("groups.addLink") { +) : ApiRequestBase(methodName = "groups.addLink") { init { addParam("group_id", groupId) addParam("link", link) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsApproveRequest.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsApproveRequest.kt index 4e6be597ae..117b663ccc 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsApproveRequest.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsApproveRequest.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class GroupsApproveRequest( private val groupId: Int, private val userId: Int -) : VKRequest("groups.approveRequest") { +) : ApiRequestBase(methodName = "groups.approveRequest") { init { addParam("group_id", groupId) addParam("user_id", userId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsBan.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsBan.kt index eef210b29d..7fe87b267a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsBan.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsBan.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -51,7 +51,7 @@ class GroupsBan( private val reason: Int? = null, private val comment: String? = null, private val commentVisible: Boolean? = null -) : VKRequest("groups.ban") { +) : ApiRequestBase(methodName = "groups.ban") { init { addParam("group_id", groupId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsCreate.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsCreate.kt index 260ea6fb06..72b12acc47 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsCreate.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsCreate.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsCreateSubtype import com.vk.sdk.api.groups.dto.GroupsCreateType @@ -41,11 +41,11 @@ import org.json.JSONObject * Creates a new community. * @param title Community title. * @param description Community description (ignored for 'type' = 'public'). - * @param type Community type. Possible values: *'group' � group,, *'event' � event,, *'public' � + * @param type Community type. Possible values: *'group' - group,, *'event' - event,, *'public' - * public page default "group" * @param publicCategory Category ID (for 'type' = 'public' only). minimum 0 - * @param subtype Public page subtype. Possible values: *'1' � place or small business,, *'2' � - * company, organization or website,, *'3' � famous person or group of people,, *'4' � product or work + * @param subtype Public page subtype. Possible values: *'1' - place or small business,, *'2' - + * company, organization or website,, *'3' - famous person or group of people,, *'4' - product or work * of art. minimum 0 */ class GroupsCreate( @@ -54,7 +54,7 @@ class GroupsCreate( private val type: GroupsCreateType? = null, private val publicCategory: Int? = null, private val subtype: GroupsCreateSubtype? = null -) : VKRequest("groups.create") { +) : ApiRequestBase(methodName = "groups.create") { init { addParam("title", title) description?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteAddress.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteAddress.kt index 3121ec044b..5fd3ef1d54 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteAddress.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteAddress.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class GroupsDeleteAddress( private val groupId: Int, private val addressId: Int -) : VKRequest("groups.deleteAddress") { +) : ApiRequestBase(methodName = "groups.deleteAddress") { init { addParam("group_id", groupId) addParam("address_id", addressId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteCallbackServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteCallbackServer.kt index 8f48cec65b..d563503b7f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteCallbackServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteCallbackServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class GroupsDeleteCallbackServer( private val groupId: Int, private val serverId: Int -) : VKRequest("groups.deleteCallbackServer") { +) : ApiRequestBase(methodName = "groups.deleteCallbackServer") { init { addParam("group_id", groupId) addParam("server_id", serverId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteLink.kt index b7573500bf..7d1d9ca671 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDeleteLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class GroupsDeleteLink( private val groupId: Int, private val linkId: Int -) : VKRequest("groups.deleteLink") { +) : ApiRequestBase(methodName = "groups.deleteLink") { init { addParam("group_id", groupId) addParam("link_id", linkId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDisableOnline.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDisableOnline.kt index 41be25756d..231dc270fa 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDisableOnline.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsDisableOnline.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class GroupsDisableOnline( private val groupId: Int -) : VKRequest("groups.disableOnline") { +) : ApiRequestBase(methodName = "groups.disableOnline") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEdit.kt index 89cfc72e9a..dddcd03fff 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,19 +44,19 @@ import org.json.JSONObject * @param title Community title. * @param description Community description. * @param screenName Community screen name. - * @param access Community type. Possible values: *'0' � open,, *'1' � closed,, *'2' � private. + * @param access Community type. Possible values: *'0' - open,, *'1' - closed,, *'2' - private. * minimum 0 * @param website Website that will be displayed in the community information field. - * @param subject Community subject. Possible values: , *'1' � auto/moto,, *'2' � activity - * holidays,, *'3' � business,, *'4' � pets,, *'5' � health,, *'6' � dating and communication, , *'7' � - * games,, *'8' � IT (computers and software),, *'9' � cinema,, *'10' � beauty and fashion,, *'11' � - * cooking,, *'12' � art and culture,, *'13' � literature,, *'14' � mobile services and internet,, - * *'15' � music,, *'16' � science and technology,, *'17' � real estate,, *'18' � news and media,, - * *'19' � security,, *'20' � education,, *'21' � home and renovations,, *'22' � politics,, *'23' � - * food,, *'24' � industry,, *'25' � travel,, *'26' � work,, *'27' � entertainment,, *'28' � religion,, - * *'29' � family,, *'30' � sports,, *'31' � insurance,, *'32' � television,, *'33' � goods and - * services,, *'34' � hobbies,, *'35' � finance,, *'36' � photo,, *'37' � esoterics,, *'38' � - * electronics and appliances,, *'39' � erotic,, *'40' � humor,, *'41' � society, humanities,, *'42' � + * @param subject Community subject. Possible values: , *'1' - auto/moto,, *'2' - activity + * holidays,, *'3' - business,, *'4' - pets,, *'5' - health,, *'6' - dating and communication, , *'7' - + * games,, *'8' - IT (computers and software),, *'9' - cinema,, *'10' - beauty and fashion,, *'11' - + * cooking,, *'12' - art and culture,, *'13' - literature,, *'14' - mobile services and internet,, + * *'15' - music,, *'16' - science and technology,, *'17' - real estate,, *'18' - news and media,, + * *'19' - security,, *'20' - education,, *'21' - home and renovations,, *'22' - politics,, *'23' - + * food,, *'24' - industry,, *'25' - travel,, *'26' - work,, *'27' - entertainment,, *'28' - religion,, + * *'29' - family,, *'30' - sports,, *'31' - insurance,, *'32' - television,, *'33' - goods and + * services,, *'34' - hobbies,, *'35' - finance,, *'36' - photo,, *'37' - esoterics,, *'38' - + * electronics and appliances,, *'39' - erotic,, *'40' - humor,, *'41' - society, humanities,, *'42' - * design and graphics. * @param email Organizer email (for events). * @param phone Organizer phone number (for events). @@ -69,45 +69,45 @@ import org.json.JSONObject * @param publicSubcategory Public page subcategory ID. minimum 0 * @param publicDate Founding date of a company or organization owning the community in "dd.mm.YYYY" * format. - * @param wall Wall settings. Possible values: *'0' � disabled,, *'1' � open,, *'2' � limited - * (groups and events only),, *'3' � closed (groups and events only). minimum 0 - * @param topics Board topics settings. Possbile values: , *'0' � disabled,, *'1' � open,, *'2' � + * @param wall Wall settings. Possible values: *'0' - disabled,, *'1' - open,, *'2' - limited + * (groups and events only),, *'3' - closed (groups and events only). minimum 0 + * @param topics Board topics settings. Possbile values: , *'0' - disabled,, *'1' - open,, *'2' - * limited (for groups and events only). minimum 0 - * @param photos Photos settings. Possible values: *'0' � disabled,, *'1' � open,, *'2' � limited + * @param photos Photos settings. Possible values: *'0' - disabled,, *'1' - open,, *'2' - limited * (for groups and events only). minimum 0 - * @param video Video settings. Possible values: *'0' � disabled,, *'1' � open,, *'2' � limited (for + * @param video Video settings. Possible values: *'0' - disabled,, *'1' - open,, *'2' - limited (for * groups and events only). minimum 0 - * @param audio Audio settings. Possible values: *'0' � disabled,, *'1' � open,, *'2' � limited (for + * @param audio Audio settings. Possible values: *'0' - disabled,, *'1' - open,, *'2' - limited (for * groups and events only). minimum 0 - * @param links Links settings (for public pages only). Possible values: *'0' � disabled,, *'1' � + * @param links Links settings (for public pages only). Possible values: *'0' - disabled,, *'1' - * enabled. - * @param events Events settings (for public pages only). Possible values: *'0' � disabled,, *'1' � + * @param events Events settings (for public pages only). Possible values: *'0' - disabled,, *'1' - * enabled. - * @param places Places settings (for public pages only). Possible values: *'0' � disabled,, *'1' � + * @param places Places settings (for public pages only). Possible values: *'0' - disabled,, *'1' - * enabled. - * @param contacts Contacts settings (for public pages only). Possible values: *'0' � disabled,, - * *'1' � enabled. - * @param docs Documents settings. Possible values: *'0' � disabled,, *'1' � open,, *'2' � limited + * @param contacts Contacts settings (for public pages only). Possible values: *'0' - disabled,, + * *'1' - enabled. + * @param docs Documents settings. Possible values: *'0' - disabled,, *'1' - open,, *'2' - limited * (for groups and events only). minimum 0 - * @param wiki Wiki pages settings. Possible values: *'0' � disabled,, *'1' � open,, *'2' � limited + * @param wiki Wiki pages settings. Possible values: *'0' - disabled,, *'1' - open,, *'2' - limited * (for groups and events only). minimum 0 - * @param messages Community messages. Possible values: *'0' � disabled,, *'1' � enabled. + * @param messages Community messages. Possible values: *'0' - disabled,, *'1' - enabled. * @param articles * @param addresses - * @param ageLimits Community age limits. Possible values: *'1' � no limits,, *'2' � 16+,, *'3' � + * @param ageLimits Community age limits. Possible values: *'1' - no limits,, *'2' - 16+,, *'3' - * 18+. default 1 minimum 0 - * @param market Market settings. Possible values: *'0' � disabled,, *'1' � enabled. - * @param marketComments market comments settings. Possible values: *'0' � disabled,, *'1' � + * @param market Market settings. Possible values: *'0' - disabled,, *'1' - enabled. + * @param marketComments market comments settings. Possible values: *'0' - disabled,, *'1' - * enabled. * @param marketCountry Market delivery countries. * @param marketCity Market delivery cities (if only one country is specified). - * @param marketCurrency Market currency settings. Possbile values: , *'643' � Russian rubles,, - * *'980' � Ukrainian hryvnia,, *'398' � Kazakh tenge,, *'978' � Euro,, *'840' � US dollars minimum 0 + * @param marketCurrency Market currency settings. Possbile values: , *'643' - Russian rubles,, + * *'980' - Ukrainian hryvnia,, *'398' - Kazakh tenge,, *'978' - Euro,, *'840' - US dollars minimum 0 * @param marketContact Seller contact for market. Set '0' for community messages. minimum 0 * @param marketWiki ID of a wiki page with market description. minimum 0 - * @param obsceneFilter Obscene expressions filter in comments. Possible values: , *'0' � disabled,, - * *'1' � enabled. - * @param obsceneStopwords Stopwords filter in comments. Possible values: , *'0' � disabled,, *'1' � + * @param obsceneFilter Obscene expressions filter in comments. Possible values: , *'0' - disabled,, + * *'1' - enabled. + * @param obsceneStopwords Stopwords filter in comments. Possible values: , *'0' - disabled,, *'1' - * enabled. * @param obsceneWords Keywords for stopwords filter. * @param mainSection minimum 0 @@ -161,7 +161,7 @@ class GroupsEdit( private val secondarySection: Int? = null, private val country: Int? = null, private val city: Int? = null -) : VKRequest("groups.edit") { +) : ApiRequestBase(methodName = "groups.edit") { init { addParam("group_id", groupId) title?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditAddress.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditAddress.kt index 5096956e4b..15988918d7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditAddress.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditAddress.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsAddress import com.vk.sdk.api.groups.dto.GroupsEditAddressWorkInfoStatus @@ -69,7 +69,7 @@ class GroupsEditAddress( private val workInfoStatus: GroupsEditAddressWorkInfoStatus? = null, private val timetable: String? = null, private val isMainAddress: Boolean? = null -) : VKRequest("groups.editAddress") { +) : ApiRequestBase(methodName = "groups.editAddress") { init { addParam("group_id", groupId) addParam("address_id", addressId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditCallbackServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditCallbackServer.kt index b906b3433f..f17283aac9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditCallbackServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditCallbackServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -48,7 +48,7 @@ class GroupsEditCallbackServer( private val url: String, private val title: String, private val secretKey: String? = null -) : VKRequest("groups.editCallbackServer") { +) : ApiRequestBase(methodName = "groups.editCallbackServer") { init { addParam("group_id", groupId) addParam("server_id", serverId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditLink.kt index b337b9b459..1f10762913 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ class GroupsEditLink( private val groupId: Int, private val linkId: Int, private val text: String? = null -) : VKRequest("groups.editLink") { +) : ApiRequestBase(methodName = "groups.editLink") { init { addParam("group_id", groupId) addParam("link_id", linkId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditManager.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditManager.kt index 4a5c10d2f2..0a041efcb3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditManager.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEditManager.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject * @param userId User ID. minimum 0 * @param role Manager role. Possible values: *'moderator',, *'editor',, *'administrator',, * *'advertiser'. - * @param isContact '1' � to show the manager in Contacts block of the community. + * @param isContact '1' - to show the manager in Contacts block of the community. * @param contactPosition Position to show in Contacts block. * @param contactPhone Contact phone. * @param contactEmail Contact e-mail. @@ -55,7 +55,7 @@ class GroupsEditManager( private val contactPosition: String? = null, private val contactPhone: String? = null, private val contactEmail: String? = null -) : VKRequest("groups.editManager") { +) : ApiRequestBase(methodName = "groups.editManager") { init { addParam("group_id", groupId) addParam("user_id", userId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEnableOnline.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEnableOnline.kt index 5a0cdad429..cdbc4318d7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEnableOnline.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsEnableOnline.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class GroupsEnableOnline( private val groupId: Int -) : VKRequest("groups.enableOnline") { +) : ApiRequestBase(methodName = "groups.enableOnline") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGet.kt index 4ce2121080..573d665d91 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsFields import com.vk.sdk.api.groups.dto.GroupsFilter @@ -41,12 +41,12 @@ import org.json.JSONObject /** * Returns a list of the communities to which a user belongs. * @param userId User ID. minimum 0 - * @param extended '1' � to return complete information about a user's communities, '0' � to return + * @param extended '1' - to return complete information about a user's communities, '0' - to return * a list of community IDs without any additional fields (default), - * @param filter Types of communities to return: 'admin' � to return communities administered by the - * user , 'editor' � to return communities where the user is an administrator or editor, 'moder' � to - * return communities where the user is an administrator, editor, or moderator, 'groups' � to return - * only groups, 'publics' � to return only public pages, 'events' � to return only events + * @param filter Types of communities to return: 'admin' - to return communities administered by the + * user , 'editor' - to return communities where the user is an administrator or editor, 'moder' - to + * return communities where the user is an administrator, editor, or moderator, 'groups' - to return + * only groups, 'publics' - to return only public pages, 'events' - to return only events * @param fields Profile fields to return. * @param offset Offset needed to return a specific subset of communities. minimum 0 * @param count Number of communities to return. minimum 0 maximum 1000 @@ -58,7 +58,7 @@ class GroupsGet( private val fields: List? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("groups.get") { +) : ApiRequestBase(methodName = "groups.get") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetAddresses.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetAddresses.kt index fdff1cdf8a..cdf3d8ef4c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetAddresses.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetAddresses.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.addresses.dto.AddressesFields import com.vk.sdk.api.groups.dto.GroupsGetAddressesResponseDto @@ -55,7 +55,7 @@ class GroupsGetAddresses( private val offset: Int? = null, private val count: Int? = null, private val fields: List? = null -) : VKRequest("groups.getAddresses") { +) : ApiRequestBase(methodName = "groups.getAddresses") { init { addParam("group_id", groupId) addressIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetBanned.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetBanned.kt index 4e8c2d3974..57142c6b8b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetBanned.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetBanned.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.groups.dto.GroupsGetBannedResponseDto @@ -50,7 +50,7 @@ class GroupsGetBanned( private val count: Int? = null, private val fields: List? = null, private val ownerId: Int? = null -) : VKRequest("groups.getBanned") { +) : ApiRequestBase(methodName = "groups.getBanned") { init { addParam("group_id", groupId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetById.kt index 82a565ea53..7c2d69c337 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsFields import com.vk.sdk.api.groups.dto.GroupsGroupFull @@ -46,7 +46,7 @@ class GroupsGetById( private val groupIds: List? = null, private val groupId: String? = null, private val fields: List? = null -) : VKRequest>("groups.getById") { +) : ApiRequestBase>(methodName = "groups.getById") { init { groupIds?.let { value -> addParam("group_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackConfirmationCode.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackConfirmationCode.kt index 67dd7115b7..394da9e82d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackConfirmationCode.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackConfirmationCode.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetCallbackConfirmationCodeResponseDto import com.vk.sdk.api.groups.responses.GroupsGetCallbackConfirmationCodeResponse @@ -40,7 +40,8 @@ import org.json.JSONObject */ class GroupsGetCallbackConfirmationCode( private val groupId: Int -) : VKRequest("groups.getCallbackConfirmationCode") { +) : ApiRequestBase(methodName = + "groups.getCallbackConfirmationCode") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackServers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackServers.kt index 5ba12193c8..e1239f9e1a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackServers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackServers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetCallbackServersResponseDto import com.vk.sdk.api.groups.responses.GroupsGetCallbackServersResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class GroupsGetCallbackServers( private val groupId: Int, private val serverIds: List? = null -) : VKRequest("groups.getCallbackServers") { +) : ApiRequestBase(methodName = "groups.getCallbackServers") { init { addParam("group_id", groupId) serverIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackSettings.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackSettings.kt index 450cdf6aa3..b3efd98198 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackSettings.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCallbackSettings.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsCallbackSettings import com.vk.sdk.api.groups.responses.GroupsGetCallbackSettingsResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class GroupsGetCallbackSettings( private val groupId: Int, private val serverId: Int? = null -) : VKRequest("groups.getCallbackSettings") { +) : ApiRequestBase(methodName = "groups.getCallbackSettings") { init { addParam("group_id", groupId) serverId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalog.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalog.kt index 04ab687140..6690a81569 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalog.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalog.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetCatalogResponseDto import com.vk.sdk.api.groups.responses.GroupsGetCatalogResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class GroupsGetCatalog( private val categoryId: Int? = null, private val subcategoryId: Int? = null -) : VKRequest("groups.getCatalog") { +) : ApiRequestBase(methodName = "groups.getCatalog") { init { categoryId?.let { value -> addParam("category_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalogInfo.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalogInfo.kt index 9af463850d..1feee69663 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalogInfo.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalogInfo.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetCatalogInfoResponseDto import com.vk.sdk.api.groups.responses.GroupsGetCatalogInfoResponse @@ -36,14 +36,14 @@ import org.json.JSONObject /** * Returns categories list for communities catalog - * @param extended 1 � to return communities count and three communities for preview. By default: 0. + * @param extended 1 - to return communities count and three communities for preview. By default: 0. * default 0 - * @param subcategories 1 � to return subcategories info. By default: 0. default 0 + * @param subcategories 1 - to return subcategories info. By default: 0. default 0 */ class GroupsGetCatalogInfo( private val extended: Boolean? = null, private val subcategories: Boolean? = null -) : VKRequest("groups.getCatalogInfo") { +) : ApiRequestBase(methodName = "groups.getCatalogInfo") { init { extended?.let { value -> addParam("extended", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalogInfoExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalogInfoExtended.kt index e8e36ac8ab..3123accc27 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalogInfoExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetCatalogInfoExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetCatalogInfoExtendedResponseDto import com.vk.sdk.api.groups.responses.GroupsGetCatalogInfoExtendedResponse @@ -36,14 +36,14 @@ import org.json.JSONObject /** * Returns categories list for communities catalog - * @param extended 1 � to return communities count and three communities for preview. By default: 0. + * @param extended 1 - to return communities count and three communities for preview. By default: 0. * default 0 - * @param subcategories 1 � to return subcategories info. By default: 0. default 0 + * @param subcategories 1 - to return subcategories info. By default: 0. default 0 */ class GroupsGetCatalogInfoExtended( private val extended: Boolean? = null, private val subcategories: Boolean? = null -) : VKRequest("groups.getCatalogInfo") { +) : ApiRequestBase(methodName = "groups.getCatalogInfo") { init { extended?.let { value -> addParam("extended", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetExtended.kt index 68e191b5fd..f41b130f01 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsFields import com.vk.sdk.api.groups.dto.GroupsFilter @@ -41,12 +41,12 @@ import org.json.JSONObject /** * Returns a list of the communities to which a user belongs. * @param userId User ID. minimum 0 - * @param extended '1' � to return complete information about a user's communities, '0' � to return + * @param extended '1' - to return complete information about a user's communities, '0' - to return * a list of community IDs without any additional fields (default), - * @param filter Types of communities to return: 'admin' � to return communities administered by the - * user , 'editor' � to return communities where the user is an administrator or editor, 'moder' � to - * return communities where the user is an administrator, editor, or moderator, 'groups' � to return - * only groups, 'publics' � to return only public pages, 'events' � to return only events + * @param filter Types of communities to return: 'admin' - to return communities administered by the + * user , 'editor' - to return communities where the user is an administrator or editor, 'moder' - to + * return communities where the user is an administrator, editor, or moderator, 'groups' - to return + * only groups, 'publics' - to return only public pages, 'events' - to return only events * @param fields Profile fields to return. * @param offset Offset needed to return a specific subset of communities. minimum 0 * @param count Number of communities to return. minimum 0 maximum 1000 @@ -58,7 +58,7 @@ class GroupsGetExtended( private val fields: List? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("groups.get") { +) : ApiRequestBase(methodName = "groups.get") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvitedUsers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvitedUsers.kt index b1b51e6d01..f2a203c082 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvitedUsers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvitedUsers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetInvitedUsersNameCase import com.vk.sdk.api.groups.dto.GroupsGetInvitedUsersResponseDto @@ -47,9 +47,9 @@ import org.json.JSONObject * online, online_mobile, lists, domain, has_mobile, contacts, connections, site, education, * universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, * status, last_seen, common_count, relation, relatives, counters'. - * @param nameCase Case for declension of user name and surname. Possible values: *'nom' � - * nominative (default),, *'gen' � genitive,, *'dat' � dative,, *'acc' � accusative, , *'ins' � - * instrumental,, *'abl' � prepositional. + * @param nameCase Case for declension of user name and surname. Possible values: *'nom' - + * nominative (default),, *'gen' - genitive,, *'dat' - dative,, *'acc' - accusative, , *'ins' - + * instrumental,, *'abl' - prepositional. */ class GroupsGetInvitedUsers( private val groupId: Int, @@ -57,7 +57,7 @@ class GroupsGetInvitedUsers( private val count: Int? = null, private val fields: List? = null, private val nameCase: GroupsGetInvitedUsersNameCase? = null -) : VKRequest("groups.getInvitedUsers") { +) : ApiRequestBase(methodName = "groups.getInvitedUsers") { init { addParam("group_id", groupId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvites.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvites.kt index c7af90219f..0468cfe07d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvites.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvites.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetInvitesResponseDto import com.vk.sdk.api.groups.responses.GroupsGetInvitesResponse @@ -39,13 +39,13 @@ import org.json.JSONObject * Returns a list of invitations to join communities and events. * @param offset Offset needed to return a specific subset of invitations. minimum 0 * @param count Number of invitations to return. default 20 minimum 0 - * @param extended '1' � to return additional [vk.com/dev/fields_groups|fields] for communities.. + * @param extended '1' - to return additional [vk.com/dev/fields_groups|fields] for communities.. */ class GroupsGetInvites( private val offset: Int? = null, private val count: Int? = null, private val extended: Boolean? = null -) : VKRequest("groups.getInvites") { +) : ApiRequestBase(methodName = "groups.getInvites") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvitesExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvitesExtended.kt index 449579fb7b..0d058782f7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvitesExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetInvitesExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetInvitesExtendedResponseDto import com.vk.sdk.api.groups.responses.GroupsGetInvitesExtendedResponse @@ -39,13 +39,13 @@ import org.json.JSONObject * Returns a list of invitations to join communities and events. * @param offset Offset needed to return a specific subset of invitations. minimum 0 * @param count Number of invitations to return. default 20 minimum 0 - * @param extended '1' � to return additional [vk.com/dev/fields_groups|fields] for communities.. + * @param extended '1' - to return additional [vk.com/dev/fields_groups|fields] for communities.. */ class GroupsGetInvitesExtended( private val offset: Int? = null, private val count: Int? = null, private val extended: Boolean? = null -) : VKRequest("groups.getInvites") { +) : ApiRequestBase(methodName = "groups.getInvites") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetLongPollServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetLongPollServer.kt index 33054e2dcf..e6b5e74aa6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetLongPollServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetLongPollServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsLongPollServer import com.vk.sdk.api.groups.responses.GroupsGetLongPollServerResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class GroupsGetLongPollServer( private val groupId: Int -) : VKRequest("groups.getLongPollServer") { +) : ApiRequestBase(methodName = "groups.getLongPollServer") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetLongPollSettings.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetLongPollSettings.kt index eec609ed24..0615d47939 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetLongPollSettings.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetLongPollSettings.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsLongPollSettings import com.vk.sdk.api.groups.responses.GroupsGetLongPollSettingsResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class GroupsGetLongPollSettings( private val groupId: Int -) : VKRequest("groups.getLongPollSettings") { +) : ApiRequestBase(methodName = "groups.getLongPollSettings") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembers.kt index f95446c00d..b4bba8492a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetMembersFilter import com.vk.sdk.api.groups.dto.GroupsGetMembersResponseDto @@ -52,7 +52,7 @@ import org.json.JSONObject * online, online_mobile, lists, domain, has_mobile, contacts, connections, site, education, * universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, * status, last_seen, common_count, relation, relatives, counters'. - * @param filter *'friends' � only friends in this community will be returned,, *'unsure' � only + * @param filter *'friends' - only friends in this community will be returned,, *'unsure' - only * those who pressed 'I may attend' will be returned (if it's an event). */ class GroupsGetMembers( @@ -62,7 +62,7 @@ class GroupsGetMembers( private val count: Int? = null, private val fields: List? = null, private val filter: GroupsGetMembersFilter? = null -) : VKRequest("groups.getMembers") { +) : ApiRequestBase(methodName = "groups.getMembers") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembersFields.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembersFields.kt index eab44f5e4c..033883eef7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembersFields.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembersFields.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetMembersFieldsResponseDto import com.vk.sdk.api.groups.dto.GroupsGetMembersFilter @@ -52,7 +52,7 @@ import org.json.JSONObject * online, online_mobile, lists, domain, has_mobile, contacts, connections, site, education, * universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, * status, last_seen, common_count, relation, relatives, counters'. - * @param filter *'friends' � only friends in this community will be returned,, *'unsure' � only + * @param filter *'friends' - only friends in this community will be returned,, *'unsure' - only * those who pressed 'I may attend' will be returned (if it's an event). */ class GroupsGetMembersFields( @@ -62,7 +62,7 @@ class GroupsGetMembersFields( private val count: Int? = null, private val fields: List? = null, private val filter: GroupsGetMembersFilter? = null -) : VKRequest("groups.getMembers") { +) : ApiRequestBase(methodName = "groups.getMembers") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembersFilter.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembersFilter.kt index 9086c42e35..2993d5af72 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembersFilter.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetMembersFilter.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetMembersFilterResponseDto import com.vk.sdk.api.groups.dto.GroupsGetMembersSort @@ -51,7 +51,7 @@ import org.json.JSONObject * online, online_mobile, lists, domain, has_mobile, contacts, connections, site, education, * universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, * status, last_seen, common_count, relation, relatives, counters'. - * @param filter *'friends' � only friends in this community will be returned,, *'unsure' � only + * @param filter *'friends' - only friends in this community will be returned,, *'unsure' - only * those who pressed 'I may attend' will be returned (if it's an event). */ class GroupsGetMembersFilter( @@ -61,7 +61,7 @@ class GroupsGetMembersFilter( private val count: Int? = null, private val fields: List? = null, private val filter: com.vk.sdk.api.groups.dto.GroupsGetMembersFilter? = null -) : VKRequest("groups.getMembers") { +) : ApiRequestBase(methodName = "groups.getMembers") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetRequests.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetRequests.kt index 1e533955f8..c5ee222a8b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetRequests.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetRequests.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetRequestsResponseDto import com.vk.sdk.api.groups.responses.GroupsGetRequestsResponse @@ -48,7 +48,7 @@ class GroupsGetRequests( private val offset: Int? = null, private val count: Int? = null, private val fields: List? = null -) : VKRequest("groups.getRequests") { +) : ApiRequestBase(methodName = "groups.getRequests") { init { addParam("group_id", groupId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetRequestsFields.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetRequestsFields.kt index c7dafe0d29..6aa02d55de 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetRequestsFields.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetRequestsFields.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetRequestsFieldsResponseDto import com.vk.sdk.api.groups.responses.GroupsGetRequestsFieldsResponse @@ -48,7 +48,7 @@ class GroupsGetRequestsFields( private val offset: Int? = null, private val count: Int? = null, private val fields: List? = null -) : VKRequest("groups.getRequests") { +) : ApiRequestBase(methodName = "groups.getRequests") { init { addParam("group_id", groupId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetSettings.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetSettings.kt index a321fbbcb1..48a2082599 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetSettings.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetSettings.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetSettingsResponseDto import com.vk.sdk.api.groups.responses.GroupsGetSettingsResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class GroupsGetSettings( private val groupId: Int -) : VKRequest("groups.getSettings") { +) : ApiRequestBase(methodName = "groups.getSettings") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetTagList.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetTagList.kt index bed93dcb22..ee7045f1df 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetTagList.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetTagList.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGroupTag import com.vk.sdk.api.groups.responses.GroupsGetTagListResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class GroupsGetTagList( private val groupId: Int -) : VKRequest>("groups.getTagList") { +) : ApiRequestBase>(methodName = "groups.getTagList") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetTokenPermissions.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetTokenPermissions.kt index d9f3707818..f1acebf379 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetTokenPermissions.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsGetTokenPermissions.kt @@ -27,14 +27,14 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsGetTokenPermissionsResponseDto import com.vk.sdk.api.groups.responses.GroupsGetTokenPermissionsResponse import org.json.JSONObject -class GroupsGetTokenPermissions : - VKRequest("groups.getTokenPermissions") { +class GroupsGetTokenPermissions : ApiRequestBase(methodName = + "groups.getTokenPermissions") { override fun parse(r: JSONObject): GroupsGetTokenPermissionsResponseDto = GsonHolder.gson.fromJson(r.toString(), GroupsGetTokenPermissionsResponse::class.java).response diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsInvite.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsInvite.kt index fc100a7381..74ae0867cf 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsInvite.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsInvite.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class GroupsInvite( private val groupId: Int, private val userId: Int -) : VKRequest("groups.invite") { +) : ApiRequestBase(methodName = "groups.invite") { init { addParam("group_id", groupId) addParam("user_id", userId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMember.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMember.kt index 029a1b717f..735b26c689 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMember.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMember.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.groups.responses.GroupsIsMemberResponse @@ -42,14 +42,14 @@ import org.json.JSONObject * @param groupId ID or screen name of the community. * @param userId User ID. minimum 0 * @param userIds User IDs. - * @param extended '1' � to return an extended response with additional fields. By default: '0'. + * @param extended '1' - to return an extended response with additional fields. By default: '0'. */ class GroupsIsMember( private val groupId: String, private val userId: Int? = null, private val userIds: List? = null, private val extended: Boolean? = null -) : VKRequest("groups.isMember") { +) : ApiRequestBase(methodName = "groups.isMember") { init { addParam("group_id", groupId) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberExtended.kt index 271303afc7..da3874a1d8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsIsMemberExtendedResponseDto import com.vk.sdk.api.groups.responses.GroupsIsMemberExtendedResponse @@ -42,14 +42,14 @@ import org.json.JSONObject * @param groupId ID or screen name of the community. * @param userId User ID. minimum 0 * @param userIds User IDs. - * @param extended '1' � to return an extended response with additional fields. By default: '0'. + * @param extended '1' - to return an extended response with additional fields. By default: '0'. */ class GroupsIsMemberExtended( private val groupId: String, private val userId: Int? = null, private val userIds: List? = null, private val extended: Boolean? = null -) : VKRequest("groups.isMember") { +) : ApiRequestBase(methodName = "groups.isMember") { init { addParam("group_id", groupId) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberUserids.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberUserids.kt index e5b015d23e..77cabad8c4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberUserids.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberUserids.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsMemberStatus import com.vk.sdk.api.groups.responses.GroupsIsMemberUserIdsResponse @@ -42,14 +42,14 @@ import org.json.JSONObject * @param groupId ID or screen name of the community. * @param userId User ID. minimum 0 * @param userIds User IDs. - * @param extended '1' � to return an extended response with additional fields. By default: '0'. + * @param extended '1' - to return an extended response with additional fields. By default: '0'. */ class GroupsIsMemberUserids( private val groupId: String, private val userId: Int? = null, private val userIds: List? = null, private val extended: Boolean? = null -) : VKRequest>("groups.isMember") { +) : ApiRequestBase>(methodName = "groups.isMember") { init { addParam("group_id", groupId) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberUserids_extended_.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberUserids_extended_.kt index 4fdddbe135..9dd0ccd2c3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberUserids_extended_.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsIsMemberUserids_extended_.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsMemberStatusFull import com.vk.sdk.api.groups.responses.GroupsIsMemberUserIdsExtendedResponse @@ -42,14 +42,14 @@ import org.json.JSONObject * @param groupId ID or screen name of the community. * @param userId User ID. minimum 0 * @param userIds User IDs. - * @param extended '1' � to return an extended response with additional fields. By default: '0'. + * @param extended '1' - to return an extended response with additional fields. By default: '0'. */ class GroupsIsMemberUserids_extended_( private val groupId: String, private val userId: Int? = null, private val userIds: List? = null, private val extended: Boolean? = null -) : VKRequest>("groups.isMember") { +) : ApiRequestBase>(methodName = "groups.isMember") { init { addParam("group_id", groupId) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsJoin.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsJoin.kt index a8c43f111c..76fefa720d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsJoin.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsJoin.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,12 +40,12 @@ import org.json.JSONObject * event. * @param groupId ID or screen name of the community. minimum 0 * @param notSure Optional parameter which is taken into account when 'gid' belongs to the event: - * '1' � Perhaps I will attend, '0' � I will be there for sure (default), , + * '1' - Perhaps I will attend, '0' - I will be there for sure (default), , */ class GroupsJoin( private val groupId: Int? = null, private val notSure: String? = null -) : VKRequest("groups.join") { +) : ApiRequestBase(methodName = "groups.join") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsLeave.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsLeave.kt index 330e3a6e86..cd7ddad6c7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsLeave.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsLeave.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class GroupsLeave( private val groupId: Int -) : VKRequest("groups.leave") { +) : ApiRequestBase(methodName = "groups.leave") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsRemoveUser.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsRemoveUser.kt index 7490e97fcf..f07b6bead1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsRemoveUser.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsRemoveUser.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class GroupsRemoveUser( private val groupId: Int, private val userId: Int -) : VKRequest("groups.removeUser") { +) : ApiRequestBase(methodName = "groups.removeUser") { init { addParam("group_id", groupId) addParam("user_id", userId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsReorderLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsReorderLink.kt index efd993d85d..6500cbed46 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsReorderLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsReorderLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class GroupsReorderLink( private val groupId: Int, private val linkId: Int, private val after: Int? = null -) : VKRequest("groups.reorderLink") { +) : ApiRequestBase(methodName = "groups.reorderLink") { init { addParam("group_id", groupId) addParam("link_id", linkId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSearch.kt index 3bafd7146e..c32a414b9f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.groups.dto.GroupsSearchResponseDto import com.vk.sdk.api.groups.dto.GroupsSearchSort @@ -44,11 +44,11 @@ import org.json.JSONObject * @param type Community type. Possible values: 'group, page, event.' * @param countryId Country ID. minimum 0 * @param cityId City ID. If this parameter is transmitted, country_id is ignored. minimum 0 - * @param future '1' � to return only upcoming events. Works with the 'type' = 'event' only. - * @param market '1' � to return communities with enabled market only. - * @param sort Sort order. Possible values: *'0' � default sorting (similar the full version of the - * site),, *'1' � by growth speed,, *'2'� by the "day attendance/members number" ratio,, *'3' � by the - * "Likes number/members number" ratio,, *'4' � by the "comments number/members number" ratio,, *'5' � + * @param future '1' - to return only upcoming events. Works with the 'type' = 'event' only. + * @param market '1' - to return communities with enabled market only. + * @param sort Sort order. Possible values: *'0' - default sorting (similar the full version of the + * site),, *'1' - by growth speed,, *'2'- by the "day attendance/members number" ratio,, *'3' - by the + * "Likes number/members number" ratio,, *'4' - by the "comments number/members number" ratio,, *'5' - * by the "boards entries number/members number" ratio. * @param offset Offset needed to return a specific subset of results. minimum 0 * @param count Number of communities to return. "Note that you can not receive more than first @@ -64,7 +64,7 @@ class GroupsSearch( private val sort: GroupsSearchSort? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("groups.search") { +) : ApiRequestBase(methodName = "groups.search") { init { addParam("q", q) type?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetCallbackSettings.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetCallbackSettings.kt index a081bb502b..67facdb5f5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetCallbackSettings.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetCallbackSettings.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,41 +41,41 @@ import org.json.JSONObject * @param groupId Community ID. minimum 0 * @param serverId Server ID. minimum 0 * @param apiVersion - * @param messageNew A new incoming message has been received ('0' � disabled, '1' � enabled). - * @param messageReply A new outcoming message has been received ('0' � disabled, '1' � enabled). - * @param messageAllow Allowed messages notifications ('0' � disabled, '1' � enabled). + * @param messageNew A new incoming message has been received ('0' - disabled, '1' - enabled). + * @param messageReply A new outcoming message has been received ('0' - disabled, '1' - enabled). + * @param messageAllow Allowed messages notifications ('0' - disabled, '1' - enabled). * @param messageEdit - * @param messageDeny Denied messages notifications ('0' � disabled, '1' � enabled). + * @param messageDeny Denied messages notifications ('0' - disabled, '1' - enabled). * @param messageTypingState - * @param photoNew New photos notifications ('0' � disabled, '1' � enabled). - * @param audioNew New audios notifications ('0' � disabled, '1' � enabled). - * @param videoNew New videos notifications ('0' � disabled, '1' � enabled). - * @param wallReplyNew New wall replies notifications ('0' � disabled, '1' � enabled). - * @param wallReplyEdit Wall replies edited notifications ('0' � disabled, '1' � enabled). - * @param wallReplyDelete A wall comment has been deleted ('0' � disabled, '1' � enabled). - * @param wallReplyRestore A wall comment has been restored ('0' � disabled, '1' � enabled). - * @param wallPostNew New wall posts notifications ('0' � disabled, '1' � enabled). - * @param wallRepost New wall posts notifications ('0' � disabled, '1' � enabled). - * @param boardPostNew New board posts notifications ('0' � disabled, '1' � enabled). - * @param boardPostEdit Board posts edited notifications ('0' � disabled, '1' � enabled). - * @param boardPostRestore Board posts restored notifications ('0' � disabled, '1' � enabled). - * @param boardPostDelete Board posts deleted notifications ('0' � disabled, '1' � enabled). - * @param photoCommentNew New comment to photo notifications ('0' � disabled, '1' � enabled). - * @param photoCommentEdit A photo comment has been edited ('0' � disabled, '1' � enabled). - * @param photoCommentDelete A photo comment has been deleted ('0' � disabled, '1' � enabled). - * @param photoCommentRestore A photo comment has been restored ('0' � disabled, '1' � enabled). - * @param videoCommentNew New comment to video notifications ('0' � disabled, '1' � enabled). - * @param videoCommentEdit A video comment has been edited ('0' � disabled, '1' � enabled). - * @param videoCommentDelete A video comment has been deleted ('0' � disabled, '1' � enabled). - * @param videoCommentRestore A video comment has been restored ('0' � disabled, '1' � enabled). - * @param marketCommentNew New comment to market item notifications ('0' � disabled, '1' � enabled). + * @param photoNew New photos notifications ('0' - disabled, '1' - enabled). + * @param audioNew New audios notifications ('0' - disabled, '1' - enabled). + * @param videoNew New videos notifications ('0' - disabled, '1' - enabled). + * @param wallReplyNew New wall replies notifications ('0' - disabled, '1' - enabled). + * @param wallReplyEdit Wall replies edited notifications ('0' - disabled, '1' - enabled). + * @param wallReplyDelete A wall comment has been deleted ('0' - disabled, '1' - enabled). + * @param wallReplyRestore A wall comment has been restored ('0' - disabled, '1' - enabled). + * @param wallPostNew New wall posts notifications ('0' - disabled, '1' - enabled). + * @param wallRepost New wall posts notifications ('0' - disabled, '1' - enabled). + * @param boardPostNew New board posts notifications ('0' - disabled, '1' - enabled). + * @param boardPostEdit Board posts edited notifications ('0' - disabled, '1' - enabled). + * @param boardPostRestore Board posts restored notifications ('0' - disabled, '1' - enabled). + * @param boardPostDelete Board posts deleted notifications ('0' - disabled, '1' - enabled). + * @param photoCommentNew New comment to photo notifications ('0' - disabled, '1' - enabled). + * @param photoCommentEdit A photo comment has been edited ('0' - disabled, '1' - enabled). + * @param photoCommentDelete A photo comment has been deleted ('0' - disabled, '1' - enabled). + * @param photoCommentRestore A photo comment has been restored ('0' - disabled, '1' - enabled). + * @param videoCommentNew New comment to video notifications ('0' - disabled, '1' - enabled). + * @param videoCommentEdit A video comment has been edited ('0' - disabled, '1' - enabled). + * @param videoCommentDelete A video comment has been deleted ('0' - disabled, '1' - enabled). + * @param videoCommentRestore A video comment has been restored ('0' - disabled, '1' - enabled). + * @param marketCommentNew New comment to market item notifications ('0' - disabled, '1' - enabled). * - * @param marketCommentEdit A market comment has been edited ('0' � disabled, '1' � enabled). - * @param marketCommentDelete A market comment has been deleted ('0' � disabled, '1' � enabled). - * @param marketCommentRestore A market comment has been restored ('0' � disabled, '1' � enabled). - * @param pollVoteNew A vote in a public poll has been added ('0' � disabled, '1' � enabled). - * @param groupJoin Joined community notifications ('0' � disabled, '1' � enabled). - * @param groupLeave Left community notifications ('0' � disabled, '1' � enabled). + * @param marketCommentEdit A market comment has been edited ('0' - disabled, '1' - enabled). + * @param marketCommentDelete A market comment has been deleted ('0' - disabled, '1' - enabled). + * @param marketCommentRestore A market comment has been restored ('0' - disabled, '1' - enabled). + * @param pollVoteNew A vote in a public poll has been added ('0' - disabled, '1' - enabled). + * @param groupJoin Joined community notifications ('0' - disabled, '1' - enabled). + * @param groupLeave Left community notifications ('0' - disabled, '1' - enabled). * @param groupChangeSettings * @param groupChangePhoto * @param groupOfficersEdit @@ -133,7 +133,7 @@ class GroupsSetCallbackSettings( private val likeAdd: Boolean? = null, private val likeRemove: Boolean? = null, private val messageEvent: Boolean? = null -) : VKRequest("groups.setCallbackSettings") { +) : ApiRequestBase(methodName = "groups.setCallbackSettings") { init { addParam("group_id", groupId) serverId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetLongPollSettings.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetLongPollSettings.kt index a5cbd24b33..03a3dd7e79 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetLongPollSettings.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetLongPollSettings.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,43 +39,43 @@ import org.json.JSONObject /** * Sets Long Poll notification settings * @param groupId Community ID. minimum 0 - * @param enabled Sets whether Long Poll is enabled ('0' � disabled, '1' � enabled). + * @param enabled Sets whether Long Poll is enabled ('0' - disabled, '1' - enabled). * @param apiVersion - * @param messageNew A new incoming message has been received ('0' � disabled, '1' � enabled). - * @param messageReply A new outcoming message has been received ('0' � disabled, '1' � enabled). - * @param messageAllow Allowed messages notifications ('0' � disabled, '1' � enabled). - * @param messageDeny Denied messages notifications ('0' � disabled, '1' � enabled). - * @param messageEdit A message has been edited ('0' � disabled, '1' � enabled). + * @param messageNew A new incoming message has been received ('0' - disabled, '1' - enabled). + * @param messageReply A new outcoming message has been received ('0' - disabled, '1' - enabled). + * @param messageAllow Allowed messages notifications ('0' - disabled, '1' - enabled). + * @param messageDeny Denied messages notifications ('0' - disabled, '1' - enabled). + * @param messageEdit A message has been edited ('0' - disabled, '1' - enabled). * @param messageTypingState - * @param photoNew New photos notifications ('0' � disabled, '1' � enabled). - * @param audioNew New audios notifications ('0' � disabled, '1' � enabled). - * @param videoNew New videos notifications ('0' � disabled, '1' � enabled). - * @param wallReplyNew New wall replies notifications ('0' � disabled, '1' � enabled). - * @param wallReplyEdit Wall replies edited notifications ('0' � disabled, '1' � enabled). - * @param wallReplyDelete A wall comment has been deleted ('0' � disabled, '1' � enabled). - * @param wallReplyRestore A wall comment has been restored ('0' � disabled, '1' � enabled). - * @param wallPostNew New wall posts notifications ('0' � disabled, '1' � enabled). - * @param wallRepost New wall posts notifications ('0' � disabled, '1' � enabled). - * @param boardPostNew New board posts notifications ('0' � disabled, '1' � enabled). - * @param boardPostEdit Board posts edited notifications ('0' � disabled, '1' � enabled). - * @param boardPostRestore Board posts restored notifications ('0' � disabled, '1' � enabled). - * @param boardPostDelete Board posts deleted notifications ('0' � disabled, '1' � enabled). - * @param photoCommentNew New comment to photo notifications ('0' � disabled, '1' � enabled). - * @param photoCommentEdit A photo comment has been edited ('0' � disabled, '1' � enabled). - * @param photoCommentDelete A photo comment has been deleted ('0' � disabled, '1' � enabled). - * @param photoCommentRestore A photo comment has been restored ('0' � disabled, '1' � enabled). - * @param videoCommentNew New comment to video notifications ('0' � disabled, '1' � enabled). - * @param videoCommentEdit A video comment has been edited ('0' � disabled, '1' � enabled). - * @param videoCommentDelete A video comment has been deleted ('0' � disabled, '1' � enabled). - * @param videoCommentRestore A video comment has been restored ('0' � disabled, '1' � enabled). - * @param marketCommentNew New comment to market item notifications ('0' � disabled, '1' � enabled). + * @param photoNew New photos notifications ('0' - disabled, '1' - enabled). + * @param audioNew New audios notifications ('0' - disabled, '1' - enabled). + * @param videoNew New videos notifications ('0' - disabled, '1' - enabled). + * @param wallReplyNew New wall replies notifications ('0' - disabled, '1' - enabled). + * @param wallReplyEdit Wall replies edited notifications ('0' - disabled, '1' - enabled). + * @param wallReplyDelete A wall comment has been deleted ('0' - disabled, '1' - enabled). + * @param wallReplyRestore A wall comment has been restored ('0' - disabled, '1' - enabled). + * @param wallPostNew New wall posts notifications ('0' - disabled, '1' - enabled). + * @param wallRepost New wall posts notifications ('0' - disabled, '1' - enabled). + * @param boardPostNew New board posts notifications ('0' - disabled, '1' - enabled). + * @param boardPostEdit Board posts edited notifications ('0' - disabled, '1' - enabled). + * @param boardPostRestore Board posts restored notifications ('0' - disabled, '1' - enabled). + * @param boardPostDelete Board posts deleted notifications ('0' - disabled, '1' - enabled). + * @param photoCommentNew New comment to photo notifications ('0' - disabled, '1' - enabled). + * @param photoCommentEdit A photo comment has been edited ('0' - disabled, '1' - enabled). + * @param photoCommentDelete A photo comment has been deleted ('0' - disabled, '1' - enabled). + * @param photoCommentRestore A photo comment has been restored ('0' - disabled, '1' - enabled). + * @param videoCommentNew New comment to video notifications ('0' - disabled, '1' - enabled). + * @param videoCommentEdit A video comment has been edited ('0' - disabled, '1' - enabled). + * @param videoCommentDelete A video comment has been deleted ('0' - disabled, '1' - enabled). + * @param videoCommentRestore A video comment has been restored ('0' - disabled, '1' - enabled). + * @param marketCommentNew New comment to market item notifications ('0' - disabled, '1' - enabled). * - * @param marketCommentEdit A market comment has been edited ('0' � disabled, '1' � enabled). - * @param marketCommentDelete A market comment has been deleted ('0' � disabled, '1' � enabled). - * @param marketCommentRestore A market comment has been restored ('0' � disabled, '1' � enabled). - * @param pollVoteNew A vote in a public poll has been added ('0' � disabled, '1' � enabled). - * @param groupJoin Joined community notifications ('0' � disabled, '1' � enabled). - * @param groupLeave Left community notifications ('0' � disabled, '1' � enabled). + * @param marketCommentEdit A market comment has been edited ('0' - disabled, '1' - enabled). + * @param marketCommentDelete A market comment has been deleted ('0' - disabled, '1' - enabled). + * @param marketCommentRestore A market comment has been restored ('0' - disabled, '1' - enabled). + * @param pollVoteNew A vote in a public poll has been added ('0' - disabled, '1' - enabled). + * @param groupJoin Joined community notifications ('0' - disabled, '1' - enabled). + * @param groupLeave Left community notifications ('0' - disabled, '1' - enabled). * @param groupChangeSettings * @param groupChangePhoto * @param groupOfficersEdit @@ -131,7 +131,7 @@ class GroupsSetLongPollSettings( private val likeAdd: Boolean? = null, private val likeRemove: Boolean? = null, private val messageEvent: Boolean? = null -) : VKRequest("groups.setLongPollSettings") { +) : ApiRequestBase(methodName = "groups.setLongPollSettings") { init { addParam("group_id", groupId) enabled?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetSettings.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetSettings.kt index 9877ab8d55..67a1c022f6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetSettings.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetSettings.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -48,7 +48,7 @@ class GroupsSetSettings( private val botsCapabilities: Boolean? = null, private val botsStartButton: Boolean? = null, private val botsAddToChat: Boolean? = null -) : VKRequest("groups.setSettings") { +) : ApiRequestBase(methodName = "groups.setSettings") { init { addParam("group_id", groupId) messages?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetUserNote.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetUserNote.kt index 5ba19672eb..ea14d3119b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetUserNote.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsSetUserNote.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -45,7 +45,7 @@ class GroupsSetUserNote( private val groupId: Int, private val userId: Int, private val note: String? = null -) : VKRequest("groups.setUserNote") { +) : ApiRequestBase(methodName = "groups.setUserNote") { init { addParam("group_id", groupId) addParam("user_id", userId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagAdd.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagAdd.kt index 12d0020b9a..c8bf707861 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagAdd.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagAdd.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -46,7 +46,7 @@ class GroupsTagAdd( private val groupId: Int, private val tagName: String, private val tagColor: GroupsTagAddTagColor? = null -) : VKRequest("groups.tagAdd") { +) : ApiRequestBase(methodName = "groups.tagAdd") { init { addParam("group_id", groupId) addParam("tag_name", tagName) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagBind.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagBind.kt index 746c948203..25f66b77b3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagBind.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagBind.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -47,7 +47,7 @@ class GroupsTagBind( private val tagId: Int, private val userId: Int, private val act: GroupsTagBindAct -) : VKRequest("groups.tagBind") { +) : ApiRequestBase(methodName = "groups.tagBind") { init { addParam("group_id", groupId) addParam("tag_id", tagId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagDelete.kt index da91b2bebe..80e10b2457 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class GroupsTagDelete( private val groupId: Int, private val tagId: Int -) : VKRequest("groups.tagDelete") { +) : ApiRequestBase(methodName = "groups.tagDelete") { init { addParam("group_id", groupId) addParam("tag_id", tagId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagUpdate.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagUpdate.kt index bbbae9d160..71aafed4aa 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagUpdate.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsTagUpdate.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -45,7 +45,7 @@ class GroupsTagUpdate( private val groupId: Int, private val tagId: Int, private val tagName: String -) : VKRequest("groups.tagUpdate") { +) : ApiRequestBase(methodName = "groups.tagUpdate") { init { addParam("group_id", groupId) addParam("tag_id", tagId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsToggleMarket.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsToggleMarket.kt index 0a4379a5cf..f5b70a9961 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsToggleMarket.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsToggleMarket.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class GroupsToggleMarket( private val groupId: Int, private val state: GroupsToggleMarketState -) : VKRequest("groups.toggleMarket") { +) : ApiRequestBase(methodName = "groups.toggleMarket") { init { addParam("group_id", groupId) addParam("state", state.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsUnban.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsUnban.kt index 1e761f23f4..9e11095896 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsUnban.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/groups/methods/GroupsUnban.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.groups.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class GroupsUnban( private val groupId: Int, private val ownerId: Int? = null -) : VKRequest("groups.unban") { +) : ApiRequestBase(methodName = "groups.unban") { init { addParam("group_id", groupId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsCheckUser.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsCheckUser.kt index c6ffdc6b59..4141f7a075 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsCheckUser.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsCheckUser.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.leads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.leads.dto.LeadsChecked import com.vk.sdk.api.leads.responses.LeadsCheckUserResponse @@ -52,7 +52,7 @@ class LeadsCheckUser( private val autoStart: Boolean? = null, private val age: Int? = null, private val country: String? = null -) : VKRequest("leads.checkUser") { +) : ApiRequestBase(methodName = "leads.checkUser") { init { addParam("lead_id", leadId) testResult?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsComplete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsComplete.kt index 369fe4058d..4f5b8cabb1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsComplete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsComplete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.leads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.leads.dto.LeadsComplete import com.vk.sdk.api.leads.responses.LeadsCompleteResponse @@ -44,7 +44,7 @@ class LeadsComplete( private val vkSid: String, private val secret: String, private val comment: String? = null -) : VKRequest("leads.complete") { +) : ApiRequestBase(methodName = "leads.complete") { init { addParam("vk_sid", vkSid) addParam("secret", secret) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsGetStats.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsGetStats.kt index 7a7d6a87d5..36b68835c2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsGetStats.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsGetStats.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.leads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.leads.dto.LeadsLead import com.vk.sdk.api.leads.responses.LeadsGetStatsResponse @@ -47,7 +47,7 @@ class LeadsGetStats( private val secret: String? = null, private val dateStart: String? = null, private val dateEnd: String? = null -) : VKRequest("leads.getStats") { +) : ApiRequestBase(methodName = "leads.getStats") { init { addParam("lead_id", leadId) secret?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsGetUsers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsGetUsers.kt index d19952bc4c..ba2302c3b8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsGetUsers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsGetUsers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.leads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.leads.dto.LeadsEntry import com.vk.sdk.api.leads.dto.LeadsGetUsersStatus @@ -44,9 +44,9 @@ import org.json.JSONObject * @param secret Secret key obtained in the lead testing interface. * @param offset Offset needed to return a specific subset of results. minimum 0 * @param count Number of results to return. default 100 minimum 0 maximum 1000 - * @param status Action type. Possible values: *'0' � start,, *'1' � finish,, *'2' � blocking - * users,, *'3' � start in a test mode,, *'4' � finish in a test mode. minimum 0 - * @param reverse Sort order. Possible values: *'1' � chronological,, *'0' � reverse chronological. + * @param status Action type. Possible values: *'0' - start,, *'1' - finish,, *'2' - blocking + * users,, *'3' - start in a test mode,, *'4' - finish in a test mode. minimum 0 + * @param reverse Sort order. Possible values: *'1' - chronological,, *'0' - reverse chronological. */ class LeadsGetUsers( private val offerId: Int, @@ -55,7 +55,7 @@ class LeadsGetUsers( private val count: Int? = null, private val status: LeadsGetUsersStatus? = null, private val reverse: Boolean? = null -) : VKRequest>("leads.getUsers") { +) : ApiRequestBase>(methodName = "leads.getUsers") { init { addParam("offer_id", offerId) addParam("secret", secret) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsMetricHit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsMetricHit.kt index 281831034f..0a51dad213 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsMetricHit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsMetricHit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.leads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.leads.dto.LeadsMetricHitResponseDto import com.vk.sdk.api.leads.responses.LeadsMetricHitResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class LeadsMetricHit( private val data: String -) : VKRequest("leads.metricHit") { +) : ApiRequestBase(methodName = "leads.metricHit") { init { addParam("data", data) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsStart.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsStart.kt index 88d2ccb097..cb6c589b7f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsStart.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/leads/methods/LeadsStart.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.leads.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.leads.dto.LeadsStart import com.vk.sdk.api.leads.responses.LeadsStartResponse @@ -52,7 +52,7 @@ class LeadsStart( private val aid: Int? = null, private val testMode: Boolean? = null, private val force: Boolean? = null -) : VKRequest("leads.start") { +) : ApiRequestBase(methodName = "leads.start") { init { addParam("lead_id", leadId) addParam("secret", secret) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesAdd.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesAdd.kt index 3fe8d8cb0f..9f6f05d171 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesAdd.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesAdd.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.likes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.likes.dto.LikesAddResponseDto import com.vk.sdk.api.likes.responses.LikesAddResponse @@ -37,10 +37,10 @@ import org.json.JSONObject /** * Adds the specified object to the 'Likes' list of the current user. - * @param type Object type: 'post' � post on user or community wall, 'comment' � comment on a wall - * post, 'photo' � photo, 'audio' � audio, 'video' � video, 'note' � note, 'photo_comment' � comment on - * the photo, 'video_comment' � comment on the video, 'topic_comment' � comment in the discussion, - * 'sitepage' � page of the site where the [vk.com/dev/Like|Like widget] is installed + * @param type Object type: 'post' - post on user or community wall, 'comment' - comment on a wall + * post, 'photo' - photo, 'audio' - audio, 'video' - video, 'note' - note, 'photo_comment' - comment on + * the photo, 'video_comment' - comment on the video, 'topic_comment' - comment in the discussion, + * 'sitepage' - page of the site where the [vk.com/dev/Like|Like widget] is installed * @param itemId Object ID. minimum 0 * @param ownerId ID of the user or community that owns the object. * @param accessKey Access key required for an object owned by a private entity. @@ -50,7 +50,7 @@ class LikesAdd( private val itemId: Int, private val ownerId: Int? = null, private val accessKey: String? = null -) : VKRequest("likes.add") { +) : ApiRequestBase(methodName = "likes.add") { init { addParam("type", type) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesDelete.kt index b54e70bfb5..e49e7326ca 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.likes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.likes.dto.LikesDeleteResponseDto import com.vk.sdk.api.likes.responses.LikesDeleteResponse @@ -37,10 +37,10 @@ import org.json.JSONObject /** * Deletes the specified object from the 'Likes' list of the current user. - * @param type Object type: 'post' � post on user or community wall, 'comment' � comment on a wall - * post, 'photo' � photo, 'audio' � audio, 'video' � video, 'note' � note, 'photo_comment' � comment on - * the photo, 'video_comment' � comment on the video, 'topic_comment' � comment in the discussion, - * 'sitepage' � page of the site where the [vk.com/dev/Like|Like widget] is installed + * @param type Object type: 'post' - post on user or community wall, 'comment' - comment on a wall + * post, 'photo' - photo, 'audio' - audio, 'video' - video, 'note' - note, 'photo_comment' - comment on + * the photo, 'video_comment' - comment on the video, 'topic_comment' - comment in the discussion, + * 'sitepage' - page of the site where the [vk.com/dev/Like|Like widget] is installed * @param itemId Object ID. minimum 0 * @param ownerId ID of the user or community that owns the object. * @param accessKey Access key required for an object owned by a private entity. @@ -50,7 +50,7 @@ class LikesDelete( private val itemId: Int, private val ownerId: Int? = null, private val accessKey: String? = null -) : VKRequest("likes.delete") { +) : ApiRequestBase(methodName = "likes.delete") { init { addParam("type", type) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesGetList.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesGetList.kt index 84a0e3841a..0069f43183 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesGetList.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesGetList.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.likes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.likes.dto.LikesGetListFilter import com.vk.sdk.api.likes.dto.LikesGetListFriendsOnly @@ -40,10 +40,10 @@ import org.json.JSONObject /** * Returns a list of IDs of users who added the specified object to their 'Likes' list. - * @param type , Object type: 'post' � post on user or community wall, 'comment' � comment on a wall - * post, 'photo' � photo, 'audio' � audio, 'video' � video, 'note' � note, 'photo_comment' � comment on - * the photo, 'video_comment' � comment on the video, 'topic_comment' � comment in the discussion, - * 'sitepage' � page of the site where the [vk.com/dev/Like|Like widget] is installed + * @param type , Object type: 'post' - post on user or community wall, 'comment' - comment on a wall + * post, 'photo' - photo, 'audio' - audio, 'video' - video, 'note' - note, 'photo_comment' - comment on + * the photo, 'video_comment' - comment on the video, 'topic_comment' - comment in the discussion, + * 'sitepage' - page of the site where the [vk.com/dev/Like|Like widget] is installed * @param ownerId ID of the user, community, or application that owns the object. If the 'type' * parameter is set as 'sitepage', the application ID is passed as 'owner_id'. Use negative value for a * community id. If the 'type' parameter is not set, the 'owner_id' is assumed to be either the current @@ -52,13 +52,13 @@ import org.json.JSONObject * parameter value used during initialization of the [vk.com/dev/Like|Like widget]. * @param pageUrl URL of the page where the [vk.com/dev/Like|Like widget] is installed. Used instead * of the 'item_id' parameter. - * @param filter Filters to apply: 'likes' � returns information about all users who liked the - * object (default), 'copies' � returns information only about users who told their friends about the + * @param filter Filters to apply: 'likes' - returns information about all users who liked the + * object (default), 'copies' - returns information only about users who told their friends about the * object - * @param friendsOnly Specifies which users are returned: '1' � to return only the current user's - * friends, '0' � to return all users (default) default 0 - * @param extended Specifies whether extended information will be returned. '1' � to return extended - * information about users and communities from the 'Likes' list, '0' � to return no additional + * @param friendsOnly Specifies which users are returned: '1' - to return only the current user's + * friends, '0' - to return all users (default) default 0 + * @param extended Specifies whether extended information will be returned. '1' - to return extended + * information about users and communities from the 'Likes' list, '0' - to return no additional * information (default) * @param offset Offset needed to select a specific subset of users. minimum 0 * @param count Number of user IDs to return (maximum '1000'). Default is '100' if 'friends_only' is @@ -76,7 +76,7 @@ class LikesGetList( private val offset: Int? = null, private val count: Int? = null, private val skipOwn: Boolean? = null -) : VKRequest("likes.getList") { +) : ApiRequestBase(methodName = "likes.getList") { init { addParam("type", type) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesGetListExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesGetListExtended.kt index 3771a339e0..887e542ee6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesGetListExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesGetListExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.likes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.likes.dto.LikesGetListExtendedResponseDto import com.vk.sdk.api.likes.dto.LikesGetListFilter @@ -40,10 +40,10 @@ import org.json.JSONObject /** * Returns a list of IDs of users who added the specified object to their 'Likes' list. - * @param type , Object type: 'post' � post on user or community wall, 'comment' � comment on a wall - * post, 'photo' � photo, 'audio' � audio, 'video' � video, 'note' � note, 'photo_comment' � comment on - * the photo, 'video_comment' � comment on the video, 'topic_comment' � comment in the discussion, - * 'sitepage' � page of the site where the [vk.com/dev/Like|Like widget] is installed + * @param type , Object type: 'post' - post on user or community wall, 'comment' - comment on a wall + * post, 'photo' - photo, 'audio' - audio, 'video' - video, 'note' - note, 'photo_comment' - comment on + * the photo, 'video_comment' - comment on the video, 'topic_comment' - comment in the discussion, + * 'sitepage' - page of the site where the [vk.com/dev/Like|Like widget] is installed * @param ownerId ID of the user, community, or application that owns the object. If the 'type' * parameter is set as 'sitepage', the application ID is passed as 'owner_id'. Use negative value for a * community id. If the 'type' parameter is not set, the 'owner_id' is assumed to be either the current @@ -52,13 +52,13 @@ import org.json.JSONObject * parameter value used during initialization of the [vk.com/dev/Like|Like widget]. * @param pageUrl URL of the page where the [vk.com/dev/Like|Like widget] is installed. Used instead * of the 'item_id' parameter. - * @param filter Filters to apply: 'likes' � returns information about all users who liked the - * object (default), 'copies' � returns information only about users who told their friends about the + * @param filter Filters to apply: 'likes' - returns information about all users who liked the + * object (default), 'copies' - returns information only about users who told their friends about the * object - * @param friendsOnly Specifies which users are returned: '1' � to return only the current user's - * friends, '0' � to return all users (default) default 0 - * @param extended Specifies whether extended information will be returned. '1' � to return extended - * information about users and communities from the 'Likes' list, '0' � to return no additional + * @param friendsOnly Specifies which users are returned: '1' - to return only the current user's + * friends, '0' - to return all users (default) default 0 + * @param extended Specifies whether extended information will be returned. '1' - to return extended + * information about users and communities from the 'Likes' list, '0' - to return no additional * information (default) * @param offset Offset needed to select a specific subset of users. minimum 0 * @param count Number of user IDs to return (maximum '1000'). Default is '100' if 'friends_only' is @@ -76,7 +76,7 @@ class LikesGetListExtended( private val offset: Int? = null, private val count: Int? = null, private val skipOwn: Boolean? = null -) : VKRequest("likes.getList") { +) : ApiRequestBase(methodName = "likes.getList") { init { addParam("type", type) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesIsLiked.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesIsLiked.kt index 5cb1f25df1..121b5654bf 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesIsLiked.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/likes/methods/LikesIsLiked.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.likes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.likes.dto.LikesIsLikedResponseDto import com.vk.sdk.api.likes.responses.LikesIsLikedResponse @@ -37,9 +37,9 @@ import org.json.JSONObject /** * Checks for the object in the 'Likes' list of the specified user. - * @param type Object type: 'post' � post on user or community wall, 'comment' � comment on a wall - * post, 'photo' � photo, 'audio' � audio, 'video' � video, 'note' � note, 'photo_comment' � comment on - * the photo, 'video_comment' � comment on the video, 'topic_comment' � comment in the discussion + * @param type Object type: 'post' - post on user or community wall, 'comment' - comment on a wall + * post, 'photo' - photo, 'audio' - audio, 'video' - video, 'note' - note, 'photo_comment' - comment on + * the photo, 'video_comment' - comment on the video, 'topic_comment' - comment in the discussion * @param itemId Object ID. minimum 0 * @param userId User ID. minimum 0 * @param ownerId ID of the user or community that owns the object. @@ -49,7 +49,7 @@ class LikesIsLiked( private val itemId: Int, private val userId: Int? = null, private val ownerId: Int? = null -) : VKRequest("likes.isLiked") { +) : ApiRequestBase(methodName = "likes.isLiked") { init { addParam("type", type) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAdd.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAdd.kt index 521498a52a..dc2d7a30ea 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAdd.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAdd.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketAddResponseDto import com.vk.sdk.api.market.responses.MarketAddResponse @@ -46,7 +46,7 @@ import org.json.JSONObject * @param categoryId Item category ID. minimum 0 * @param price Item price. minimum 0.01 * @param oldPrice minimum 0.01 - * @param deleted Item status ('1' � deleted, '0' � not deleted). + * @param deleted Item status ('1' - deleted, '0' - not deleted). * @param mainPhotoId Cover photo ID. minimum 0 * @param photoIds IDs of additional photos. * @param url Url for button in market item. minLength 0 maxLength 320 @@ -70,7 +70,7 @@ class MarketAdd( private val dimensionHeight: Int? = null, private val dimensionLength: Int? = null, private val weight: Int? = null -) : VKRequest("market.add") { +) : ApiRequestBase(methodName = "market.add") { init { addParam("owner_id", ownerId) addParam("name", name) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAddAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAddAlbum.kt index 262837c540..2feae50f8f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAddAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAddAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketAddAlbumResponseDto import com.vk.sdk.api.market.responses.MarketAddAlbumResponse @@ -41,14 +41,14 @@ import org.json.JSONObject * @param ownerId ID of an item owner community. * @param title Collection title. maxLength 128 * @param photoId Cover photo ID. minimum 0 - * @param mainAlbum Set as main ('1' � set, '0' � no). + * @param mainAlbum Set as main ('1' - set, '0' - no). */ class MarketAddAlbum( private val ownerId: Int, private val title: String, private val photoId: Int? = null, private val mainAlbum: Boolean? = null -) : VKRequest("market.addAlbum") { +) : ApiRequestBase(methodName = "market.addAlbum") { init { addParam("owner_id", ownerId) addParam("title", title) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAddToAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAddToAlbum.kt index 3f20d16d09..12cac0bcae 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAddToAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketAddToAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ class MarketAddToAlbum( private val ownerId: Int, private val itemId: Int, private val albumIds: List -) : VKRequest("market.addToAlbum") { +) : ApiRequestBase(methodName = "market.addToAlbum") { init { addParam("owner_id", ownerId) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketCreateComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketCreateComment.kt index a538c688cc..ff8bc68d11 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketCreateComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketCreateComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.responses.MarketCreateCommentResponse import kotlin.Boolean @@ -61,7 +61,7 @@ class MarketCreateComment( private val replyToComment: Int? = null, private val stickerId: Int? = null, private val guid: String? = null -) : VKRequest("market.createComment") { +) : ApiRequestBase(methodName = "market.createComment") { init { addParam("owner_id", ownerId) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDelete.kt index 4175e0a8cd..a1d3a9e874 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class MarketDelete( private val ownerId: Int, private val itemId: Int -) : VKRequest("market.delete") { +) : ApiRequestBase(methodName = "market.delete") { init { addParam("owner_id", ownerId) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDeleteAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDeleteAlbum.kt index 03d08c33a2..08c9d6aa0c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDeleteAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDeleteAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class MarketDeleteAlbum( private val ownerId: Int, private val albumId: Int -) : VKRequest("market.deleteAlbum") { +) : ApiRequestBase(methodName = "market.deleteAlbum") { init { addParam("owner_id", ownerId) addParam("album_id", albumId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDeleteComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDeleteComment.kt index f49cc58606..f1590ab5d7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDeleteComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketDeleteComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.market.responses.MarketDeleteCommentResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class MarketDeleteComment( private val ownerId: Int, private val commentId: Int -) : VKRequest("market.deleteComment") { +) : ApiRequestBase(methodName = "market.deleteComment") { init { addParam("owner_id", ownerId) addParam("comment_id", commentId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEdit.kt index 0f202724cc..d9325323d1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -47,7 +47,7 @@ import org.json.JSONObject * @param categoryId Item category ID. minimum 0 * @param price Item price. minimum 0.01 * @param mainPhotoId Cover photo ID. minimum 0 - * @param deleted Item status ('1' � deleted, '0' � not deleted). + * @param deleted Item status ('1' - deleted, '0' - not deleted). * @param photoIds IDs of additional photos. * @param url Url for button in market item. minLength 0 maxLength 320 */ @@ -62,7 +62,7 @@ class MarketEdit( private val deleted: Boolean? = null, private val photoIds: List? = null, private val url: String? = null -) : VKRequest("market.edit") { +) : ApiRequestBase(methodName = "market.edit") { init { addParam("owner_id", ownerId) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditAlbum.kt index 5f155d73d7..a7da2b93fd 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject * @param albumId Collection ID. minimum 0 * @param title Collection title. maxLength 128 * @param photoId Cover photo id minimum 0 - * @param mainAlbum Set as main ('1' � set, '0' � no). + * @param mainAlbum Set as main ('1' - set, '0' - no). */ class MarketEditAlbum( private val ownerId: Int, @@ -50,7 +50,7 @@ class MarketEditAlbum( private val title: String, private val photoId: Int? = null, private val mainAlbum: Boolean? = null -) : VKRequest("market.editAlbum") { +) : ApiRequestBase(methodName = "market.editAlbum") { init { addParam("owner_id", ownerId) addParam("album_id", albumId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditComment.kt index a864a14acb..0c00575982 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -53,7 +53,7 @@ class MarketEditComment( private val commentId: Int, private val message: String? = null, private val attachments: List? = null -) : VKRequest("market.editComment") { +) : ApiRequestBase(methodName = "market.editComment") { init { addParam("owner_id", ownerId) addParam("comment_id", commentId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditOrder.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditOrder.kt index 59b6c8491e..758f38fe27 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditOrder.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketEditOrder.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketEditOrderResponseDto import com.vk.sdk.api.market.responses.MarketEditOrderResponse @@ -47,7 +47,7 @@ class MarketEditOrder( private val orderId: Int, private val merchantComment: String? = null, private val status: Int? = null -) : VKRequest("market.editOrder") { +) : ApiRequestBase(methodName = "market.editOrder") { init { addParam("user_id", userId) addParam("order_id", orderId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGet.kt index 1f4fc03810..1b8f5f43c9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetResponseDto import com.vk.sdk.api.market.responses.MarketGetResponse @@ -43,7 +43,7 @@ import org.json.JSONObject * @param albumId default 0 minimum 0 * @param count Number of items to return. default 100 minimum 0 maximum 200 * @param offset Offset needed to return a specific subset of results. minimum 0 - * @param extended '1' � method will return additional fields: 'likes, can_comment, car_repost, + * @param extended '1' - method will return additional fields: 'likes, can_comment, car_repost, * photos'. These parameters are not returned by default. */ class MarketGet( @@ -52,7 +52,7 @@ class MarketGet( private val count: Int? = null, private val offset: Int? = null, private val extended: Boolean? = null -) : VKRequest("market.get") { +) : ApiRequestBase(methodName = "market.get") { init { addParam("owner_id", ownerId) albumId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetAlbumById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetAlbumById.kt index f09b4e352a..62e26a76d2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetAlbumById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetAlbumById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetAlbumByIdResponseDto import com.vk.sdk.api.market.responses.MarketGetAlbumByIdResponse @@ -45,7 +45,7 @@ import org.json.JSONObject class MarketGetAlbumById( private val ownerId: Int, private val albumIds: List -) : VKRequest("market.getAlbumById") { +) : ApiRequestBase(methodName = "market.getAlbumById") { init { addParam("owner_id", ownerId) addParam("album_ids", albumIds) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetAlbums.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetAlbums.kt index 227c3c679a..760d679ffc 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetAlbums.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetAlbums.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetAlbumsResponseDto import com.vk.sdk.api.market.responses.MarketGetAlbumsResponse @@ -44,7 +44,7 @@ class MarketGetAlbums( private val ownerId: Int, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("market.getAlbums") { +) : ApiRequestBase(methodName = "market.getAlbums") { init { addParam("owner_id", ownerId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetById.kt index bcf68741b0..7994795977 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetByIdResponseDto import com.vk.sdk.api.market.responses.MarketGetByIdResponse @@ -41,13 +41,13 @@ import org.json.JSONObject * @param itemIds Comma-separated ids list: {user id}_{item id}. If an item belongs to a * community -{community id} is used. " 'Videos' value example: , '-4363_136089719,13245770_137352259'" * - * @param extended '1' � to return additional fields: 'likes, can_comment, car_repost, photos'. By + * @param extended '1' - to return additional fields: 'likes, can_comment, car_repost, photos'. By * default: '0'. */ class MarketGetById( private val itemIds: List, private val extended: Boolean? = null -) : VKRequest("market.getById") { +) : ApiRequestBase(methodName = "market.getById") { init { addParam("item_ids", itemIds) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetByIdExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetByIdExtended.kt index 0b47def3cb..ece2bea6f4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetByIdExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetByIdExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetByIdExtendedResponseDto import com.vk.sdk.api.market.responses.MarketGetByIdExtendedResponse @@ -41,13 +41,13 @@ import org.json.JSONObject * @param itemIds Comma-separated ids list: {user id}_{item id}. If an item belongs to a * community -{community id} is used. " 'Videos' value example: , '-4363_136089719,13245770_137352259'" * - * @param extended '1' � to return additional fields: 'likes, can_comment, car_repost, photos'. By + * @param extended '1' - to return additional fields: 'likes, can_comment, car_repost, photos'. By * default: '0'. */ class MarketGetByIdExtended( private val itemIds: List, private val extended: Boolean? = null -) : VKRequest("market.getById") { +) : ApiRequestBase(methodName = "market.getById") { init { addParam("item_ids", itemIds) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetCategories.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetCategories.kt index 12f835df15..acf3420136 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetCategories.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetCategories.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetCategoriesResponseDto import com.vk.sdk.api.market.responses.MarketGetCategoriesResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class MarketGetCategories( private val count: Int? = null, private val offset: Int? = null -) : VKRequest("market.getCategories") { +) : ApiRequestBase(methodName = "market.getCategories") { init { count?.let { value -> addParam("count", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetComments.kt index 001da7b91b..4e0855afe5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetCommentsResponseDto import com.vk.sdk.api.market.dto.MarketGetCommentsSort @@ -42,12 +42,12 @@ import org.json.JSONObject * Returns comments list for an item. * @param ownerId ID of an item owner community * @param itemId Item ID. minimum 0 - * @param needLikes '1' � to return likes info. + * @param needLikes '1' - to return likes info. * @param startCommentId ID of a comment to start a list from (details below). minimum 0 * @param offset default 0 minimum 0 * @param count Number of results to return. default 20 minimum 0 maximum 100 - * @param sort Sort order ('asc' � from old to new, 'desc' � from new to old) default "asc" - * @param extended '1' � comments will be returned as numbered objects, in addition lists of + * @param sort Sort order ('asc' - from old to new, 'desc' - from new to old) default "asc" + * @param extended '1' - comments will be returned as numbered objects, in addition lists of * 'profiles' and 'groups' objects will be returned. * @param fields List of additional profile fields to return. See the [vk.com/dev/fields|details] */ @@ -61,7 +61,7 @@ class MarketGetComments( private val sort: MarketGetCommentsSort? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("market.getComments") { +) : ApiRequestBase(methodName = "market.getComments") { init { addParam("owner_id", ownerId) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetExtended.kt index 2f029fc5da..318f4ba6a2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetExtendedResponseDto import com.vk.sdk.api.market.responses.MarketGetExtendedResponse @@ -43,7 +43,7 @@ import org.json.JSONObject * @param albumId default 0 minimum 0 * @param count Number of items to return. default 100 minimum 0 maximum 200 * @param offset Offset needed to return a specific subset of results. minimum 0 - * @param extended '1' � method will return additional fields: 'likes, can_comment, car_repost, + * @param extended '1' - method will return additional fields: 'likes, can_comment, car_repost, * photos'. These parameters are not returned by default. */ class MarketGetExtended( @@ -52,7 +52,7 @@ class MarketGetExtended( private val count: Int? = null, private val offset: Int? = null, private val extended: Boolean? = null -) : VKRequest("market.get") { +) : ApiRequestBase(methodName = "market.get") { init { addParam("owner_id", ownerId) albumId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetGroupOrders.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetGroupOrders.kt index 5b00401905..2556939d0e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetGroupOrders.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetGroupOrders.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetGroupOrdersResponseDto import com.vk.sdk.api.market.responses.MarketGetGroupOrdersResponse @@ -44,7 +44,7 @@ class MarketGetGroupOrders( private val groupId: Int, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("market.getGroupOrders") { +) : ApiRequestBase(methodName = "market.getGroupOrders") { init { addParam("group_id", groupId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrderById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrderById.kt index a2732ab1be..9abef38a12 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrderById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrderById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetOrderByIdResponseDto import com.vk.sdk.api.market.responses.MarketGetOrderByIdResponse @@ -45,7 +45,7 @@ class MarketGetOrderById( private val orderId: Int, private val userId: Int? = null, private val extended: Boolean? = null -) : VKRequest("market.getOrderById") { +) : ApiRequestBase(methodName = "market.getOrderById") { init { addParam("order_id", orderId) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrderItems.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrderItems.kt index 549d63c476..856b578bfc 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrderItems.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrderItems.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetOrderItemsResponseDto import com.vk.sdk.api.market.responses.MarketGetOrderItemsResponse @@ -44,7 +44,7 @@ class MarketGetOrderItems( private val orderId: Int, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("market.getOrderItems") { +) : ApiRequestBase(methodName = "market.getOrderItems") { init { addParam("order_id", orderId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrders.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrders.kt index cf307763b2..eb262edea4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrders.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrders.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetOrdersResponseDto import com.vk.sdk.api.market.responses.MarketGetOrdersResponse @@ -44,7 +44,7 @@ class MarketGetOrders( private val offset: Int? = null, private val count: Int? = null, private val extended: Boolean? = null -) : VKRequest("market.getOrders") { +) : ApiRequestBase(methodName = "market.getOrders") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrdersExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrdersExtended.kt index 2eab31b3ae..0cb5960876 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrdersExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketGetOrdersExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketGetOrdersExtendedResponseDto import com.vk.sdk.api.market.responses.MarketGetOrdersExtendedResponse @@ -44,7 +44,7 @@ class MarketGetOrdersExtended( private val offset: Int? = null, private val count: Int? = null, private val extended: Boolean? = null -) : VKRequest("market.getOrders") { +) : ApiRequestBase(methodName = "market.getOrders") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRemoveFromAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRemoveFromAlbum.kt index a744b56c30..bf9d529135 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRemoveFromAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRemoveFromAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ class MarketRemoveFromAlbum( private val ownerId: Int, private val itemId: Int, private val albumIds: List -) : VKRequest("market.removeFromAlbum") { +) : ApiRequestBase(methodName = "market.removeFromAlbum") { init { addParam("owner_id", ownerId) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReorderAlbums.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReorderAlbums.kt index cca00ed6d9..6afdfe063f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReorderAlbums.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReorderAlbums.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -46,7 +46,7 @@ class MarketReorderAlbums( private val albumId: Int, private val before: Int? = null, private val after: Int? = null -) : VKRequest("market.reorderAlbums") { +) : ApiRequestBase(methodName = "market.reorderAlbums") { init { addParam("owner_id", ownerId) addParam("album_id", albumId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReorderItems.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReorderItems.kt index a3c2b56637..d69d0e4b54 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReorderItems.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReorderItems.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -48,7 +48,7 @@ class MarketReorderItems( private val albumId: Int? = null, private val before: Int? = null, private val after: Int? = null -) : VKRequest("market.reorderItems") { +) : ApiRequestBase(methodName = "market.reorderItems") { init { addParam("owner_id", ownerId) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReport.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReport.kt index ecc7e613a2..05be2aa6f0 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReport.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReport.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,15 +39,15 @@ import org.json.JSONObject * Sends a complaint to the item. * @param ownerId ID of an item owner community. * @param itemId Item ID. minimum 0 - * @param reason Complaint reason. Possible values: *'0' � spam,, *'1' � child porn,, *'2' � - * extremism,, *'3' � violence,, *'4' � drugs propaganda,, *'5' � adult materials,, *'6' � insult. + * @param reason Complaint reason. Possible values: *'0' - spam,, *'1' - child porn,, *'2' - + * extremism,, *'3' - violence,, *'4' - drugs propaganda,, *'5' - adult materials,, *'6' - insult. * default 0 minimum 0 */ class MarketReport( private val ownerId: Int, private val itemId: Int, private val reason: MarketReportReason? = null -) : VKRequest("market.report") { +) : ApiRequestBase(methodName = "market.report") { init { addParam("owner_id", ownerId) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReportComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReportComment.kt index 8fcae9dbc0..7d034b7003 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReportComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketReportComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,15 +39,15 @@ import org.json.JSONObject * Sends a complaint to the item's comment. * @param ownerId ID of an item owner community. * @param commentId Comment ID. minimum 0 - * @param reason Complaint reason. Possible values: *'0' � spam,, *'1' � child porn,, *'2' � - * extremism,, *'3' � violence,, *'4' � drugs propaganda,, *'5' � adult materials,, *'6' � insult. + * @param reason Complaint reason. Possible values: *'0' - spam,, *'1' - child porn,, *'2' - + * extremism,, *'3' - violence,, *'4' - drugs propaganda,, *'5' - adult materials,, *'6' - insult. * minimum 0 */ class MarketReportComment( private val ownerId: Int, private val commentId: Int, private val reason: MarketReportCommentReason -) : VKRequest("market.reportComment") { +) : ApiRequestBase(methodName = "market.reportComment") { init { addParam("owner_id", ownerId) addParam("comment_id", commentId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRestore.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRestore.kt index 5de9626419..56b2aacba2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRestore.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRestore.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class MarketRestore( private val ownerId: Int, private val itemId: Int -) : VKRequest("market.restore") { +) : ApiRequestBase(methodName = "market.restore") { init { addParam("owner_id", ownerId) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRestoreComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRestoreComment.kt index ef4ff153e3..43c158499d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRestoreComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketRestoreComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.market.responses.MarketRestoreCommentResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class MarketRestoreComment( private val ownerId: Int, private val commentId: Int -) : VKRequest("market.restoreComment") { +) : ApiRequestBase(methodName = "market.restoreComment") { init { addParam("owner_id", ownerId) addParam("comment_id", commentId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketSearch.kt index 52826cb9fc..66881714d0 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketSearchResponseDto import com.vk.sdk.api.market.dto.MarketSearchRev @@ -47,10 +47,10 @@ import org.json.JSONObject * @param priceFrom Minimum item price value. minimum 0 * @param priceTo Maximum item price value. minimum 0 * @param sort default 0 - * @param rev '0' � do not use reverse order, '1' � use reverse order default 1 minimum 0 + * @param rev '0' - do not use reverse order, '1' - use reverse order default 1 minimum 0 * @param offset Offset needed to return a specific subset of results. minimum 0 * @param count Number of items to return. default 20 minimum 0 maximum 200 - * @param extended '1' � to return additional fields: 'likes, can_comment, car_repost, photos'. By + * @param extended '1' - to return additional fields: 'likes, can_comment, car_repost, photos'. By * default: '0'. default "0" * @param status default 0 minimum 0 */ @@ -66,7 +66,7 @@ class MarketSearch( private val count: Int? = null, private val extended: Boolean? = null, private val status: MarketSearchStatus? = null -) : VKRequest("market.search") { +) : ApiRequestBase(methodName = "market.search") { init { addParam("owner_id", ownerId) albumId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketSearchExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketSearchExtended.kt index 340f444d8f..01b81c679b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketSearchExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/market/methods/MarketSearchExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.market.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.market.dto.MarketSearchExtendedResponseDto import com.vk.sdk.api.market.dto.MarketSearchRev @@ -47,10 +47,10 @@ import org.json.JSONObject * @param priceFrom Minimum item price value. minimum 0 * @param priceTo Maximum item price value. minimum 0 * @param sort default 0 - * @param rev '0' � do not use reverse order, '1' � use reverse order default 1 minimum 0 + * @param rev '0' - do not use reverse order, '1' - use reverse order default 1 minimum 0 * @param offset Offset needed to return a specific subset of results. minimum 0 * @param count Number of items to return. default 20 minimum 0 maximum 200 - * @param extended '1' � to return additional fields: 'likes, can_comment, car_repost, photos'. By + * @param extended '1' - to return additional fields: 'likes, can_comment, car_repost, photos'. By * default: '0'. default "0" * @param status default 0 minimum 0 */ @@ -66,7 +66,7 @@ class MarketSearchExtended( private val count: Int? = null, private val extended: Boolean? = null, private val status: MarketSearchStatus? = null -) : VKRequest("market.search") { +) : ApiRequestBase(methodName = "market.search") { init { addParam("owner_id", ownerId) albumId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesAddChatUser.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesAddChatUser.kt index 81fc331abb..352d396050 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesAddChatUser.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesAddChatUser.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class MessagesAddChatUser( private val chatId: Int, private val userId: Int? = null, private val visibleMessagesCount: Int? = null -) : VKRequest("messages.addChatUser") { +) : ApiRequestBase(methodName = "messages.addChatUser") { init { addParam("chat_id", chatId) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesAllowMessagesFromGroup.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesAllowMessagesFromGroup.kt index 477914ade0..b5bd164299 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesAllowMessagesFromGroup.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesAllowMessagesFromGroup.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class MessagesAllowMessagesFromGroup( private val groupId: Int, private val key: String? = null -) : VKRequest("messages.allowMessagesFromGroup") { +) : ApiRequestBase(methodName = "messages.allowMessagesFromGroup") { init { addParam("group_id", groupId) key?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesCreateChat.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesCreateChat.kt index 7ff08f96e8..569728c4f2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesCreateChat.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesCreateChat.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.responses.MessagesCreateChatResponse import kotlin.Int @@ -45,7 +45,7 @@ class MessagesCreateChat( private val userIds: List? = null, private val title: String? = null, private val groupId: Int? = null -) : VKRequest("messages.createChat") { +) : ApiRequestBase(methodName = "messages.createChat") { init { userIds?.let { value -> addParam("user_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDelete.kt index ef526fdb30..32de8b8d46 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.messages.responses.MessagesDeleteResponse @@ -40,16 +40,16 @@ import org.json.JSONObject /** * Deletes one or more messages. * @param messageIds Message IDs. - * @param spam '1' � to mark message as spam. + * @param spam '1' - to mark message as spam. * @param groupId Group ID (for group messages with user access token) minimum 0 - * @param deleteForAll '1' � delete message for for all. default false + * @param deleteForAll '1' - delete message for for all. default false */ class MessagesDelete( private val messageIds: List? = null, private val spam: Boolean? = null, private val groupId: Int? = null, private val deleteForAll: Boolean? = null -) : VKRequest>("messages.delete") { +) : ApiRequestBase>(methodName = "messages.delete") { init { messageIds?.let { value -> addParam("message_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDeleteChatPhoto.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDeleteChatPhoto.kt index 82ac45987e..d2094af842 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDeleteChatPhoto.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDeleteChatPhoto.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesDeleteChatPhotoResponseDto import com.vk.sdk.api.messages.responses.MessagesDeleteChatPhotoResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class MessagesDeleteChatPhoto( private val chatId: Int, private val groupId: Int? = null -) : VKRequest("messages.deleteChatPhoto") { +) : ApiRequestBase(methodName = "messages.deleteChatPhoto") { init { addParam("chat_id", chatId) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDeleteConversation.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDeleteConversation.kt index 909f65f388..265f2a869e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDeleteConversation.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDeleteConversation.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesDeleteConversationResponseDto import com.vk.sdk.api.messages.responses.MessagesDeleteConversationResponse @@ -45,7 +45,8 @@ class MessagesDeleteConversation( private val userId: Int? = null, private val peerId: Int? = null, private val groupId: Int? = null -) : VKRequest("messages.deleteConversation") { +) : ApiRequestBase(methodName = + "messages.deleteConversation") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDenyMessagesFromGroup.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDenyMessagesFromGroup.kt index c0a259868a..610e75f37a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDenyMessagesFromGroup.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesDenyMessagesFromGroup.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class MessagesDenyMessagesFromGroup( private val groupId: Int -) : VKRequest("messages.denyMessagesFromGroup") { +) : ApiRequestBase(methodName = "messages.denyMessagesFromGroup") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesEdit.kt index 90659ad353..cf210a88b5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.messages.responses.MessagesEditResponse @@ -45,12 +45,12 @@ import org.json.JSONObject * @param lat Geographical latitude of a check-in, in degrees (from -90 to 90). * @param long Geographical longitude of a check-in, in degrees (from -180 to 180). * @param attachment (Required if 'message' is not set.) List of objects attached to the message, - * separated by commas, in the following format: "_", '' � Type of media - * attachment: 'photo' � photo, 'video' � video, 'audio' � audio, 'doc' � document, 'wall' � wall post, - * '' � ID of the media attachment owner. '' � media attachment ID. Example: + * separated by commas, in the following format: "_", '' - Type of media + * attachment: 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, 'wall' - wall post, + * '' - ID of the media attachment owner. '' - media attachment ID. Example: * "photo100172_166443618" - * @param keepForwardMessages '1' � to keep forwarded, messages. - * @param keepSnippets '1' � to keep attached snippets. + * @param keepForwardMessages '1' - to keep forwarded, messages. + * @param keepSnippets '1' - to keep attached snippets. * @param groupId Group ID (for group messages with user access token) minimum 0 * @param dontParseLinks default false * @param messageId minimum 0 @@ -72,7 +72,7 @@ class MessagesEdit( private val conversationMessageId: Int? = null, private val template: String? = null, private val keyboard: String? = null -) : VKRequest("messages.edit") { +) : ApiRequestBase(methodName = "messages.edit") { init { addParam("peer_id", peerId) message?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesEditChat.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesEditChat.kt index 8f2b7f8008..fdbbe76975 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesEditChat.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesEditChat.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class MessagesEditChat( private val chatId: Int, private val title: String? = null -) : VKRequest("messages.editChat") { +) : ApiRequestBase(methodName = "messages.editChat") { init { addParam("chat_id", chatId) title?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetByConversationMessageId.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetByConversationMessageId.kt index 6a0c7fe21f..13aa32e618 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetByConversationMessageId.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetByConversationMessageId.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesGetByConversationMessageIdResponseDto import com.vk.sdk.api.messages.responses.MessagesGetByConversationMessageIdResponse @@ -52,8 +52,8 @@ class MessagesGetByConversationMessageId( private val extended: Boolean? = null, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.getByConversationMessageId") - { +) : ApiRequestBase(methodName = + "messages.getByConversationMessageId") { init { addParam("peer_id", peerId) addParam("conversation_message_ids", conversationMessageIds) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetById.kt index b2e12bc59b..f421eeb4df 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesGetByIdResponseDto import com.vk.sdk.api.messages.responses.MessagesGetByIdResponse @@ -53,7 +53,7 @@ class MessagesGetById( private val extended: Boolean? = null, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.getById") { +) : ApiRequestBase(methodName = "messages.getById") { init { addParam("message_ids", messageIds) previewLength?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetByIdExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetByIdExtended.kt index 13f6bf822c..e55c94456b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetByIdExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetByIdExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesGetByIdExtendedResponseDto import com.vk.sdk.api.messages.responses.MessagesGetByIdExtendedResponse @@ -53,7 +53,7 @@ class MessagesGetByIdExtended( private val extended: Boolean? = null, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.getById") { +) : ApiRequestBase(methodName = "messages.getById") { init { addParam("message_ids", messageIds) previewLength?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetChatPreview.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetChatPreview.kt index 4300861033..756e0bd69f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetChatPreview.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetChatPreview.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesGetChatPreviewResponseDto import com.vk.sdk.api.messages.responses.MessagesGetChatPreviewResponse @@ -46,7 +46,7 @@ class MessagesGetChatPreview( private val peerId: Int? = null, private val link: String? = null, private val fields: List? = null -) : VKRequest("messages.getChatPreview") { +) : ApiRequestBase(methodName = "messages.getChatPreview") { init { peerId?.let { value -> addParam("peer_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationMembers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationMembers.kt index f1b97d6f2b..cc0ef7396f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationMembers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationMembers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesGetConversationMembersResponseDto import com.vk.sdk.api.messages.responses.MessagesGetConversationMembersResponse @@ -46,7 +46,8 @@ class MessagesGetConversationMembers( private val peerId: Int, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.getConversationMembers") { +) : ApiRequestBase(methodName = + "messages.getConversationMembers") { init { addParam("peer_id", peerId) fields?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversations.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversations.kt index 2d3f791e4e..56730a5117 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversations.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversations.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.messages.dto.MessagesGetConversationsFilter @@ -42,10 +42,10 @@ import org.json.JSONObject * Returns a list of the current user's conversations. * @param offset Offset needed to return a specific subset of conversations. default 0 minimum 0 * @param count Number of conversations to return. default 20 minimum 0 maximum 200 - * @param filter Filter to apply: 'all' � all conversations, 'unread' � conversations with unread - * messages, 'important' � conversations, marked as important (only for community messages), - * 'unanswered' � conversations, marked as unanswered (only for community messages) default "all" - * @param extended '1' � return extra information about users and communities + * @param filter Filter to apply: 'all' - all conversations, 'unread' - conversations with unread + * messages, 'important' - conversations, marked as important (only for community messages), + * 'unanswered' - conversations, marked as unanswered (only for community messages) default "all" + * @param extended '1' - return extra information about users and communities * @param startMessageId ID of the message from what to return dialogs. minimum 0 * @param fields Profile and communities fields to return. * @param groupId Group ID (for group messages with group access token) minimum 0 @@ -58,7 +58,7 @@ class MessagesGetConversations( private val startMessageId: Int? = null, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.getConversations") { +) : ApiRequestBase(methodName = "messages.getConversations") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationsById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationsById.kt index 5ad8978e4f..af06a4f7da 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationsById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationsById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.messages.dto.MessagesGetConversationsByIdResponseDto @@ -50,7 +50,8 @@ class MessagesGetConversationsById( private val extended: Boolean? = null, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.getConversationsById") { +) : ApiRequestBase(methodName = + "messages.getConversationsById") { init { addParam("peer_ids", peerIds) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationsByIdExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationsByIdExtended.kt index 15162bb520..791601675f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationsByIdExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetConversationsByIdExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.messages.dto.MessagesGetConversationsByIdExtendedResponseDto @@ -50,7 +50,8 @@ class MessagesGetConversationsByIdExtended( private val extended: Boolean? = null, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.getConversationsById") { +) : ApiRequestBase(methodName = + "messages.getConversationsById") { init { addParam("peer_ids", peerIds) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetHistory.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetHistory.kt index 6f7730ddbc..0fbb8247b2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetHistory.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetHistory.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesGetHistoryResponseDto import com.vk.sdk.api.messages.dto.MessagesGetHistoryRev @@ -45,7 +45,7 @@ import org.json.JSONObject * @param userId ID of the user whose message history you want to return. * @param peerId * @param startMessageId Starting message ID from which to return history. minimum 0 - * @param rev Sort order: '1' � return messages in chronological order. '0' � return messages in + * @param rev Sort order: '1' - return messages in chronological order. '0' - return messages in * reverse chronological order. * @param extended Information whether the response should be extended * @param fields Profile fields to return. @@ -61,7 +61,7 @@ class MessagesGetHistory( private val extended: Boolean? = null, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.getHistory") { +) : ApiRequestBase(methodName = "messages.getHistory") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetHistoryAttachments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetHistoryAttachments.kt index d35ad001e1..95330f7660 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetHistoryAttachments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetHistoryAttachments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesGetHistoryAttachmentsMediaType import com.vk.sdk.api.messages.dto.MessagesGetHistoryAttachmentsResponseDto @@ -47,7 +47,7 @@ import org.json.JSONObject * *'link'.,*'market'.,*'wall'.,*'share' default "photo" * @param startFrom Message ID to start return results from. * @param count Number of objects to return. default 30 minimum 0 maximum 200 - * @param photoSizes '1' � to return photo sizes in a + * @param photoSizes '1' - to return photo sizes in a * @param fields Additional profile [vk.com/dev/fields|fields] to return. * @param groupId Group ID (for group messages with group access token) minimum 0 * @param preserveOrder @@ -63,7 +63,8 @@ class MessagesGetHistoryAttachments( private val groupId: Int? = null, private val preserveOrder: Boolean? = null, private val maxForwardsLevel: Int? = null -) : VKRequest("messages.getHistoryAttachments") { +) : ApiRequestBase(methodName = + "messages.getHistoryAttachments") { init { addParam("peer_id", peerId) mediaType?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetImportantMessages.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetImportantMessages.kt index ddda9b08fe..80f94c4a14 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetImportantMessages.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetImportantMessages.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.messages.dto.MessagesGetImportantMessagesResponseDto @@ -55,7 +55,8 @@ class MessagesGetImportantMessages( private val fields: List? = null, private val extended: Boolean? = null, private val groupId: Int? = null -) : VKRequest("messages.getImportantMessages") { +) : ApiRequestBase(methodName = + "messages.getImportantMessages") { init { count?.let { value -> addParam("count", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetImportantMessagesExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetImportantMessagesExtended.kt index 1818aeee4f..bc06251c0c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetImportantMessagesExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetImportantMessagesExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.messages.dto.MessagesGetImportantMessagesExtendedResponseDto @@ -55,7 +55,8 @@ class MessagesGetImportantMessagesExtended( private val fields: List? = null, private val extended: Boolean? = null, private val groupId: Int? = null -) : VKRequest("messages.getImportantMessages") { +) : ApiRequestBase(methodName = + "messages.getImportantMessages") { init { count?.let { value -> addParam("count", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetInviteLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetInviteLink.kt index 9e1dc387d3..6ee9543078 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetInviteLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetInviteLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesGetInviteLinkResponseDto import com.vk.sdk.api.messages.responses.MessagesGetInviteLinkResponse @@ -37,7 +37,7 @@ import org.json.JSONObject /** * @param peerId Destination ID. minimum 0 - * @param reset 1 � to generate new link (revoke previous), 0 � to return previous link. default + * @param reset 1 - to generate new link (revoke previous), 0 - to return previous link. default * false * @param groupId Group ID minimum 0 */ @@ -45,7 +45,7 @@ class MessagesGetInviteLink( private val peerId: Int, private val reset: Boolean? = null, private val groupId: Int? = null -) : VKRequest("messages.getInviteLink") { +) : ApiRequestBase(methodName = "messages.getInviteLink") { init { addParam("peer_id", peerId) reset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLastActivity.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLastActivity.kt index 4089ad3086..61d6d39a44 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLastActivity.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLastActivity.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesLastActivity import com.vk.sdk.api.messages.responses.MessagesGetLastActivityResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class MessagesGetLastActivity( private val userId: Int -) : VKRequest("messages.getLastActivity") { +) : ApiRequestBase(methodName = "messages.getLastActivity") { init { addParam("user_id", userId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLongPollHistory.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLongPollHistory.kt index b66b625e59..e9dcef2255 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLongPollHistory.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLongPollHistory.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesGetLongPollHistoryResponseDto import com.vk.sdk.api.messages.responses.MessagesGetLongPollHistoryResponse @@ -46,7 +46,7 @@ import org.json.JSONObject * @param previewLength Number of characters after which to truncate a previewed message. To preview * the full message, specify '0'. "NOTE: Messages are not truncated by default. Messages are truncated * by words." minimum 0 - * @param onlines '1' � to return history with online users only. + * @param onlines '1' - to return history with online users only. * @param fields Additional profile [vk.com/dev/fields|fields] to return. default * "photo,photo_medium_rec,sex,online,screen_name" * @param eventsLimit Maximum number of events to return. default 1000 minimum 1000 @@ -72,7 +72,8 @@ class MessagesGetLongPollHistory( private val lpVersion: Int? = null, private val lastN: Int? = null, private val credentials: Boolean? = null -) : VKRequest("messages.getLongPollHistory") { +) : ApiRequestBase(methodName = + "messages.getLongPollHistory") { init { ts?.let { value -> addParam("ts", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLongPollServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLongPollServer.kt index a07a4c25ac..bfab7b53c9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLongPollServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesGetLongPollServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesLongpollParams import com.vk.sdk.api.messages.responses.MessagesGetLongPollServerResponse @@ -37,7 +37,7 @@ import org.json.JSONObject /** * Returns data required for connection to a Long Poll server. - * @param needPts '1' � to return the 'pts' field, needed for the + * @param needPts '1' - to return the 'pts' field, needed for the * [vk.com/dev/messages.getLongPollHistory|messages.getLongPollHistory] method. * @param groupId Group ID (for group messages with user access token) minimum 0 * @param lpVersion Long poll version default 0 minimum 0 @@ -46,7 +46,7 @@ class MessagesGetLongPollServer( private val needPts: Boolean? = null, private val groupId: Int? = null, private val lpVersion: Int? = null -) : VKRequest("messages.getLongPollServer") { +) : ApiRequestBase(methodName = "messages.getLongPollServer") { init { needPts?.let { value -> addParam("need_pts", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesIsMessagesFromGroupAllowed.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesIsMessagesFromGroupAllowed.kt index e41aa0050c..3e4e021e4f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesIsMessagesFromGroupAllowed.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesIsMessagesFromGroupAllowed.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesIsMessagesFromGroupAllowedResponseDto import com.vk.sdk.api.messages.responses.MessagesIsMessagesFromGroupAllowedResponse @@ -42,8 +42,8 @@ import org.json.JSONObject class MessagesIsMessagesFromGroupAllowed( private val groupId: Int, private val userId: Int -) : VKRequest("messages.isMessagesFromGroupAllowed") - { +) : ApiRequestBase(methodName = + "messages.isMessagesFromGroupAllowed") { init { addParam("group_id", groupId) addParam("user_id", userId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesJoinChatByInviteLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesJoinChatByInviteLink.kt index 1e707dd1df..e06cd8755b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesJoinChatByInviteLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesJoinChatByInviteLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesJoinChatByInviteLinkResponseDto import com.vk.sdk.api.messages.responses.MessagesJoinChatByInviteLinkResponse @@ -39,7 +39,8 @@ import org.json.JSONObject */ class MessagesJoinChatByInviteLink( private val link: String -) : VKRequest("messages.joinChatByInviteLink") { +) : ApiRequestBase(methodName = + "messages.joinChatByInviteLink") { init { addParam("link", link) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsAnsweredConversation.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsAnsweredConversation.kt index 8538931097..70971ebac6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsAnsweredConversation.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsAnsweredConversation.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -38,14 +38,14 @@ import org.json.JSONObject /** * Marks and unmarks conversations as unanswered. * @param peerId ID of conversation to mark as important. - * @param answered '1' � to mark as answered, '0' � to remove the mark default 1 + * @param answered '1' - to mark as answered, '0' - to remove the mark default 1 * @param groupId Group ID (for group messages with group access token) minimum 0 */ class MessagesMarkAsAnsweredConversation( private val peerId: Int, private val answered: Boolean? = null, private val groupId: Int? = null -) : VKRequest("messages.markAsAnsweredConversation") { +) : ApiRequestBase(methodName = "messages.markAsAnsweredConversation") { init { addParam("peer_id", peerId) answered?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsImportant.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsImportant.kt index 9c5ab03b8b..ffa285d0c0 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsImportant.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsImportant.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.responses.MessagesMarkAsImportantResponse import kotlin.Int @@ -37,12 +37,12 @@ import org.json.JSONObject /** * Marks and unmarks messages as important (starred). * @param messageIds IDs of messages to mark as important. default [] - * @param important '1' � to add a star (mark as important), '0' � to remove the star minimum 0 + * @param important '1' - to add a star (mark as important), '0' - to remove the star minimum 0 */ class MessagesMarkAsImportant( private val messageIds: List? = null, private val important: Int? = null -) : VKRequest>("messages.markAsImportant") { +) : ApiRequestBase>(methodName = "messages.markAsImportant") { init { messageIds?.let { value -> addParam("message_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsImportantConversation.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsImportantConversation.kt index 75fc76b9bc..1a4ffeefed 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsImportantConversation.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsImportantConversation.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -38,14 +38,14 @@ import org.json.JSONObject /** * Marks and unmarks conversations as important. * @param peerId ID of conversation to mark as important. - * @param important '1' � to add a star (mark as important), '0' � to remove the star default 1 + * @param important '1' - to add a star (mark as important), '0' - to remove the star default 1 * @param groupId Group ID (for group messages with group access token) minimum 0 */ class MessagesMarkAsImportantConversation( private val peerId: Int, private val important: Boolean? = null, private val groupId: Int? = null -) : VKRequest("messages.markAsImportantConversation") { +) : ApiRequestBase(methodName = "messages.markAsImportantConversation") { init { addParam("peer_id", peerId) important?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsRead.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsRead.kt index 0337673b20..a0389aa618 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsRead.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesMarkAsRead.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -51,7 +51,7 @@ class MessagesMarkAsRead( private val startMessageId: Int? = null, private val groupId: Int? = null, private val markConversationAsRead: Boolean? = null -) : VKRequest("messages.markAsRead") { +) : ApiRequestBase(methodName = "messages.markAsRead") { init { messageIds?.let { value -> addParam("message_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesPin.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesPin.kt index fa5660efa1..21c54717a4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesPin.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesPin.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesPinnedMessage import com.vk.sdk.api.messages.responses.MessagesPinResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class MessagesPin( private val peerId: Int, private val messageId: Int? = null -) : VKRequest("messages.pin") { +) : ApiRequestBase(methodName = "messages.pin") { init { addParam("peer_id", peerId) messageId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesRemoveChatUser.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesRemoveChatUser.kt index bf61f95f95..44114d019a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesRemoveChatUser.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesRemoveChatUser.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ class MessagesRemoveChatUser( private val chatId: Int, private val userId: Int? = null, private val memberId: Int? = null -) : VKRequest("messages.removeChatUser") { +) : ApiRequestBase(methodName = "messages.removeChatUser") { init { addParam("chat_id", chatId) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesRestore.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesRestore.kt index 94fc9e6751..27aaf99b2c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesRestore.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesRestore.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class MessagesRestore( private val messageId: Int, private val groupId: Int? = null -) : VKRequest("messages.restore") { +) : ApiRequestBase(methodName = "messages.restore") { init { addParam("message_id", messageId) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSearch.kt index c1bd740e46..e0e5a5c1b6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesSearchResponseDto import com.vk.sdk.api.messages.responses.MessagesSearchResponse @@ -62,7 +62,7 @@ class MessagesSearch( private val extended: Boolean? = null, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.search") { +) : ApiRequestBase(methodName = "messages.search") { init { q?.let { value -> addParam("q", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSearchConversations.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSearchConversations.kt index 1c68fa525c..4107cb4a85 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSearchConversations.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSearchConversations.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesSearchConversationsResponseDto import com.vk.sdk.api.messages.responses.MessagesSearchConversationsResponse @@ -42,7 +42,7 @@ import org.json.JSONObject * Returns a list of the current user's conversations that match search criteria. * @param q Search query string. * @param count Maximum number of results. default 20 minimum 0 - * @param extended '1' � return extra information about users and communities + * @param extended '1' - return extra information about users and communities * @param fields Profile fields to return. * @param groupId Group ID (for group messages with user access token) minimum 0 */ @@ -52,7 +52,8 @@ class MessagesSearchConversations( private val extended: Boolean? = null, private val fields: List? = null, private val groupId: Int? = null -) : VKRequest("messages.searchConversations") { +) : ApiRequestBase(methodName = + "messages.searchConversations") { init { q?.let { value -> addParam("q", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSend.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSend.kt index 416ca4fbfe..b287feb47b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSend.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSend.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesSendIntent import com.vk.sdk.api.messages.responses.MessagesSendResponse @@ -40,7 +40,7 @@ import org.json.JSONObject /** * Sends a message. - * @param userId User ID (by default � current user). + * @param userId User ID (by default - current user). * @param randomId Unique identifier to avoid resending the message. * @param peerId Destination ID. "For user: 'User ID', e.g. '12345'. For chat: '2000000000' + * 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. " @@ -51,9 +51,9 @@ import org.json.JSONObject * @param lat Geographical latitude of a check-in, in degrees (from -90 to 90). * @param long Geographical longitude of a check-in, in degrees (from -180 to 180). * @param attachment (Required if 'message' is not set.) List of objects attached to the message, - * separated by commas, in the following format: "_", '' � Type of media - * attachment: 'photo' � photo, 'video' � video, 'audio' � audio, 'doc' � document, 'wall' � wall post, - * '' � ID of the media attachment owner. '' � media attachment ID. Example: + * separated by commas, in the following format: "_", '' - Type of media + * attachment: 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, 'wall' - wall post, + * '' - ID of the media attachment owner. '' - media attachment ID. Example: * "photo100172_166443618" * @param replyTo * @param forwardMessages ID of forwarded messages, separated with a comma. Listed messages of the @@ -90,7 +90,7 @@ class MessagesSend( private val disableMentions: Boolean? = null, private val intent: MessagesSendIntent? = null, private val subscribeId: Int? = null -) : VKRequest("messages.send") { +) : ApiRequestBase(methodName = "messages.send") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSendMessageEventAnswer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSendMessageEventAnswer.kt index 20c1408a30..f22787d426 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSendMessageEventAnswer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSendMessageEventAnswer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -46,7 +46,7 @@ class MessagesSendMessageEventAnswer( private val userId: Int, private val peerId: Int, private val eventData: String? = null -) : VKRequest("messages.sendMessageEventAnswer") { +) : ApiRequestBase(methodName = "messages.sendMessageEventAnswer") { init { addParam("event_id", eventId) addParam("user_id", userId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSendUserids.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSendUserids.kt index a6c153e71e..ad1ce30e6d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSendUserids.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSendUserids.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesSendIntent import com.vk.sdk.api.messages.responses.MessagesSendUserIdsResponse @@ -41,7 +41,7 @@ import org.json.JSONObject /** * Sends a message. - * @param userId User ID (by default � current user). + * @param userId User ID (by default - current user). * @param randomId Unique identifier to avoid resending the message. * @param peerId Destination ID. "For user: 'User ID', e.g. '12345'. For chat: '2000000000' + * 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. " @@ -52,9 +52,9 @@ import org.json.JSONObject * @param lat Geographical latitude of a check-in, in degrees (from -90 to 90). * @param long Geographical longitude of a check-in, in degrees (from -180 to 180). * @param attachment (Required if 'message' is not set.) List of objects attached to the message, - * separated by commas, in the following format: "_", '' � Type of media - * attachment: 'photo' � photo, 'video' � video, 'audio' � audio, 'doc' � document, 'wall' � wall post, - * '' � ID of the media attachment owner. '' � media attachment ID. Example: + * separated by commas, in the following format: "_", '' - Type of media + * attachment: 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, 'wall' - wall post, + * '' - ID of the media attachment owner. '' - media attachment ID. Example: * "photo100172_166443618" * @param replyTo * @param forwardMessages ID of forwarded messages, separated with a comma. Listed messages of the @@ -91,7 +91,7 @@ class MessagesSendUserids( private val disableMentions: Boolean? = null, private val intent: MessagesSendIntent? = null, private val subscribeId: Int? = null -) : VKRequest>("messages.send") { +) : ApiRequestBase>(methodName = "messages.send") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSetActivity.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSetActivity.kt index a709dc72e7..b298baa918 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSetActivity.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSetActivity.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -38,7 +38,7 @@ import org.json.JSONObject /** * Changes the status of a user as typing in a conversation. * @param userId User ID. - * @param type 'typing' � user has started to type. + * @param type 'typing' - user has started to type. * @param peerId Destination ID. "For user: 'User ID', e.g. '12345'. For chat: '2000000000' + * 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. " * @param groupId Group ID (for group messages with group access token) minimum 0 @@ -48,7 +48,7 @@ class MessagesSetActivity( private val type: String? = null, private val peerId: Int? = null, private val groupId: Int? = null -) : VKRequest("messages.setActivity") { +) : ApiRequestBase(methodName = "messages.setActivity") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSetChatPhoto.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSetChatPhoto.kt index b19946c5f7..9b20b656b1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSetChatPhoto.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesSetChatPhoto.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.messages.dto.MessagesSetChatPhotoResponseDto import com.vk.sdk.api.messages.responses.MessagesSetChatPhotoResponse @@ -42,7 +42,7 @@ import org.json.JSONObject */ class MessagesSetChatPhoto( private val file: String -) : VKRequest("messages.setChatPhoto") { +) : ApiRequestBase(methodName = "messages.setChatPhoto") { init { addParam("file", file) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesUnpin.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesUnpin.kt index 594bd198b7..8f85b95281 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesUnpin.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/messages/methods/MessagesUnpin.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.messages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class MessagesUnpin( private val peerId: Int, private val groupId: Int? = null -) : VKRequest("messages.unpin") { +) : ApiRequestBase(methodName = "messages.unpin") { init { addParam("peer_id", peerId) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedAddBan.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedAddBan.kt index 3a7134a3ae..e553345e25 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedAddBan.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedAddBan.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class NewsfeedAddBan( private val userIds: List? = null, private val groupIds: List? = null -) : VKRequest("newsfeed.addBan") { +) : ApiRequestBase(methodName = "newsfeed.addBan") { init { userIds?.let { value -> addParam("user_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedDeleteBan.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedDeleteBan.kt index 1dfffd8c14..245fc601eb 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedDeleteBan.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedDeleteBan.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class NewsfeedDeleteBan( private val userIds: List? = null, private val groupIds: List? = null -) : VKRequest("newsfeed.deleteBan") { +) : ApiRequestBase(methodName = "newsfeed.deleteBan") { init { userIds?.let { value -> addParam("user_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedDeleteList.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedDeleteList.kt index 8020ec3fbe..e7aa0ac076 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedDeleteList.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedDeleteList.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class NewsfeedDeleteList( private val listId: Int -) : VKRequest("newsfeed.deleteList") { +) : ApiRequestBase(methodName = "newsfeed.deleteList") { init { addParam("list_id", listId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetBanned.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetBanned.kt index a63eff1cd6..f48b6cc3fc 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetBanned.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetBanned.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.newsfeed.dto.NewsfeedGetBannedNameCase import com.vk.sdk.api.newsfeed.dto.NewsfeedGetBannedResponseDto @@ -39,16 +39,17 @@ import org.json.JSONObject /** * Returns a list of users and communities banned from the current user's newsfeed. - * @param extended '1' � return extra information about users and communities + * @param extended '1' - return extra information about users and communities * @param fields Profile fields to return. - * @param nameCase Case for declension of user name and surname: 'nom' � nominative (default), 'gen' - * � genitive , 'dat' � dative, 'acc' � accusative , 'ins' � instrumental , 'abl' � prepositional + * @param nameCase Case for declension of user name and surname: 'nom' - nominative (default), + * 'gen' - genitive , 'dat' - dative, 'acc' - accusative , 'ins' - instrumental , 'abl' - prepositional + * */ class NewsfeedGetBanned( private val extended: Boolean? = null, private val fields: List? = null, private val nameCase: NewsfeedGetBannedNameCase? = null -) : VKRequest("newsfeed.getBanned") { +) : ApiRequestBase(methodName = "newsfeed.getBanned") { init { extended?.let { value -> addParam("extended", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetBannedExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetBannedExtended.kt index 140f9bd111..2000bacfd3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetBannedExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetBannedExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.newsfeed.dto.NewsfeedGetBannedExtendedResponseDto import com.vk.sdk.api.newsfeed.dto.NewsfeedGetBannedNameCase @@ -39,16 +39,17 @@ import org.json.JSONObject /** * Returns a list of users and communities banned from the current user's newsfeed. - * @param extended '1' � return extra information about users and communities + * @param extended '1' - return extra information about users and communities * @param fields Profile fields to return. - * @param nameCase Case for declension of user name and surname: 'nom' � nominative (default), 'gen' - * � genitive , 'dat' � dative, 'acc' � accusative , 'ins' � instrumental , 'abl' � prepositional + * @param nameCase Case for declension of user name and surname: 'nom' - nominative (default), + * 'gen' - genitive , 'dat' - dative, 'acc' - accusative , 'ins' - instrumental , 'abl' - prepositional + * */ class NewsfeedGetBannedExtended( private val extended: Boolean? = null, private val fields: List? = null, private val nameCase: NewsfeedGetBannedNameCase? = null -) : VKRequest("newsfeed.getBanned") { +) : ApiRequestBase(methodName = "newsfeed.getBanned") { init { extended?.let { value -> addParam("extended", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetComments.kt index e956c8fa07..9e1e968668 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.newsfeed.dto.NewsfeedCommentsFilters @@ -42,8 +42,8 @@ import org.json.JSONObject * Returns a list of comments in the current user's newsfeed. * @param count Number of comments to return. For auto feed, you can use the 'new_offset' parameter * returned by this method. default 30 minimum 0 maximum 100 - * @param filters Filters to apply: 'post' � new comments on wall posts, 'photo' � new comments on - * photos, 'video' � new comments on videos, 'topic' � new comments on discussions, 'note' � new + * @param filters Filters to apply: 'post' - new comments on wall posts, 'photo' - new comments on + * photos, 'video' - new comments on videos, 'topic' - new comments on discussions, 'note' - new * comments on notes, * @param reposts Object ID, comments on repost of which shall be returned, e.g. 'wall1_45486'. (If * the parameter is set, the 'filters' parameter is optional.), @@ -66,7 +66,7 @@ class NewsfeedGetComments( private val lastCommentsCount: Int? = null, private val startFrom: String? = null, private val fields: List? = null -) : VKRequest("newsfeed.getComments") { +) : ApiRequestBase(methodName = "newsfeed.getComments") { init { count?.let { value -> addParam("count", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetLists.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetLists.kt index d587d7a382..0ec9a80e9c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetLists.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetLists.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.newsfeed.dto.NewsfeedGetListsResponseDto import com.vk.sdk.api.newsfeed.responses.NewsfeedGetListsResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class NewsfeedGetLists( private val listIds: List? = null, private val extended: Boolean? = null -) : VKRequest("newsfeed.getLists") { +) : ApiRequestBase(methodName = "newsfeed.getLists") { init { listIds?.let { value -> addParam("list_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetListsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetListsExtended.kt index 51690d7e9a..8a6aa2e109 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetListsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetListsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.newsfeed.dto.NewsfeedGetListsExtendedResponseDto import com.vk.sdk.api.newsfeed.responses.NewsfeedGetListsExtendedResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class NewsfeedGetListsExtended( private val listIds: List? = null, private val extended: Boolean? = null -) : VKRequest("newsfeed.getLists") { +) : ApiRequestBase(methodName = "newsfeed.getLists") { init { listIds?.let { value -> addParam("list_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetMentions.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetMentions.kt index 1c667611f8..dd01705853 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetMentions.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedGetMentions.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.newsfeed.dto.NewsfeedGetMentionsResponseDto import com.vk.sdk.api.newsfeed.responses.NewsfeedGetMentionsResponse @@ -50,7 +50,7 @@ class NewsfeedGetMentions( private val endTime: Int? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("newsfeed.getMentions") { +) : ApiRequestBase(methodName = "newsfeed.getMentions") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedIgnoreItem.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedIgnoreItem.kt index 01d87ff8e5..ed804e2b57 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedIgnoreItem.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedIgnoreItem.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -37,17 +37,17 @@ import org.json.JSONObject /** * Hides an item from the newsfeed. - * @param type Item type. Possible values: *'wall' � post on the wall,, *'tag' � tag on a photo,, - * *'profilephoto' � profile photo,, *'video' � video,, *'audio' � audio. + * @param type Item type. Possible values: *'wall' - post on the wall,, *'tag' - tag on a photo,, + * *'profilephoto' - profile photo,, *'video' - video,, *'audio' - audio. * @param ownerId Item owner's identifier (user or community), "Note that community id must be - * negative. 'owner_id=1' � user , 'owner_id=-1' � community " + * negative. 'owner_id=1' - user , 'owner_id=-1' - community " * @param itemId Item identifier minimum 0 */ class NewsfeedIgnoreItem( private val type: String, private val ownerId: Int, private val itemId: Int -) : VKRequest("newsfeed.ignoreItem") { +) : ApiRequestBase(methodName = "newsfeed.ignoreItem") { init { addParam("type", type) addParam("owner_id", ownerId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSaveList.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSaveList.kt index 070b889c05..0c5090aed8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSaveList.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSaveList.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.newsfeed.responses.NewsfeedSaveListResponse import kotlin.Boolean @@ -49,7 +49,7 @@ class NewsfeedSaveList( private val listId: Int? = null, private val sourceIds: List? = null, private val noReposts: Boolean? = null -) : VKRequest("newsfeed.saveList") { +) : ApiRequestBase(methodName = "newsfeed.saveList") { init { addParam("title", title) listId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSearch.kt index fb70c5340f..916a902ad6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.newsfeed.dto.NewsfeedSearchResponseDto @@ -42,7 +42,7 @@ import org.json.JSONObject /** * Returns search results by statuses. * @param q Search query string (e.g., 'New Year'). - * @param extended '1' � to return additional information about the user or community that placed + * @param extended '1' - to return additional information about the user or community that placed * the post. * @param count Number of posts to return. default 30 minimum 0 maximum 200 * @param latitude Geographical latitude point (in degrees, -90 to 90) within which to search. @@ -65,7 +65,7 @@ class NewsfeedSearch( private val endTime: Int? = null, private val startFrom: String? = null, private val fields: List? = null -) : VKRequest("newsfeed.search") { +) : ApiRequestBase(methodName = "newsfeed.search") { init { q?.let { value -> addParam("q", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSearchExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSearchExtended.kt index 6e3d5a9fef..861f6f59da 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSearchExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedSearchExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.newsfeed.dto.NewsfeedSearchExtendedResponseDto @@ -42,7 +42,7 @@ import org.json.JSONObject /** * Returns search results by statuses. * @param q Search query string (e.g., 'New Year'). - * @param extended '1' � to return additional information about the user or community that placed + * @param extended '1' - to return additional information about the user or community that placed * the post. * @param count Number of posts to return. default 30 minimum 0 maximum 200 * @param latitude Geographical latitude point (in degrees, -90 to 90) within which to search. @@ -65,7 +65,7 @@ class NewsfeedSearchExtended( private val endTime: Int? = null, private val startFrom: String? = null, private val fields: List? = null -) : VKRequest("newsfeed.search") { +) : ApiRequestBase(methodName = "newsfeed.search") { init { q?.let { value -> addParam("q", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedUnignoreItem.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedUnignoreItem.kt index cf49f4bcc5..c69a41689c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedUnignoreItem.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedUnignoreItem.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -37,10 +37,10 @@ import org.json.JSONObject /** * Returns a hidden item to the newsfeed. - * @param type Item type. Possible values: *'wall' � post on the wall,, *'tag' � tag on a photo,, - * *'profilephoto' � profile photo,, *'video' � video,, *'audio' � audio. + * @param type Item type. Possible values: *'wall' - post on the wall,, *'tag' - tag on a photo,, + * *'profilephoto' - profile photo,, *'video' - video,, *'audio' - audio. * @param ownerId Item owner's identifier (user or community), "Note that community id must be - * negative. 'owner_id=1' � user , 'owner_id=-1' � community " + * negative. 'owner_id=1' - user , 'owner_id=-1' - community " * @param itemId Item identifier minimum 0 * @param trackCode Track code of unignored item */ @@ -49,7 +49,7 @@ class NewsfeedUnignoreItem( private val ownerId: Int, private val itemId: Int, private val trackCode: String? = null -) : VKRequest("newsfeed.unignoreItem") { +) : ApiRequestBase(methodName = "newsfeed.unignoreItem") { init { addParam("type", type) addParam("owner_id", ownerId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedUnsubscribe.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedUnsubscribe.kt index 671d31b30e..8fca7b95e4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedUnsubscribe.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/newsfeed/methods/NewsfeedUnsubscribe.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.newsfeed.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -37,8 +37,8 @@ import org.json.JSONObject /** * Unsubscribes the current user from specified newsfeeds. - * @param type Type of object from which to unsubscribe: 'note' � note, 'photo' � photo, 'post' � - * post on user wall or community wall, 'topic' � topic, 'video' � video + * @param type Type of object from which to unsubscribe: 'note' - note, 'photo' - photo, 'post' - + * post on user wall or community wall, 'topic' - topic, 'video' - video * @param itemId Object ID. minimum 0 * @param ownerId Object owner ID. */ @@ -46,7 +46,7 @@ class NewsfeedUnsubscribe( private val type: NewsfeedUnsubscribeType, private val itemId: Int, private val ownerId: Int? = null -) : VKRequest("newsfeed.unsubscribe") { +) : ApiRequestBase(methodName = "newsfeed.unsubscribe") { init { addParam("type", type.value) addParam("item_id", itemId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesAdd.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesAdd.kt index 9143abb69c..5703123ae6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesAdd.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesAdd.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.notes.responses.NotesAddResponse import kotlin.Int @@ -47,7 +47,7 @@ class NotesAdd( private val text: String, private val privacyView: List? = null, private val privacyComment: List? = null -) : VKRequest("notes.add") { +) : ApiRequestBase(methodName = "notes.add") { init { addParam("title", title) addParam("text", text) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesCreateComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesCreateComment.kt index a8131167b5..2c63e24904 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesCreateComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesCreateComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.notes.responses.NotesCreateCommentResponse import kotlin.Int @@ -49,7 +49,7 @@ class NotesCreateComment( private val ownerId: Int? = null, private val replyTo: Int? = null, private val guid: String? = null -) : VKRequest("notes.createComment") { +) : ApiRequestBase(methodName = "notes.createComment") { init { addParam("note_id", noteId) addParam("message", message) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesDelete.kt index 0464b2ff82..a31a9118b2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class NotesDelete( private val noteId: Int -) : VKRequest("notes.delete") { +) : ApiRequestBase(methodName = "notes.delete") { init { addParam("note_id", noteId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesDeleteComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesDeleteComment.kt index 7dffd2dd43..62dcb9aee0 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesDeleteComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesDeleteComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class NotesDeleteComment( private val commentId: Int, private val ownerId: Int? = null -) : VKRequest("notes.deleteComment") { +) : ApiRequestBase(methodName = "notes.deleteComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesEdit.kt index 3cb7e535a4..e5dad94b8a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -50,7 +50,7 @@ class NotesEdit( private val text: String, private val privacyView: List? = null, private val privacyComment: List? = null -) : VKRequest("notes.edit") { +) : ApiRequestBase(methodName = "notes.edit") { init { addParam("note_id", noteId) addParam("title", title) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesEditComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesEditComment.kt index 3f380ea67a..64e2bf7b21 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesEditComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesEditComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ class NotesEditComment( private val commentId: Int, private val message: String, private val ownerId: Int? = null -) : VKRequest("notes.editComment") { +) : ApiRequestBase(methodName = "notes.editComment") { init { addParam("comment_id", commentId) addParam("message", message) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGet.kt index c95742a8e1..3b8cdfb595 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.notes.dto.NotesGetResponseDto import com.vk.sdk.api.notes.dto.NotesGetSort @@ -50,7 +50,7 @@ class NotesGet( private val offset: Int? = null, private val count: Int? = null, private val sort: NotesGetSort? = null -) : VKRequest("notes.get") { +) : ApiRequestBase(methodName = "notes.get") { init { noteIds?.let { value -> addParam("note_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGetById.kt index ef4278f74b..5e8e75ae39 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.notes.dto.NotesNote import com.vk.sdk.api.notes.responses.NotesGetByIdResponse @@ -45,7 +45,7 @@ class NotesGetById( private val noteId: Int, private val ownerId: Int? = null, private val needWiki: Boolean? = null -) : VKRequest("notes.getById") { +) : ApiRequestBase(methodName = "notes.getById") { init { addParam("note_id", noteId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGetComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGetComments.kt index e7031e39fb..a5234e8f72 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGetComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesGetComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.notes.dto.NotesGetCommentsResponseDto import com.vk.sdk.api.notes.dto.NotesGetCommentsSort @@ -49,7 +49,7 @@ class NotesGetComments( private val sort: NotesGetCommentsSort? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("notes.getComments") { +) : ApiRequestBase(methodName = "notes.getComments") { init { addParam("note_id", noteId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesRestoreComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesRestoreComment.kt index 6bf62dec8f..af0690b166 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesRestoreComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notes/methods/NotesRestoreComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notes.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class NotesRestoreComment( private val commentId: Int, private val ownerId: Int? = null -) : VKRequest("notes.restoreComment") { +) : ApiRequestBase(methodName = "notes.restoreComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsGet.kt index 171b4a479d..7ab08c41c9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notifications.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.notifications.dto.NotificationsGetFilters import com.vk.sdk.api.notifications.dto.NotificationsGetResponseDto @@ -41,10 +41,10 @@ import org.json.JSONObject * Returns a list of notifications about other users' feedback to the current user's wall posts. * @param count Number of notifications to return. default 30 minimum 1 maximum 100 * @param startFrom - * @param filters Type of notifications to return: 'wall' � wall posts, 'mentions' � mentions in - * wall posts, comments, or topics, 'comments' � comments to wall posts, photos, and videos, 'likes' � - * likes, 'reposted' � wall posts that are copied from the current user's wall, 'followers' � new - * followers, 'friends' � accepted friend requests + * @param filters Type of notifications to return: 'wall' - wall posts, 'mentions' - mentions in + * wall posts, comments, or topics, 'comments' - comments to wall posts, photos, and videos, 'likes' - + * likes, 'reposted' - wall posts that are copied from the current user's wall, 'followers' - new + * followers, 'friends' - accepted friend requests * @param startTime Earliest timestamp (in Unix time) of a notification to return. By default, 24 * hours ago. * @param endTime Latest timestamp (in Unix time) of a notification to return. By default, the @@ -56,7 +56,7 @@ class NotificationsGet( private val filters: List? = null, private val startTime: Int? = null, private val endTime: Int? = null -) : VKRequest("notifications.get") { +) : ApiRequestBase(methodName = "notifications.get") { init { count?.let { value -> addParam("count", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsMarkAsViewed.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsMarkAsViewed.kt index 76f4568c2d..0d5e90334d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsMarkAsViewed.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsMarkAsViewed.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notifications.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.notifications.responses.NotificationsMarkAsViewedResponse @@ -37,7 +37,8 @@ import org.json.JSONObject * Resets the counter of new notifications about other users' feedback to the current user's wall * posts. */ -class NotificationsMarkAsViewed : VKRequest("notifications.markAsViewed") { +class NotificationsMarkAsViewed : ApiRequestBase(methodName = + "notifications.markAsViewed") { override fun parse(r: JSONObject): BaseBoolInt = GsonHolder.gson.fromJson(r.toString(), NotificationsMarkAsViewedResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsSendMessage.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsSendMessage.kt index b3772bcae5..5085626d7b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsSendMessage.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/notifications/methods/NotificationsSendMessage.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.notifications.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.notifications.dto.NotificationsSendMessageItem import com.vk.sdk.api.notifications.responses.NotificationsSendMessageResponse @@ -49,7 +49,7 @@ class NotificationsSendMessage( private val fragment: String? = null, private val groupId: Int? = null, private val randomId: Int? = null -) : VKRequest>("notifications.sendMessage") { +) : ApiRequestBase>(methodName = "notifications.sendMessage") { init { addParam("user_ids", userIds) addParam("message", message) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersCancelSubscription.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersCancelSubscription.kt index efaab7b67a..2906e6fa3a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersCancelSubscription.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersCancelSubscription.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.orders.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.orders.responses.OrdersCancelSubscriptionResponse @@ -44,7 +44,7 @@ class OrdersCancelSubscription( private val userId: Int, private val subscriptionId: Int, private val pendingCancel: Boolean? = null -) : VKRequest("orders.cancelSubscription") { +) : ApiRequestBase(methodName = "orders.cancelSubscription") { init { addParam("user_id", userId) addParam("subscription_id", subscriptionId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersChangeState.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersChangeState.kt index 01d4885376..c6aa68efca 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersChangeState.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersChangeState.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.orders.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.orders.dto.OrdersChangeStateAction import com.vk.sdk.api.orders.responses.OrdersChangeStateResponse @@ -39,20 +39,20 @@ import org.json.JSONObject /** * Changes order status. * @param orderId order ID. minimum 0 - * @param action action to be done with the order. Available actions: *cancel � to cancel - * unconfirmed order. *charge � to confirm unconfirmed order. Applies only if processing of - * [vk.com/dev/payments_status|order_change_state] notification failed. *refund � to cancel confirmed + * @param action action to be done with the order. Available actions: *cancel - to cancel + * unconfirmed order. *charge - to confirm unconfirmed order. Applies only if processing of + * [vk.com/dev/payments_status|order_change_state] notification failed. *refund - to cancel confirmed * order. * @param appOrderId internal ID of the order in the application. minimum 0 * @param testMode if this parameter is set to 1, this method returns a list of test mode orders. By - * default � 0. + * default - 0. */ class OrdersChangeState( private val orderId: Int, private val action: OrdersChangeStateAction, private val appOrderId: Int? = null, private val testMode: Boolean? = null -) : VKRequest("orders.changeState") { +) : ApiRequestBase(methodName = "orders.changeState") { init { addParam("order_id", orderId) addParam("action", action.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGet.kt index 14789ee190..506c7a9b98 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.orders.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.orders.dto.OrdersOrder import com.vk.sdk.api.orders.responses.OrdersGetResponse @@ -41,13 +41,13 @@ import org.json.JSONObject * @param offset default 0 minimum 0 * @param count number of returned orders. default 100 minimum 0 maximum 1000 * @param testMode if this parameter is set to 1, this method returns a list of test mode orders. By - * default � 0. + * default - 0. */ class OrdersGet( private val offset: Int? = null, private val count: Int? = null, private val testMode: Boolean? = null -) : VKRequest>("orders.get") { +) : ApiRequestBase>(methodName = "orders.get") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetAmount.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetAmount.kt index e59303ab26..1511e3f1f1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetAmount.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetAmount.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.orders.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.orders.dto.OrdersAmount import com.vk.sdk.api.orders.responses.OrdersGetAmountResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class OrdersGetAmount( private val userId: Int, private val votes: List -) : VKRequest("orders.getAmount") { +) : ApiRequestBase(methodName = "orders.getAmount") { init { addParam("user_id", userId) addParam("votes", votes) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetById.kt index 60eb24ef0c..2b688b4c0f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.orders.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.orders.dto.OrdersOrder import com.vk.sdk.api.orders.responses.OrdersGetByIdResponse @@ -41,13 +41,13 @@ import org.json.JSONObject * @param orderId order ID. minimum 0 * @param orderIds order IDs (when information about several orders is requested). * @param testMode if this parameter is set to 1, this method returns a list of test mode orders. By - * default � 0. + * default - 0. */ class OrdersGetById( private val orderId: Int? = null, private val orderIds: List? = null, private val testMode: Boolean? = null -) : VKRequest>("orders.getById") { +) : ApiRequestBase>(methodName = "orders.getById") { init { orderId?.let { value -> addParam("order_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetUserSubscriptionById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetUserSubscriptionById.kt index bea0db949e..7de2ccc42a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetUserSubscriptionById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetUserSubscriptionById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.orders.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.orders.dto.OrdersSubscription import com.vk.sdk.api.orders.responses.OrdersGetUserSubscriptionByIdResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class OrdersGetUserSubscriptionById( private val userId: Int, private val subscriptionId: Int -) : VKRequest("orders.getUserSubscriptionById") { +) : ApiRequestBase(methodName = "orders.getUserSubscriptionById") { init { addParam("user_id", userId) addParam("subscription_id", subscriptionId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetUserSubscriptions.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetUserSubscriptions.kt index 42bb8bcd92..d988609b62 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetUserSubscriptions.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersGetUserSubscriptions.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.orders.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.orders.dto.OrdersGetUserSubscriptionsResponseDto import com.vk.sdk.api.orders.responses.OrdersGetUserSubscriptionsResponse @@ -39,7 +39,8 @@ import org.json.JSONObject */ class OrdersGetUserSubscriptions( private val userId: Int -) : VKRequest("orders.getUserSubscriptions") { +) : ApiRequestBase(methodName = + "orders.getUserSubscriptions") { init { addParam("user_id", userId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersUpdateSubscription.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersUpdateSubscription.kt index 24e4e4c9ba..d62fbd2379 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersUpdateSubscription.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/orders/methods/OrdersUpdateSubscription.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.orders.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.orders.responses.OrdersUpdateSubscriptionResponse @@ -43,7 +43,7 @@ class OrdersUpdateSubscription( private val userId: Int, private val subscriptionId: Int, private val price: Int -) : VKRequest("orders.updateSubscription") { +) : ApiRequestBase(methodName = "orders.updateSubscription") { init { addParam("user_id", userId) addParam("subscription_id", subscriptionId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesClearCache.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesClearCache.kt index e4de31049e..ec66f01f47 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesClearCache.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesClearCache.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.pages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class PagesClearCache( private val url: String -) : VKRequest("pages.clearCache") { +) : ApiRequestBase(methodName = "pages.clearCache") { init { addParam("url", url) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGet.kt index a30d8a318b..d2ed846f66 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.pages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.pages.dto.PagesWikipageFull import com.vk.sdk.api.pages.responses.PagesGetResponse @@ -40,11 +40,11 @@ import org.json.JSONObject * Returns information about a wiki page. * @param ownerId Page owner ID. * @param pageId Wiki page ID. - * @param global '1' � to return information about a global wiki page - * @param sitePreview '1' � resulting wiki page is a preview for the attached link + * @param global '1' - to return information about a global wiki page + * @param sitePreview '1' - resulting wiki page is a preview for the attached link * @param title Wiki page title. * @param needSource - * @param needHtml '1' � to return the page as HTML, + * @param needHtml '1' - to return the page as HTML, */ class PagesGet( private val ownerId: Int? = null, @@ -54,7 +54,7 @@ class PagesGet( private val title: String? = null, private val needSource: Boolean? = null, private val needHtml: Boolean? = null -) : VKRequest("pages.get") { +) : ApiRequestBase(methodName = "pages.get") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetHistory.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetHistory.kt index 2a8b93c345..3c65a1ff8f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetHistory.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetHistory.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.pages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.pages.dto.PagesWikipageHistory import com.vk.sdk.api.pages.responses.PagesGetHistoryResponse @@ -45,7 +45,7 @@ class PagesGetHistory( private val pageId: Int, private val groupId: Int? = null, private val userId: Int? = null -) : VKRequest>("pages.getHistory") { +) : ApiRequestBase>(methodName = "pages.getHistory") { init { addParam("page_id", pageId) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetTitles.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetTitles.kt index b40351010b..9f8bead64a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetTitles.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetTitles.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.pages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.pages.dto.PagesWikipage import com.vk.sdk.api.pages.responses.PagesGetTitlesResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class PagesGetTitles( private val groupId: Int? = null -) : VKRequest>("pages.getTitles") { +) : ApiRequestBase>(methodName = "pages.getTitles") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetVersion.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetVersion.kt index e432a4ca5f..d81fbf1f6a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetVersion.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesGetVersion.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.pages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.pages.dto.PagesWikipageFull import com.vk.sdk.api.pages.responses.PagesGetVersionResponse @@ -40,14 +40,14 @@ import org.json.JSONObject * @param versionId * @param groupId ID of the community that owns the wiki page. * @param userId - * @param needHtml '1' � to return the page as HTML + * @param needHtml '1' - to return the page as HTML */ class PagesGetVersion( private val versionId: Int, private val groupId: Int? = null, private val userId: Int? = null, private val needHtml: Boolean? = null -) : VKRequest("pages.getVersion") { +) : ApiRequestBase(methodName = "pages.getVersion") { init { addParam("version_id", versionId) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesParseWiki.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesParseWiki.kt index 89d9647ee2..7aef328720 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesParseWiki.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesParseWiki.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.pages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.pages.responses.PagesParseWikiResponse import kotlin.Int @@ -42,7 +42,7 @@ import org.json.JSONObject class PagesParseWiki( private val text: String, private val groupId: Int? = null -) : VKRequest("pages.parseWiki") { +) : ApiRequestBase(methodName = "pages.parseWiki") { init { addParam("text", text) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesSave.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesSave.kt index 927e29a380..cad4530210 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesSave.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesSave.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.pages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.pages.responses.PagesSaveResponse import kotlin.Int @@ -48,7 +48,7 @@ class PagesSave( private val groupId: Int? = null, private val userId: Int? = null, private val title: String? = null -) : VKRequest("pages.save") { +) : ApiRequestBase(methodName = "pages.save") { init { text?.let { value -> addParam("text", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesSaveAccess.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesSaveAccess.kt index b017403c73..82db2df02b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesSaveAccess.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/pages/methods/PagesSaveAccess.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.pages.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.pages.dto.PagesSaveAccessEdit import com.vk.sdk.api.pages.dto.PagesSaveAccessView @@ -40,10 +40,10 @@ import org.json.JSONObject * @param pageId Wiki page ID. * @param groupId ID of the community that owns the wiki page. * @param userId - * @param view Who can view the wiki page: '1' � only community members, '2' � all users can view - * the page, '0' � only community managers - * @param edit Who can edit the wiki page: '1' � only community members, '2' � all users can edit - * the page, '0' � only community managers + * @param view Who can view the wiki page: '1' - only community members, '2' - all users can view + * the page, '0' - only community managers + * @param edit Who can edit the wiki page: '1' - only community members, '2' - all users can edit + * the page, '0' - only community managers */ class PagesSaveAccess( private val pageId: Int, @@ -51,7 +51,7 @@ class PagesSaveAccess( private val userId: Int? = null, private val view: PagesSaveAccessView? = null, private val edit: PagesSaveAccessEdit? = null -) : VKRequest("pages.saveAccess") { +) : ApiRequestBase(methodName = "pages.saveAccess") { init { addParam("page_id", pageId) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosConfirmTag.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosConfirmTag.kt index 75bb9a9482..3c5200f017 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosConfirmTag.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosConfirmTag.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ class PhotosConfirmTag( private val photoId: String, private val tagId: Int, private val ownerId: Int? = null -) : VKRequest("photos.confirmTag") { +) : ApiRequestBase(methodName = "photos.confirmTag") { init { addParam("photo_id", photoId) addParam("tag_id", tagId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCopy.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCopy.kt index c2d7426859..a36cacd4bb 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCopy.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCopy.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.responses.PhotosCopyResponse import kotlin.Int @@ -44,7 +44,7 @@ class PhotosCopy( private val ownerId: Int, private val photoId: Int, private val accessKey: String? = null -) : VKRequest("photos.copy") { +) : ApiRequestBase(methodName = "photos.copy") { init { addParam("owner_id", ownerId) addParam("photo_id", photoId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCreateAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCreateAlbum.kt index 38d2b5bc00..10075c47f1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCreateAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCreateAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhotoAlbumFull import com.vk.sdk.api.photos.responses.PhotosCreateAlbumResponse @@ -55,7 +55,7 @@ class PhotosCreateAlbum( private val privacyComment: List? = null, private val uploadByAdminsOnly: Boolean? = null, private val commentsDisabled: Boolean? = null -) : VKRequest("photos.createAlbum") { +) : ApiRequestBase(methodName = "photos.createAlbum") { init { addParam("title", title) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCreateComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCreateComment.kt index 5b7aee5ced..1f4e441f9a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCreateComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosCreateComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.responses.PhotosCreateCommentResponse import kotlin.Boolean @@ -42,10 +42,10 @@ import org.json.JSONObject * @param ownerId ID of the user or community that owns the photo. * @param message Comment text. * @param attachments (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" - * @param fromGroup '1' � to post a comment from the community + * 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" + * @param fromGroup '1' - to post a comment from the community * @param replyToComment * @param stickerId minimum 0 * @param accessKey @@ -61,7 +61,7 @@ class PhotosCreateComment( private val stickerId: Int? = null, private val accessKey: String? = null, private val guid: String? = null -) : VKRequest("photos.createComment") { +) : ApiRequestBase(methodName = "photos.createComment") { init { addParam("photo_id", photoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDelete.kt index 9afc30092e..27954c7241 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class PhotosDelete( private val photoId: Int, private val ownerId: Int? = null -) : VKRequest("photos.delete") { +) : ApiRequestBase(methodName = "photos.delete") { init { addParam("photo_id", photoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDeleteAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDeleteAlbum.kt index 4ac28845cb..545d17524a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDeleteAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDeleteAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class PhotosDeleteAlbum( private val albumId: Int, private val groupId: Int? = null -) : VKRequest("photos.deleteAlbum") { +) : ApiRequestBase(methodName = "photos.deleteAlbum") { init { addParam("album_id", albumId) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDeleteComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDeleteComment.kt index a4e74ad07a..69e2da866b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDeleteComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosDeleteComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.photos.responses.PhotosDeleteCommentResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class PhotosDeleteComment( private val commentId: Int, private val ownerId: Int? = null -) : VKRequest("photos.deleteComment") { +) : ApiRequestBase(methodName = "photos.deleteComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEdit.kt index 20ff0334fb..6a00f581b9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -58,7 +58,7 @@ class PhotosEdit( private val placeStr: String? = null, private val foursquareId: String? = null, private val deletePlace: Boolean? = null -) : VKRequest("photos.edit") { +) : ApiRequestBase(methodName = "photos.edit") { init { addParam("photo_id", photoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEditAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEditAlbum.kt index f20454f344..b46645d763 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEditAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEditAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -57,7 +57,7 @@ class PhotosEditAlbum( private val privacyComment: List? = null, private val uploadByAdminsOnly: Boolean? = null, private val commentsDisabled: Boolean? = null -) : VKRequest("photos.editAlbum") { +) : ApiRequestBase(methodName = "photos.editAlbum") { init { addParam("album_id", albumId) title?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEditComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEditComment.kt index 592fb346e4..97e3e76b20 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEditComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosEditComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,16 +42,16 @@ import org.json.JSONObject * @param ownerId ID of the user or community that owns the photo. * @param message New text of the comment. * @param attachments (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" + * 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" */ class PhotosEditComment( private val commentId: Int, private val ownerId: Int? = null, private val message: String? = null, private val attachments: List? = null -) : VKRequest("photos.editComment") { +) : ApiRequestBase(methodName = "photos.editComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGet.kt index 8526b8662e..43405953db 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetResponseDto import com.vk.sdk.api.photos.responses.PhotosGetResponse @@ -44,14 +44,14 @@ import org.json.JSONObject * @param albumId Photo album ID. To return information about photos from service albums, use the * following string values: 'profile, wall, saved'. * @param photoIds Photo IDs. - * @param rev Sort order: '1' � reverse chronological, '0' � chronological - * @param extended '1' � to return additional 'likes', 'comments', and 'tags' fields, '0' � + * @param rev Sort order: '1' - reverse chronological, '0' - chronological + * @param extended '1' - to return additional 'likes', 'comments', and 'tags' fields, '0' - * (default) * @param feedType Type of feed obtained in 'feed' field of the method. * @param feed unixtime, that can be obtained with [vk.com/dev/newsfeed.get|newsfeed.get] 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. - * @param photoSizes '1' � to return photo sizes in a [vk.com/dev/photo_sizes|special format] + * @param photoSizes '1' - to return photo sizes in a [vk.com/dev/photo_sizes|special format] * @param offset minimum 0 * @param count default 50 minimum 0 maximum 1000 */ @@ -66,7 +66,7 @@ class PhotosGet( private val photoSizes: Boolean? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("photos.get") { +) : ApiRequestBase(methodName = "photos.get") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAlbums.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAlbums.kt index 267504b50c..2ad08ada36 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAlbums.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAlbums.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetAlbumsResponseDto import com.vk.sdk.api.photos.responses.PhotosGetAlbumsResponse @@ -42,9 +42,9 @@ import org.json.JSONObject * @param albumIds Album IDs. * @param offset Offset needed to return a specific subset of albums. minimum 0 * @param count Number of albums to return. minimum 0 - * @param needSystem '1' � to return system albums with negative IDs - * @param needCovers '1' � to return an additional 'thumb_src' field, '0' � (default) - * @param photoSizes '1' � to return photo sizes in a + * @param needSystem '1' - to return system albums with negative IDs + * @param needCovers '1' - to return an additional 'thumb_src' field, '0' - (default) + * @param photoSizes '1' - to return photo sizes in a */ class PhotosGetAlbums( private val ownerId: Int? = null, @@ -54,7 +54,7 @@ class PhotosGetAlbums( private val needSystem: Boolean? = null, private val needCovers: Boolean? = null, private val photoSizes: Boolean? = null -) : VKRequest("photos.getAlbums") { +) : ApiRequestBase(methodName = "photos.getAlbums") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAlbumsCount.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAlbumsCount.kt index d71fdcf254..e3bd2ddc95 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAlbumsCount.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAlbumsCount.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.responses.PhotosGetAlbumsCountResponse import kotlin.Int @@ -41,7 +41,7 @@ import org.json.JSONObject class PhotosGetAlbumsCount( private val userId: Int? = null, private val groupId: Int? = null -) : VKRequest("photos.getAlbumsCount") { +) : ApiRequestBase(methodName = "photos.getAlbumsCount") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAll.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAll.kt index e0ac12553d..faff7eaaa7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAll.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAll.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetAllResponseDto import com.vk.sdk.api.photos.responses.PhotosGetAllResponse @@ -39,15 +39,15 @@ import org.json.JSONObject * Returns a list of photos belonging to a user or community, in reverse chronological order. * @param ownerId ID of a user or community that owns the photos. Use a negative value to designate * a community ID. - * @param extended '1' � to return detailed information about photos + * @param extended '1' - to return detailed information about photos * @param offset Offset needed to return a specific subset of photos. By default, '0'. minimum 0 * @param count Number of photos to return. default 20 minimum 0 maximum 200 - * @param photoSizes '1' � to return image sizes in [vk.com/dev/photo_sizes|special format]. - * @param noServiceAlbums '1' � to return photos only from standard albums, '0' � to return all + * @param photoSizes '1' - to return image sizes in [vk.com/dev/photo_sizes|special format]. + * @param noServiceAlbums '1' - to return photos only from standard albums, '0' - to return all * photos including those in service albums, e.g., 'My wall photos' (default) - * @param needHidden '1' � to show information about photos being hidden from the block above the + * @param needHidden '1' - to show information about photos being hidden from the block above the * wall. - * @param skipHidden '1' � not to return photos being hidden from the block above the wall. Works + * @param skipHidden '1' - not to return photos being hidden from the block above the wall. Works * only with owner_id>0, no_service_albums is ignored. */ class PhotosGetAll( @@ -59,7 +59,7 @@ class PhotosGetAll( private val noServiceAlbums: Boolean? = null, private val needHidden: Boolean? = null, private val skipHidden: Boolean? = null -) : VKRequest("photos.getAll") { +) : ApiRequestBase(methodName = "photos.getAll") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAllComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAllComments.kt index f0dbb3ee91..2c77decc9a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAllComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAllComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetAllCommentsResponseDto import com.vk.sdk.api.photos.responses.PhotosGetAllCommentsResponse @@ -41,7 +41,7 @@ import org.json.JSONObject * @param ownerId ID of the user or community that owns the album(s). * @param albumId Album ID. If the parameter is not set, comments on all of the user's albums will * be returned. minimum 0 - * @param needLikes '1' � to return an additional 'likes' field, '0' � (default) + * @param needLikes '1' - to return an additional 'likes' field, '0' - (default) * @param offset Offset needed to return a specific subset of comments. By default, '0'. minimum 0 * @param count Number of comments to return. By default, '20'. Maximum value, '100'. minimum 0 */ @@ -51,7 +51,7 @@ class PhotosGetAllComments( private val needLikes: Boolean? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("photos.getAllComments") { +) : ApiRequestBase(methodName = "photos.getAllComments") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAllExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAllExtended.kt index 263dcd9cdb..3f4a72abd8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAllExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetAllExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetAllExtendedResponseDto import com.vk.sdk.api.photos.responses.PhotosGetAllExtendedResponse @@ -39,15 +39,15 @@ import org.json.JSONObject * Returns a list of photos belonging to a user or community, in reverse chronological order. * @param ownerId ID of a user or community that owns the photos. Use a negative value to designate * a community ID. - * @param extended '1' � to return detailed information about photos + * @param extended '1' - to return detailed information about photos * @param offset Offset needed to return a specific subset of photos. By default, '0'. minimum 0 * @param count Number of photos to return. default 20 minimum 0 maximum 200 - * @param photoSizes '1' � to return image sizes in [vk.com/dev/photo_sizes|special format]. - * @param noServiceAlbums '1' � to return photos only from standard albums, '0' � to return all + * @param photoSizes '1' - to return image sizes in [vk.com/dev/photo_sizes|special format]. + * @param noServiceAlbums '1' - to return photos only from standard albums, '0' - to return all * photos including those in service albums, e.g., 'My wall photos' (default) - * @param needHidden '1' � to show information about photos being hidden from the block above the + * @param needHidden '1' - to show information about photos being hidden from the block above the * wall. - * @param skipHidden '1' � not to return photos being hidden from the block above the wall. Works + * @param skipHidden '1' - not to return photos being hidden from the block above the wall. Works * only with owner_id>0, no_service_albums is ignored. */ class PhotosGetAllExtended( @@ -59,7 +59,7 @@ class PhotosGetAllExtended( private val noServiceAlbums: Boolean? = null, private val needHidden: Boolean? = null, private val skipHidden: Boolean? = null -) : VKRequest("photos.getAll") { +) : ApiRequestBase(methodName = "photos.getAll") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetById.kt index 33f0ee076f..ac5530ffba 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhoto import com.vk.sdk.api.photos.responses.PhotosGetByIdResponse @@ -42,14 +42,14 @@ import org.json.JSONObject * 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" - * @param extended '1' � to return additional fields, '0' � (default) - * @param photoSizes '1' � to return photo sizes in a + * @param extended '1' - to return additional fields, '0' - (default) + * @param photoSizes '1' - to return photo sizes in a */ class PhotosGetById( private val photos: List, private val extended: Boolean? = null, private val photoSizes: Boolean? = null -) : VKRequest>("photos.getById") { +) : ApiRequestBase>(methodName = "photos.getById") { init { addParam("photos", photos) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetByIdExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetByIdExtended.kt index 836e380266..fce4f96a7f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetByIdExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetByIdExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhotoFull import com.vk.sdk.api.photos.responses.PhotosGetByIdExtendedResponse @@ -42,14 +42,14 @@ import org.json.JSONObject * 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" - * @param extended '1' � to return additional fields, '0' � (default) - * @param photoSizes '1' � to return photo sizes in a + * @param extended '1' - to return additional fields, '0' - (default) + * @param photoSizes '1' - to return photo sizes in a */ class PhotosGetByIdExtended( private val photos: List, private val extended: Boolean? = null, private val photoSizes: Boolean? = null -) : VKRequest>("photos.getById") { +) : ApiRequestBase>(methodName = "photos.getById") { init { addParam("photos", photos) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetChatUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetChatUploadServer.kt index eb6ae6c28f..1534778d63 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetChatUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetChatUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUploadServer import com.vk.sdk.api.base.responses.BaseGetUploadServerResponse @@ -46,7 +46,7 @@ class PhotosGetChatUploadServer( private val cropX: Int? = null, private val cropY: Int? = null, private val cropWidth: Int? = null -) : VKRequest("photos.getChatUploadServer") { +) : ApiRequestBase(methodName = "photos.getChatUploadServer") { init { addParam("chat_id", chatId) cropX?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetComments.kt index 33b7f19ac2..f0bcc432c7 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetCommentsResponseDto import com.vk.sdk.api.photos.dto.PhotosGetCommentsSort @@ -43,11 +43,11 @@ import org.json.JSONObject * Returns a list of comments on a photo. * @param photoId Photo ID. * @param ownerId ID of the user or community that owns the photo. - * @param needLikes '1' � to return an additional 'likes' field, '0' � (default) + * @param needLikes '1' - to return an additional 'likes' field, '0' - (default) * @param startCommentId minimum 0 * @param offset Offset needed to return a specific subset of comments. By default, '0'. * @param count Number of comments to return. default "20" minimum 0 maximum 100 - * @param sort Sort order: 'asc' � old first, 'desc' � new first + * @param sort Sort order: 'asc' - old first, 'desc' - new first * @param accessKey * @param extended * @param fields @@ -63,7 +63,7 @@ class PhotosGetComments( private val accessKey: String? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("photos.getComments") { +) : ApiRequestBase(methodName = "photos.getComments") { init { addParam("photo_id", photoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetCommentsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetCommentsExtended.kt index 1af0590875..365bc351a5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetCommentsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetCommentsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetCommentsExtendedResponseDto import com.vk.sdk.api.photos.dto.PhotosGetCommentsSort @@ -43,11 +43,11 @@ import org.json.JSONObject * Returns a list of comments on a photo. * @param photoId Photo ID. * @param ownerId ID of the user or community that owns the photo. - * @param needLikes '1' � to return an additional 'likes' field, '0' � (default) + * @param needLikes '1' - to return an additional 'likes' field, '0' - (default) * @param startCommentId minimum 0 * @param offset Offset needed to return a specific subset of comments. By default, '0'. * @param count Number of comments to return. default "20" minimum 0 maximum 100 - * @param sort Sort order: 'asc' � old first, 'desc' � new first + * @param sort Sort order: 'asc' - old first, 'desc' - new first * @param accessKey * @param extended * @param fields @@ -63,7 +63,7 @@ class PhotosGetCommentsExtended( private val accessKey: String? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("photos.getComments") { +) : ApiRequestBase(methodName = "photos.getComments") { init { addParam("photo_id", photoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetExtended.kt index 339bb38731..bd93ed9e50 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetExtendedResponseDto import com.vk.sdk.api.photos.responses.PhotosGetExtendedResponse @@ -44,14 +44,14 @@ import org.json.JSONObject * @param albumId Photo album ID. To return information about photos from service albums, use the * following string values: 'profile, wall, saved'. * @param photoIds Photo IDs. - * @param rev Sort order: '1' � reverse chronological, '0' � chronological - * @param extended '1' � to return additional 'likes', 'comments', and 'tags' fields, '0' � + * @param rev Sort order: '1' - reverse chronological, '0' - chronological + * @param extended '1' - to return additional 'likes', 'comments', and 'tags' fields, '0' - * (default) * @param feedType Type of feed obtained in 'feed' field of the method. * @param feed unixtime, that can be obtained with [vk.com/dev/newsfeed.get|newsfeed.get] 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. - * @param photoSizes '1' � to return photo sizes in a [vk.com/dev/photo_sizes|special format] + * @param photoSizes '1' - to return photo sizes in a [vk.com/dev/photo_sizes|special format] * @param offset minimum 0 * @param count default 50 minimum 0 maximum 1000 */ @@ -66,7 +66,7 @@ class PhotosGetExtended( private val photoSizes: Boolean? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("photos.get") { +) : ApiRequestBase(methodName = "photos.get") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMarketAlbumUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMarketAlbumUploadServer.kt index 0d9d031d23..4d21d313f0 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMarketAlbumUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMarketAlbumUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUploadServer import com.vk.sdk.api.base.responses.BaseGetUploadServerResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class PhotosGetMarketAlbumUploadServer( private val groupId: Int -) : VKRequest("photos.getMarketAlbumUploadServer") { +) : ApiRequestBase(methodName = "photos.getMarketAlbumUploadServer") { init { addParam("group_id", groupId) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMarketUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMarketUploadServer.kt index 7929835e2b..27b5f5df38 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMarketUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMarketUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUploadServer import com.vk.sdk.api.photos.responses.PhotosGetMarketUploadServerResponse @@ -49,7 +49,7 @@ class PhotosGetMarketUploadServer( private val cropX: Int? = null, private val cropY: Int? = null, private val cropWidth: Int? = null -) : VKRequest("photos.getMarketUploadServer") { +) : ApiRequestBase(methodName = "photos.getMarketUploadServer") { init { addParam("group_id", groupId) mainPhoto?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMessagesUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMessagesUploadServer.kt index 6a77489d39..20d5d16475 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMessagesUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetMessagesUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhotoUpload import com.vk.sdk.api.photos.responses.PhotosGetMessagesUploadServerResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class PhotosGetMessagesUploadServer( private val peerId: Int? = null -) : VKRequest("photos.getMessagesUploadServer") { +) : ApiRequestBase(methodName = "photos.getMessagesUploadServer") { init { peerId?.let { value -> addParam("peer_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetNewTags.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetNewTags.kt index d6dccef662..a336474ba6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetNewTags.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetNewTags.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetNewTagsResponseDto import com.vk.sdk.api.photos.responses.PhotosGetNewTagsResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class PhotosGetNewTags( private val offset: Int? = null, private val count: Int? = null -) : VKRequest("photos.getNewTags") { +) : ApiRequestBase(methodName = "photos.getNewTags") { init { offset?.let { value -> addParam("offset", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetOwnerCoverPhotoUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetOwnerCoverPhotoUploadServer.kt index 6dc463e7ba..fc368f1f9a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetOwnerCoverPhotoUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetOwnerCoverPhotoUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUploadServer import com.vk.sdk.api.base.responses.BaseGetUploadServerResponse @@ -49,7 +49,7 @@ class PhotosGetOwnerCoverPhotoUploadServer( private val cropY: Int? = null, private val cropX2: Int? = null, private val cropY2: Int? = null -) : VKRequest("photos.getOwnerCoverPhotoUploadServer") { +) : ApiRequestBase(methodName = "photos.getOwnerCoverPhotoUploadServer") { init { addParam("group_id", groupId) cropX?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetOwnerPhotoUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetOwnerPhotoUploadServer.kt index e2d819fa8c..c1228460a5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetOwnerPhotoUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetOwnerPhotoUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUploadServer import com.vk.sdk.api.base.responses.BaseGetUploadServerResponse @@ -37,11 +37,11 @@ import org.json.JSONObject /** * Returns an upload server address for a profile or community photo. * @param ownerId identifier of a community or current user. "Note that community id must be - * negative. 'owner_id=1' � user, 'owner_id=-1' � community, " + * negative. 'owner_id=1' - user, 'owner_id=-1' - community, " */ class PhotosGetOwnerPhotoUploadServer( private val ownerId: Int? = null -) : VKRequest("photos.getOwnerPhotoUploadServer") { +) : ApiRequestBase(methodName = "photos.getOwnerPhotoUploadServer") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetTags.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetTags.kt index 74193130a5..bbe8fff4e9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetTags.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetTags.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhotoTag import com.vk.sdk.api.photos.responses.PhotosGetTagsResponse @@ -46,7 +46,7 @@ class PhotosGetTags( private val photoId: Int, private val ownerId: Int? = null, private val accessKey: String? = null -) : VKRequest>("photos.getTags") { +) : ApiRequestBase>(methodName = "photos.getTags") { init { addParam("photo_id", photoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUploadServer.kt index 0ac184781e..e18adcb4e4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhotoUpload import com.vk.sdk.api.photos.responses.PhotosGetUploadServerResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class PhotosGetUploadServer( private val groupId: Int? = null, private val albumId: Int? = null -) : VKRequest("photos.getUploadServer") { +) : ApiRequestBase(methodName = "photos.getUploadServer") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUserPhotos.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUserPhotos.kt index d96cf1b2ee..ae288f6a60 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUserPhotos.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUserPhotos.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetUserPhotosResponseDto import com.vk.sdk.api.photos.responses.PhotosGetUserPhotosResponse @@ -41,8 +41,8 @@ import org.json.JSONObject * @param userId User ID. minimum 0 * @param offset Offset needed to return a specific subset of photos. By default, '0'. minimum 0 * @param count Number of photos to return. Maximum value is 1000. default 20 minimum 0 maximum 1000 - * @param extended '1' � to return an additional 'likes' field, '0' � (default) - * @param sort Sort order: '1' � by date the tag was added in ascending order, '0' � by date the tag + * @param extended '1' - to return an additional 'likes' field, '0' - (default) + * @param sort Sort order: '1' - by date the tag was added in ascending order, '0' - by date the tag * was added in descending order */ class PhotosGetUserPhotos( @@ -51,7 +51,7 @@ class PhotosGetUserPhotos( private val count: Int? = null, private val extended: Boolean? = null, private val sort: String? = null -) : VKRequest("photos.getUserPhotos") { +) : ApiRequestBase(methodName = "photos.getUserPhotos") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUserPhotosExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUserPhotosExtended.kt index 755cb920f4..e7fda914f5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUserPhotosExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetUserPhotosExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosGetUserPhotosExtendedResponseDto import com.vk.sdk.api.photos.responses.PhotosGetUserPhotosExtendedResponse @@ -41,8 +41,8 @@ import org.json.JSONObject * @param userId User ID. minimum 0 * @param offset Offset needed to return a specific subset of photos. By default, '0'. minimum 0 * @param count Number of photos to return. Maximum value is 1000. default 20 minimum 0 maximum 1000 - * @param extended '1' � to return an additional 'likes' field, '0' � (default) - * @param sort Sort order: '1' � by date the tag was added in ascending order, '0' � by date the tag + * @param extended '1' - to return an additional 'likes' field, '0' - (default) + * @param sort Sort order: '1' - by date the tag was added in ascending order, '0' - by date the tag * was added in descending order */ class PhotosGetUserPhotosExtended( @@ -51,7 +51,7 @@ class PhotosGetUserPhotosExtended( private val count: Int? = null, private val extended: Boolean? = null, private val sort: String? = null -) : VKRequest("photos.getUserPhotos") { +) : ApiRequestBase(methodName = "photos.getUserPhotos") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetWallUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetWallUploadServer.kt index 006d385705..73ea27df67 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetWallUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosGetWallUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhotoUpload import com.vk.sdk.api.photos.responses.PhotosGetWallUploadServerResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class PhotosGetWallUploadServer( private val groupId: Int? = null -) : VKRequest("photos.getWallUploadServer") { +) : ApiRequestBase(methodName = "photos.getWallUploadServer") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosMakeCover.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosMakeCover.kt index 5ec863d397..9d611dca62 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosMakeCover.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosMakeCover.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class PhotosMakeCover( private val photoId: Int, private val ownerId: Int? = null, private val albumId: Int? = null -) : VKRequest("photos.makeCover") { +) : ApiRequestBase(methodName = "photos.makeCover") { init { addParam("photo_id", photoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosMove.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosMove.kt index c176c1f5df..eb5742c032 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosMove.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosMove.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class PhotosMove( private val targetAlbumId: Int, private val photoId: Int, private val ownerId: Int? = null -) : VKRequest("photos.move") { +) : ApiRequestBase(methodName = "photos.move") { init { addParam("target_album_id", targetAlbumId) addParam("photo_id", photoId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosPutTag.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosPutTag.kt index d1014d631d..ead81be12d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosPutTag.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosPutTag.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.responses.PhotosPutTagResponse import kotlin.Float @@ -55,7 +55,7 @@ class PhotosPutTag( private val y: Float? = null, private val x2: Float? = null, private val y2: Float? = null -) : VKRequest("photos.putTag") { +) : ApiRequestBase(methodName = "photos.putTag") { init { addParam("photo_id", photoId) addParam("user_id", userId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRemoveTag.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRemoveTag.kt index 9e3fbc491d..7eb819911d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRemoveTag.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRemoveTag.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class PhotosRemoveTag( private val photoId: Int, private val tagId: Int, private val ownerId: Int? = null -) : VKRequest("photos.removeTag") { +) : ApiRequestBase(methodName = "photos.removeTag") { init { addParam("photo_id", photoId) addParam("tag_id", tagId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReorderAlbums.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReorderAlbums.kt index 8e34f8e965..07647ffcfc 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReorderAlbums.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReorderAlbums.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -46,7 +46,7 @@ class PhotosReorderAlbums( private val ownerId: Int? = null, private val before: Int? = null, private val after: Int? = null -) : VKRequest("photos.reorderAlbums") { +) : ApiRequestBase(methodName = "photos.reorderAlbums") { init { addParam("album_id", albumId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReorderPhotos.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReorderPhotos.kt index fe78dbfe20..378c6b5917 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReorderPhotos.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReorderPhotos.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -46,7 +46,7 @@ class PhotosReorderPhotos( private val ownerId: Int? = null, private val before: Int? = null, private val after: Int? = null -) : VKRequest("photos.reorderPhotos") { +) : ApiRequestBase(methodName = "photos.reorderPhotos") { init { addParam("photo_id", photoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReport.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReport.kt index 37432cf91a..a9e54ebb4b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReport.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReport.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,14 +39,14 @@ import org.json.JSONObject * Reports (submits a complaint about) a photo. * @param ownerId ID of the user or community that owns the photo. * @param photoId Photo ID. minimum 0 - * @param reason Reason for the complaint: '0' � spam, '1' � child pornography, '2' � extremism, '3' - * � violence, '4' � drug propaganda, '5' � adult material, '6' � insult, abuse minimum 0 + * @param reason Reason for the complaint: '0' - spam, '1' - child pornography, '2' - extremism, + * '3' - violence, '4' - drug propaganda, '5' - adult material, '6' - insult, abuse minimum 0 */ class PhotosReport( private val ownerId: Int, private val photoId: Int, private val reason: PhotosReportReason? = null -) : VKRequest("photos.report") { +) : ApiRequestBase(methodName = "photos.report") { init { addParam("owner_id", ownerId) addParam("photo_id", photoId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReportComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReportComment.kt index d4abf7b45b..1871cb3c4d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReportComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosReportComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,14 +39,14 @@ import org.json.JSONObject * Reports (submits a complaint about) a comment on a photo. * @param ownerId ID of the user or community that owns the photo. * @param commentId ID of the comment being reported. minimum 0 - * @param reason Reason for the complaint: '0' � spam, '1' � child pornography, '2' � extremism, '3' - * � violence, '4' � drug propaganda, '5' � adult material, '6' � insult, abuse minimum 0 + * @param reason Reason for the complaint: '0' - spam, '1' - child pornography, '2' - extremism, + * '3' - violence, '4' - drug propaganda, '5' - adult material, '6' - insult, abuse minimum 0 */ class PhotosReportComment( private val ownerId: Int, private val commentId: Int, private val reason: PhotosReportCommentReason? = null -) : VKRequest("photos.reportComment") { +) : ApiRequestBase(methodName = "photos.reportComment") { init { addParam("owner_id", ownerId) addParam("comment_id", commentId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRestore.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRestore.kt index b089bff476..d57102c21b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRestore.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRestore.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class PhotosRestore( private val photoId: Int, private val ownerId: Int? = null -) : VKRequest("photos.restore") { +) : ApiRequestBase(methodName = "photos.restore") { init { addParam("photo_id", photoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRestoreComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRestoreComment.kt index 1b20d35cc7..6263906a9f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRestoreComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosRestoreComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.photos.responses.PhotosRestoreCommentResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class PhotosRestoreComment( private val commentId: Int, private val ownerId: Int? = null -) : VKRequest("photos.restoreComment") { +) : ApiRequestBase(methodName = "photos.restoreComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSave.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSave.kt index 3b98868ac2..26786653de 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSave.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSave.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhoto import com.vk.sdk.api.photos.responses.PhotosSaveResponse @@ -58,7 +58,7 @@ class PhotosSave( private val latitude: Float? = null, private val longitude: Float? = null, private val caption: String? = null -) : VKRequest>("photos.save") { +) : ApiRequestBase>(methodName = "photos.save") { init { albumId?.let { value -> addParam("album_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMarketAlbumPhoto.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMarketAlbumPhoto.kt index d1a99b0886..ba958495de 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMarketAlbumPhoto.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMarketAlbumPhoto.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhoto import com.vk.sdk.api.photos.responses.PhotosSaveMarketAlbumPhotoResponse @@ -49,7 +49,7 @@ class PhotosSaveMarketAlbumPhoto( private val photo: String, private val server: Int, private val hash: String -) : VKRequest>("photos.saveMarketAlbumPhoto") { +) : ApiRequestBase>(methodName = "photos.saveMarketAlbumPhoto") { init { addParam("group_id", groupId) addParam("photo", photo) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMarketPhoto.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMarketPhoto.kt index 389dcab678..1d5837aed8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMarketPhoto.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMarketPhoto.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhoto import com.vk.sdk.api.photos.responses.PhotosSaveMarketPhotoResponse @@ -52,7 +52,7 @@ class PhotosSaveMarketPhoto( private val groupId: Int? = null, private val cropData: String? = null, private val cropHash: String? = null -) : VKRequest>("photos.saveMarketPhoto") { +) : ApiRequestBase>(methodName = "photos.saveMarketPhoto") { init { addParam("photo", photo) addParam("server", server) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMessagesPhoto.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMessagesPhoto.kt index d8d2e42175..cfceb873dc 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMessagesPhoto.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveMessagesPhoto.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhoto import com.vk.sdk.api.photos.responses.PhotosSaveMessagesPhotoResponse @@ -48,7 +48,7 @@ class PhotosSaveMessagesPhoto( private val photo: String, private val server: Int? = null, private val hash: String? = null -) : VKRequest>("photos.saveMessagesPhoto") { +) : ApiRequestBase>(methodName = "photos.saveMessagesPhoto") { init { addParam("photo", photo) server?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveOwnerCoverPhoto.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveOwnerCoverPhoto.kt index 160258ac49..71ff9c58a9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveOwnerCoverPhoto.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveOwnerCoverPhoto.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseImage import com.vk.sdk.api.photos.responses.PhotosSaveOwnerCoverPhotoResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class PhotosSaveOwnerCoverPhoto( private val hash: String, private val photo: String -) : VKRequest>("photos.saveOwnerCoverPhoto") { +) : ApiRequestBase>(methodName = "photos.saveOwnerCoverPhoto") { init { addParam("hash", hash) addParam("photo", photo) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveOwnerPhoto.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveOwnerPhoto.kt index 68569b6860..e6d5535832 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveOwnerPhoto.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveOwnerPhoto.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosSaveOwnerPhotoResponseDto import com.vk.sdk.api.photos.responses.PhotosSaveOwnerPhotoResponse @@ -45,7 +45,7 @@ class PhotosSaveOwnerPhoto( private val server: String? = null, private val hash: String? = null, private val photo: String? = null -) : VKRequest("photos.saveOwnerPhoto") { +) : ApiRequestBase(methodName = "photos.saveOwnerPhoto") { init { server?.let { value -> addParam("server", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveWallPhoto.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveWallPhoto.kt index b815072710..0a24a1854b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveWallPhoto.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSaveWallPhoto.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosPhoto import com.vk.sdk.api.photos.responses.PhotosSaveWallPhotoResponse @@ -58,7 +58,7 @@ class PhotosSaveWallPhoto( private val latitude: Float? = null, private val longitude: Float? = null, private val caption: String? = null -) : VKRequest>("photos.saveWallPhoto") { +) : ApiRequestBase>(methodName = "photos.saveWallPhoto") { init { addParam("photo", photo) userId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSearch.kt index d8eee675db..93ba88729c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/photos/methods/PhotosSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.photos.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.photos.dto.PhotosSearchResponseDto import com.vk.sdk.api.photos.responses.PhotosSearchResponse @@ -59,7 +59,7 @@ class PhotosSearch( private val offset: Int? = null, private val count: Int? = null, private val radius: Int? = null -) : VKRequest("photos.search") { +) : ApiRequestBase(methodName = "photos.search") { init { q?.let { value -> addParam("q", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsClearRecentSearches.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsClearRecentSearches.kt index 3b0226b20a..a21eea5003 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsClearRecentSearches.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsClearRecentSearches.kt @@ -27,13 +27,14 @@ // ********************************************************************* package com.vk.sdk.api.podcasts.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse import org.json.JSONObject -class PodcastsClearRecentSearches : VKRequest("podcasts.clearRecentSearches") { +class PodcastsClearRecentSearches : ApiRequestBase(methodName = + "podcasts.clearRecentSearches") { override fun parse(r: JSONObject): BaseOkResponseDto = GsonHolder.gson.fromJson(r.toString(), BaseOkResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsGetPopular.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsGetPopular.kt index 983bf7c83a..182c8fc157 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsGetPopular.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsGetPopular.kt @@ -27,14 +27,15 @@ // ********************************************************************* package com.vk.sdk.api.podcasts.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.podcast.dto.PodcastPopularPodcast import com.vk.sdk.api.podcasts.responses.PodcastsGetPopularResponse import kotlin.collections.List import org.json.JSONObject -class PodcastsGetPopular : VKRequest>("podcasts.getPopular") { +class PodcastsGetPopular : ApiRequestBase>(methodName = + "podcasts.getPopular") { override fun parse(r: JSONObject): List = GsonHolder.gson.fromJson(r.toString(), PodcastsGetPopularResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsGetRecentSearchRequests.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsGetRecentSearchRequests.kt index 839457bccc..116612b311 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsGetRecentSearchRequests.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsGetRecentSearchRequests.kt @@ -27,15 +27,15 @@ // ********************************************************************* package com.vk.sdk.api.podcasts.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.podcasts.responses.PodcastsGetRecentSearchRequestsResponse import kotlin.String import kotlin.collections.List import org.json.JSONObject -class PodcastsGetRecentSearchRequests : VKRequest>("podcasts.getRecentSearchRequests") - { +class PodcastsGetRecentSearchRequests : ApiRequestBase>(methodName = + "podcasts.getRecentSearchRequests") { override fun parse(r: JSONObject): List = GsonHolder.gson.fromJson(r.toString(), PodcastsGetRecentSearchRequestsResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsSearch.kt index e59ac49ef0..01c6829b5b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/podcasts/methods/PodcastsSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.podcasts.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.podcasts.dto.PodcastsSearchResponseDto import com.vk.sdk.api.podcasts.responses.PodcastsSearchResponse @@ -44,7 +44,7 @@ class PodcastsSearch( private val searchString: String, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("podcasts.search") { +) : ApiRequestBase(methodName = "podcasts.search") { init { addParam("search_string", searchString) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsAddVote.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsAddVote.kt index e82fcdd0d8..9896852733 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsAddVote.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsAddVote.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.polls.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.polls.responses.PollsAddVoteResponse @@ -49,7 +49,7 @@ class PollsAddVote( private val answerIds: List, private val ownerId: Int? = null, private val isBoard: Boolean? = null -) : VKRequest("polls.addVote") { +) : ApiRequestBase(methodName = "polls.addVote") { init { addParam("poll_id", pollId) addParam("answer_ids", answerIds) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsCreate.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsCreate.kt index b8c6ab21fd..a2b3570fae 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsCreate.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsCreate.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.polls.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.polls.dto.PollsCreateBackgroundId import com.vk.sdk.api.polls.dto.PollsPoll @@ -40,7 +40,7 @@ import org.json.JSONObject /** * Creates polls that can be attached to the users' or communities' posts. * @param question question text - * @param isAnonymous '1' � anonymous poll, participants list is hidden,, '0' � public poll, + * @param isAnonymous '1' - anonymous poll, participants list is hidden,, '0' - public poll, * participants list is available,, Default value is '0'. * @param isMultiple * @param endDate minimum 1550700000 @@ -62,7 +62,7 @@ class PollsCreate( private val photoId: Int? = null, private val backgroundId: PollsCreateBackgroundId? = null, private val disableUnvote: Boolean? = null -) : VKRequest("polls.create") { +) : ApiRequestBase(methodName = "polls.create") { init { question?.let { value -> addParam("question", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsDeleteVote.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsDeleteVote.kt index 1d156ec9c1..73d9642e59 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsDeleteVote.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsDeleteVote.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.polls.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.polls.responses.PollsDeleteVoteResponse @@ -48,7 +48,7 @@ class PollsDeleteVote( private val answerId: Int, private val ownerId: Int? = null, private val isBoard: Boolean? = null -) : VKRequest("polls.deleteVote") { +) : ApiRequestBase(methodName = "polls.deleteVote") { init { addParam("poll_id", pollId) addParam("answer_id", answerId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsEdit.kt index b615e7442d..e33ead0784 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.polls.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject * @param ownerId poll owner id * @param question new question text * @param addAnswers answers list, for example: , "["yes","no","maybe"]" - * @param editAnswers object containing answers that need to be edited,, key � answer id, value � + * @param editAnswers object containing answers that need to be edited,, key - answer id, value - * new answer text. Example: {"382967099":"option1", "382967103":"option2"}" * @param deleteAnswers list of answer ids to be deleted. For example: "[382967099, 382967103]" * @param endDate minimum 0 @@ -59,7 +59,7 @@ class PollsEdit( private val endDate: Int? = null, private val photoId: Int? = null, private val backgroundId: PollsEditBackgroundId? = null -) : VKRequest("polls.edit") { +) : ApiRequestBase(methodName = "polls.edit") { init { addParam("poll_id", pollId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsGetById.kt index 945bcf4ad1..aa1bca19c9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.polls.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.polls.dto.PollsGetByIdNameCase import com.vk.sdk.api.polls.dto.PollsPoll @@ -43,7 +43,7 @@ import org.json.JSONObject * @param pollId Poll ID. minimum 0 * @param ownerId ID of the user or community that owns the poll. Use a negative value to designate * a community ID. - * @param isBoard '1' � poll is in a board, '0' � poll is on a wall. '0' by default. + * @param isBoard '1' - poll is in a board, '0' - poll is on a wall. '0' by default. * @param extended * @param friendsCount default 3 minimum 0 maximum 100 * @param fields @@ -57,7 +57,7 @@ class PollsGetById( private val friendsCount: Int? = null, private val fields: List? = null, private val nameCase: PollsGetByIdNameCase? = null -) : VKRequest("polls.getById") { +) : ApiRequestBase(methodName = "polls.getById") { init { addParam("poll_id", pollId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsGetVoters.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsGetVoters.kt index 4fffb8c7e8..a680bc250d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsGetVoters.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/polls/methods/PollsGetVoters.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.polls.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.polls.dto.PollsGetVotersNameCase import com.vk.sdk.api.polls.dto.PollsVoters @@ -45,16 +45,16 @@ import org.json.JSONObject * @param ownerId ID of the user or community that owns the poll. Use a negative value to designate * a community ID. * @param isBoard - * @param friendsOnly '1' � to return only current user's friends, '0' � to return all users + * @param friendsOnly '1' - to return only current user's friends, '0' - to return all users * (default), - * @param offset Offset needed to return a specific subset of voters. '0' � (default) minimum 0 + * @param offset Offset needed to return a specific subset of voters. '0' - (default) minimum 0 * @param count Number of user IDs to return (if the 'friends_only' parameter is not set, maximum - * '1000', otherwise '10'). '100' � (default) minimum 0 + * '1000', otherwise '10'). '100' - (default) minimum 0 * @param fields Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate * (birthdate)', 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', * 'rate', 'contacts', 'education', 'online', 'counters'. - * @param nameCase Case for declension of user name and surname: , 'nom' � nominative (default) , - * 'gen' � genitive , 'dat' � dative , 'acc' � accusative , 'ins' � instrumental , 'abl' � + * @param nameCase Case for declension of user name and surname: , 'nom' - nominative (default) , + * 'gen' - genitive , 'dat' - dative , 'acc' - accusative , 'ins' - instrumental , 'abl' - * prepositional */ class PollsGetVoters( @@ -67,7 +67,7 @@ class PollsGetVoters( private val count: Int? = null, private val fields: List? = null, private val nameCase: PollsGetVotersNameCase? = null -) : VKRequest>("polls.getVoters") { +) : ApiRequestBase>(methodName = "polls.getVoters") { init { addParam("poll_id", pollId) addParam("answer_ids", answerIds) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsCreate.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsCreate.kt index 0996729234..fc8d4a3aef 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsCreate.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsCreate.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.prettyCards.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.prettyCards.dto.PrettyCardsCreateResponseDto import com.vk.sdk.api.prettyCards.responses.PrettyCardsCreateResponse @@ -52,7 +52,7 @@ class PrettyCardsCreate( private val price: String? = null, private val priceOld: String? = null, private val button: String? = null -) : VKRequest("prettyCards.create") { +) : ApiRequestBase(methodName = "prettyCards.create") { init { addParam("owner_id", ownerId) addParam("photo", photo) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsDelete.kt index 9ae7229fa8..7a0e9a051b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.prettyCards.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.prettyCards.dto.PrettyCardsDeleteResponseDto import com.vk.sdk.api.prettyCards.responses.PrettyCardsDeleteResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class PrettyCardsDelete( private val ownerId: Int, private val cardId: Int -) : VKRequest("prettyCards.delete") { +) : ApiRequestBase(methodName = "prettyCards.delete") { init { addParam("owner_id", ownerId) addParam("card_id", cardId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsEdit.kt index 613afbda22..a6ae638a6f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.prettyCards.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.prettyCards.dto.PrettyCardsEditResponseDto import com.vk.sdk.api.prettyCards.responses.PrettyCardsEditResponse @@ -54,7 +54,7 @@ class PrettyCardsEdit( private val price: String? = null, private val priceOld: String? = null, private val button: String? = null -) : VKRequest("prettyCards.edit") { +) : ApiRequestBase(methodName = "prettyCards.edit") { init { addParam("owner_id", ownerId) addParam("card_id", cardId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGet.kt index b0ce23f094..e23c419005 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.prettyCards.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.prettyCards.dto.PrettyCardsGetResponseDto import com.vk.sdk.api.prettyCards.responses.PrettyCardsGetResponse @@ -43,7 +43,7 @@ class PrettyCardsGet( private val ownerId: Int, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("prettyCards.get") { +) : ApiRequestBase(methodName = "prettyCards.get") { init { addParam("owner_id", ownerId) offset?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGetById.kt index 81035b49f5..4cbc1a47b8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.prettyCards.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.prettyCards.dto.PrettyCardsPrettyCard import com.vk.sdk.api.prettyCards.responses.PrettyCardsGetByIdResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class PrettyCardsGetById( private val ownerId: Int, private val cardIds: List -) : VKRequest>("prettyCards.getById") { +) : ApiRequestBase>(methodName = "prettyCards.getById") { init { addParam("owner_id", ownerId) addParam("card_ids", cardIds) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGetUploadURL.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGetUploadURL.kt index c387dd664f..707938c3ca 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGetUploadURL.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/prettyCards/methods/PrettyCardsGetUploadURL.kt @@ -27,13 +27,13 @@ // ********************************************************************* package com.vk.sdk.api.prettyCards.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.prettyCards.responses.PrettyCardsGetUploadURLResponse import kotlin.String import org.json.JSONObject -class PrettyCardsGetUploadURL : VKRequest("prettyCards.getUploadURL") { +class PrettyCardsGetUploadURL : ApiRequestBase(methodName = "prettyCards.getUploadURL") { override fun parse(r: JSONObject): String = GsonHolder.gson.fromJson(r.toString(), PrettyCardsGetUploadURLResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/search/methods/SearchGetHints.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/search/methods/SearchGetHints.kt index 21755415ca..43caa66049 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/search/methods/SearchGetHints.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/search/methods/SearchGetHints.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.search.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.search.dto.SearchGetHintsResponseDto import com.vk.sdk.api.search.responses.SearchGetHintsResponse @@ -53,7 +53,7 @@ class SearchGetHints( private val filters: List? = null, private val fields: List? = null, private val searchGlobal: Boolean? = null -) : VKRequest("search.getHints") { +) : ApiRequestBase(methodName = "search.getHints") { init { q?.let { value -> addParam("q", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureAddAppEvent.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureAddAppEvent.kt index b834183ab1..abcd67a5bd 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureAddAppEvent.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureAddAppEvent.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -37,16 +37,16 @@ import org.json.JSONObject /** * Adds user activity information to an application * @param userId ID of a user to save the data minimum 0 - * @param activityId there are 2 default activities: , * 1 � level. Works similar to ,, * 2 � + * @param activityId there are 2 default activities: , * 1 - level. Works similar to ,, * 2 - * points, saves points amount, Any other value is for saving completed missions minimum 0 - * @param value depends on activity_id: * 1 � number, current level number,, * 2 � number, current + * @param value depends on activity_id: * 1 - number, current level number,, * 2 - number, current * user's points amount, , Any other value is ignored minimum 0 */ class SecureAddAppEvent( private val userId: Int, private val activityId: Int, private val value: Int? = null -) : VKRequest("secure.addAppEvent") { +) : ApiRequestBase(methodName = "secure.addAppEvent") { init { addParam("user_id", userId) addParam("activity_id", activityId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureCheckToken.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureCheckToken.kt index 5a17752ced..62d64d2edb 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureCheckToken.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureCheckToken.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.secure.dto.SecureTokenChecked import com.vk.sdk.api.secure.responses.SecureCheckTokenResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class SecureCheckToken( private val token: String? = null, private val ip: String? = null -) : VKRequest("secure.checkToken") { +) : ApiRequestBase(methodName = "secure.checkToken") { init { token?.let { value -> addParam("token", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetAppBalance.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetAppBalance.kt index b693db73b4..76b35615da 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetAppBalance.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetAppBalance.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.secure.responses.SecureGetAppBalanceResponse import kotlin.Int @@ -36,7 +36,7 @@ import org.json.JSONObject /** * Returns payment balance of the application in hundredth of a vote. */ -class SecureGetAppBalance : VKRequest("secure.getAppBalance") { +class SecureGetAppBalance : ApiRequestBase(methodName = "secure.getAppBalance") { override fun parse(r: JSONObject): Int = GsonHolder.gson.fromJson(r.toString(), SecureGetAppBalanceResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetSMSHistory.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetSMSHistory.kt index 4d57cd42a2..cbd4801530 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetSMSHistory.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetSMSHistory.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.secure.dto.SecureSmsNotification import com.vk.sdk.api.secure.responses.SecureGetSMSHistoryResponse @@ -41,14 +41,14 @@ import org.json.JSONObject * @param userId minimum 0 * @param dateFrom filter by start date. It is set as UNIX-time. minimum 0 * @param dateTo filter by end date. It is set as UNIX-time. minimum 0 - * @param limit number of returned posts. By default � 1000. default 1000 minimum 0 maximum 1000 + * @param limit number of returned posts. By default - 1000. default 1000 minimum 0 maximum 1000 */ class SecureGetSMSHistory( private val userId: Int? = null, private val dateFrom: Int? = null, private val dateTo: Int? = null, private val limit: Int? = null -) : VKRequest>("secure.getSMSHistory") { +) : ApiRequestBase>(methodName = "secure.getSMSHistory") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetTransactionsHistory.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetTransactionsHistory.kt index c4839639b1..3fc7037560 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetTransactionsHistory.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetTransactionsHistory.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.secure.dto.SecureTransaction import com.vk.sdk.api.secure.responses.SecureGetTransactionsHistoryResponse @@ -51,7 +51,7 @@ class SecureGetTransactionsHistory( private val dateFrom: Int? = null, private val dateTo: Int? = null, private val limit: Int? = null -) : VKRequest>("secure.getTransactionsHistory") { +) : ApiRequestBase>(methodName = "secure.getTransactionsHistory") { init { type?.let { value -> addParam("type", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetUserLevel.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetUserLevel.kt index a602616f42..29b3982904 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetUserLevel.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGetUserLevel.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.secure.dto.SecureLevel import com.vk.sdk.api.secure.responses.SecureGetUserLevelResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class SecureGetUserLevel( private val userIds: List -) : VKRequest>("secure.getUserLevel") { +) : ApiRequestBase>(methodName = "secure.getUserLevel") { init { addParam("user_ids", userIds) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGiveEventSticker.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGiveEventSticker.kt index b898ccc150..e09fceab0e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGiveEventSticker.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureGiveEventSticker.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.secure.responses.SecureGiveEventStickerResponse import kotlin.Any @@ -43,7 +43,7 @@ import org.json.JSONObject class SecureGiveEventSticker( private val userIds: List, private val achievementId: Int -) : VKRequest>("secure.giveEventSticker") { +) : ApiRequestBase>(methodName = "secure.giveEventSticker") { init { addParam("user_ids", userIds) addParam("achievement_id", achievementId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSendNotification.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSendNotification.kt index db283819e5..b227013770 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSendNotification.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSendNotification.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.secure.responses.SecureSendNotificationResponse import kotlin.Int @@ -46,7 +46,7 @@ class SecureSendNotification( private val message: String, private val userIds: List? = null, private val userId: Int? = null -) : VKRequest>("secure.sendNotification") { +) : ApiRequestBase>(methodName = "secure.sendNotification") { init { addParam("message", message) userIds?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSendSMSNotification.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSendSMSNotification.kt index dc1822dcd9..408ae48525 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSendSMSNotification.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSendSMSNotification.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ import org.json.JSONObject class SecureSendSMSNotification( private val userId: Int, private val message: String -) : VKRequest("secure.sendSMSNotification") { +) : ApiRequestBase(methodName = "secure.sendSMSNotification") { init { addParam("user_id", userId) addParam("message", message) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSetCounter.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSetCounter.kt index f36e715dd2..39dc46a660 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSetCounter.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/secure/methods/SecureSetCounter.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.secure.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -49,7 +49,7 @@ class SecureSetCounter( private val userId: Int? = null, private val counter: Int? = null, private val increment: Boolean? = null -) : VKRequest("secure.setCounter") { +) : ApiRequestBase(methodName = "secure.setCounter") { init { counters?.let { value -> addParam("counters", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsGet.kt index 9f5edda35a..fec98204f1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stats.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.stats.dto.StatsGetInterval import com.vk.sdk.api.stats.dto.StatsPeriod @@ -60,7 +60,7 @@ class StatsGet( private val filters: List? = null, private val statsGroups: List? = null, private val extended: Boolean? = null -) : VKRequest>("stats.get") { +) : ApiRequestBase>(methodName = "stats.get") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsGetPostReach.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsGetPostReach.kt index e6545fda68..b3f19e3f66 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsGetPostReach.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsGetPostReach.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stats.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.stats.dto.StatsWallpostStat import com.vk.sdk.api.stats.responses.StatsGetPostReachResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class StatsGetPostReach( private val ownerId: String, private val postIds: List -) : VKRequest>("stats.getPostReach") { +) : ApiRequestBase>(methodName = "stats.getPostReach") { init { addParam("owner_id", ownerId) addParam("post_ids", postIds) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsTrackVisitor.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsTrackVisitor.kt index 24e84b7386..e07dafcf05 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsTrackVisitor.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stats/methods/StatsTrackVisitor.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stats.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class StatsTrackVisitor( private val id: String -) : VKRequest("stats.trackVisitor") { +) : ApiRequestBase(methodName = "stats.trackVisitor") { init { addParam("id", id) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/status/methods/StatusGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/status/methods/StatusGet.kt index d5381492a0..8ce9207d21 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/status/methods/StatusGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/status/methods/StatusGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.status.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.status.dto.StatusStatus import com.vk.sdk.api.status.responses.StatusGetResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class StatusGet( private val userId: Int? = null, private val groupId: Int? = null -) : VKRequest("status.get") { +) : ApiRequestBase(methodName = "status.get") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/status/methods/StatusSet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/status/methods/StatusSet.kt index 9a23bb4901..b3f2714ad5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/status/methods/StatusSet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/status/methods/StatusSet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.status.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ import org.json.JSONObject class StatusSet( private val text: String? = null, private val groupId: Int? = null -) : VKRequest("status.set") { +) : ApiRequestBase(methodName = "status.set") { init { text?.let { value -> addParam("text", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageGet.kt index f301639c38..c3889bb85c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.storage.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.storage.dto.StorageValue import com.vk.sdk.api.storage.responses.StorageGetV5110Response @@ -46,7 +46,7 @@ class StorageGet( private val key: String? = null, private val keys: List? = null, private val userId: Int? = null -) : VKRequest>("storage.get") { +) : ApiRequestBase>(methodName = "storage.get") { init { key?.let { value -> addParam("key", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageGetKeys.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageGetKeys.kt index 6aa51debbb..3c34c0333f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageGetKeys.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageGetKeys.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.storage.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.storage.responses.StorageGetKeysResponse import kotlin.Int @@ -47,7 +47,7 @@ class StorageGetKeys( private val userId: Int? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest>("storage.getKeys") { +) : ApiRequestBase>(methodName = "storage.getKeys") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageSet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageSet.kt index 969c3cde29..695b4e61e2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageSet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/storage/methods/StorageSet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.storage.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -45,7 +45,7 @@ class StorageSet( private val key: String, private val value: String? = null, private val userId: Int? = null -) : VKRequest("storage.set") { +) : ApiRequestBase(methodName = "storage.set") { init { addParam("key", key) value?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesBanOwner.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesBanOwner.kt index 742282221a..bdc4b0b355 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesBanOwner.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesBanOwner.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class StoriesBanOwner( private val ownersIds: List -) : VKRequest("stories.banOwner") { +) : ApiRequestBase(methodName = "stories.banOwner") { init { addParam("owners_ids", ownersIds) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesDelete.kt index 36a930e73b..794dd69dac 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -46,7 +46,7 @@ class StoriesDelete( private val ownerId: Int? = null, private val storyId: Int? = null, private val stories: List? = null -) : VKRequest("stories.delete") { +) : ApiRequestBase(methodName = "stories.delete") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGet.kt index 6bfc0d57d4..c54a75654a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.stories.dto.StoriesGetV5113ResponseDto @@ -40,7 +40,7 @@ import org.json.JSONObject /** * Returns stories available for current user. * @param ownerId Owner ID. - * @param extended '1' � to return additional fields for users and communities. Default value is 0. + * @param extended '1' - to return additional fields for users and communities. Default value is 0. * default false * @param fields */ @@ -48,7 +48,7 @@ class StoriesGet( private val ownerId: Int? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("stories.get") { +) : ApiRequestBase(methodName = "stories.get") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetBanned.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetBanned.kt index 850a003e61..90858428be 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetBanned.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetBanned.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.stories.dto.StoriesGetBannedResponseDto @@ -38,13 +38,13 @@ import org.json.JSONObject /** * Returns list of sources hidden from current user's feed. - * @param extended '1' � to return additional fields for users and communities. Default value is 0. + * @param extended '1' - to return additional fields for users and communities. Default value is 0. * @param fields Additional fields to return */ class StoriesGetBanned( private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("stories.getBanned") { +) : ApiRequestBase(methodName = "stories.getBanned") { init { extended?.let { value -> addParam("extended", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetBannedExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetBannedExtended.kt index 6fcc9710d4..ad804e558d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetBannedExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetBannedExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.stories.dto.StoriesGetBannedExtendedResponseDto @@ -38,13 +38,13 @@ import org.json.JSONObject /** * Returns list of sources hidden from current user's feed. - * @param extended '1' � to return additional fields for users and communities. Default value is 0. + * @param extended '1' - to return additional fields for users and communities. Default value is 0. * @param fields Additional fields to return */ class StoriesGetBannedExtended( private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("stories.getBanned") { +) : ApiRequestBase(methodName = "stories.getBanned") { init { extended?.let { value -> addParam("extended", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetById.kt index a9cb57ec02..17e4ea3f74 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.stories.dto.StoriesGetByIdResponseDto @@ -41,7 +41,7 @@ import org.json.JSONObject * Returns story by its ID. * @param stories Stories IDs separated by commas. Use format {owner_id}+'_'+{story_id}, for * example, 12345_54331. - * @param extended '1' � to return additional fields for users and communities. Default value is 0. + * @param extended '1' - to return additional fields for users and communities. Default value is 0. * default false * @param fields Additional fields to return */ @@ -49,7 +49,7 @@ class StoriesGetById( private val stories: List, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("stories.getById") { +) : ApiRequestBase(methodName = "stories.getById") { init { addParam("stories", stories) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetByIdExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetByIdExtended.kt index 5f9cdb580d..14ecd3f642 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetByIdExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetByIdExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.stories.dto.StoriesGetByIdExtendedResponseDto @@ -41,7 +41,7 @@ import org.json.JSONObject * Returns story by its ID. * @param stories Stories IDs separated by commas. Use format {owner_id}+'_'+{story_id}, for * example, 12345_54331. - * @param extended '1' � to return additional fields for users and communities. Default value is 0. + * @param extended '1' - to return additional fields for users and communities. Default value is 0. * default false * @param fields Additional fields to return */ @@ -49,7 +49,7 @@ class StoriesGetByIdExtended( private val stories: List, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("stories.getById") { +) : ApiRequestBase(methodName = "stories.getById") { init { addParam("stories", stories) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetPhotoUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetPhotoUploadServer.kt index dfb7361bd8..25e8a2bd27 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetPhotoUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetPhotoUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.stories.dto.StoriesGetPhotoUploadServerResponseDto import com.vk.sdk.api.stories.responses.StoriesGetPhotoUploadServerResponse @@ -39,7 +39,7 @@ import org.json.JSONObject /** * Returns URL for uploading a story with photo. - * @param addToNews 1 � to add the story to friend's feed. + * @param addToNews 1 - to add the story to friend's feed. * @param userIds List of users IDs who can see the story. * @param replyToStory ID of the story to reply with the current. * @param linkText Link text (for community's stories only). @@ -56,7 +56,8 @@ class StoriesGetPhotoUploadServer( private val linkUrl: String? = null, private val groupId: Int? = null, private val clickableStickers: String? = null -) : VKRequest("stories.getPhotoUploadServer") { +) : ApiRequestBase(methodName = + "stories.getPhotoUploadServer") { init { addToNews?.let { value -> addParam("add_to_news", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetReplies.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetReplies.kt index 695b20929d..3573d8a6b4 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetReplies.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetReplies.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.stories.dto.StoriesGetV5113ResponseDto @@ -43,7 +43,7 @@ import org.json.JSONObject * @param ownerId Story owner ID. * @param storyId Story ID. minimum 0 * @param accessKey Access key for the private object. - * @param extended '1' � to return additional fields for users and communities. Default value is 0. + * @param extended '1' - to return additional fields for users and communities. Default value is 0. * default false * @param fields Additional fields to return */ @@ -53,7 +53,7 @@ class StoriesGetReplies( private val accessKey: String? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("stories.getReplies") { +) : ApiRequestBase(methodName = "stories.getReplies") { init { addParam("owner_id", ownerId) addParam("story_id", storyId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetStats.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetStats.kt index 7b94e43cb0..6abea4cf68 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetStats.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetStats.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.stories.dto.StoriesStoryStats import com.vk.sdk.api.stories.responses.StoriesGetStatsResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class StoriesGetStats( private val ownerId: Int, private val storyId: Int -) : VKRequest("stories.getStats") { +) : ApiRequestBase(methodName = "stories.getStats") { init { addParam("owner_id", ownerId) addParam("story_id", storyId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetVideoUploadServer.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetVideoUploadServer.kt index 4fd08b3be6..441ccf8bc6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetVideoUploadServer.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetVideoUploadServer.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.stories.dto.StoriesGetVideoUploadServerResponseDto import com.vk.sdk.api.stories.responses.StoriesGetVideoUploadServerResponse @@ -39,7 +39,7 @@ import org.json.JSONObject /** * Allows to receive URL for uploading story with video. - * @param addToNews 1 � to add the story to friend's feed. + * @param addToNews 1 - to add the story to friend's feed. * @param userIds List of users IDs who can see the story. * @param replyToStory ID of the story to reply with the current. * @param linkText Link text (for community's stories only). @@ -56,7 +56,8 @@ class StoriesGetVideoUploadServer( private val linkUrl: String? = null, private val groupId: Int? = null, private val clickableStickers: String? = null -) : VKRequest("stories.getVideoUploadServer") { +) : ApiRequestBase(methodName = + "stories.getVideoUploadServer") { init { addToNews?.let { value -> addParam("add_to_news", if (value) 1 else 0) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetViewers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetViewers.kt index b12238405d..c35b76958a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetViewers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetViewers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.stories.dto.StoriesGetViewersExtendedV5115ResponseDto import com.vk.sdk.api.stories.responses.StoriesGetViewersExtendedV5115Response @@ -41,7 +41,7 @@ import org.json.JSONObject * @param storyId Story ID. minimum 0 * @param count Maximum number of results. default 100 minimum 0 * @param offset Offset needed to return a specific subset of results. default 0 minimum 0 - * @param extended '1' � to return detailed information about photos default 0 + * @param extended '1' - to return detailed information about photos default 0 */ class StoriesGetViewers( private val ownerId: Int, @@ -49,7 +49,7 @@ class StoriesGetViewers( private val count: Int? = null, private val offset: Int? = null, private val extended: Boolean? = null -) : VKRequest("stories.getViewers") { +) : ApiRequestBase(methodName = "stories.getViewers") { init { addParam("owner_id", ownerId) addParam("story_id", storyId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetViewersExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetViewersExtended.kt index 519d7da929..8efd1cecf9 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetViewersExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesGetViewersExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.stories.dto.StoriesGetViewersExtendedV5115ResponseDto import com.vk.sdk.api.stories.responses.StoriesGetViewersExtendedV5115Response @@ -41,7 +41,7 @@ import org.json.JSONObject * @param storyId Story ID. minimum 0 * @param count Maximum number of results. default 100 minimum 0 * @param offset Offset needed to return a specific subset of results. default 0 minimum 0 - * @param extended '1' � to return detailed information about photos default 0 + * @param extended '1' - to return detailed information about photos default 0 */ class StoriesGetViewersExtended( private val ownerId: Int, @@ -49,7 +49,7 @@ class StoriesGetViewersExtended( private val count: Int? = null, private val offset: Int? = null, private val extended: Boolean? = null -) : VKRequest("stories.getViewers") { +) : ApiRequestBase(methodName = "stories.getViewers") { init { addParam("owner_id", ownerId) addParam("story_id", storyId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesHideAllReplies.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesHideAllReplies.kt index c174557b9b..4e253fdd52 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesHideAllReplies.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesHideAllReplies.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class StoriesHideAllReplies( private val ownerId: Int, private val groupId: Int? = null -) : VKRequest("stories.hideAllReplies") { +) : ApiRequestBase(methodName = "stories.hideAllReplies") { init { addParam("owner_id", ownerId) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesHideReply.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesHideReply.kt index 9e42ffb744..02b4b505c1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesHideReply.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesHideReply.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class StoriesHideReply( private val ownerId: Int, private val storyId: Int -) : VKRequest("stories.hideReply") { +) : ApiRequestBase(methodName = "stories.hideReply") { init { addParam("owner_id", ownerId) addParam("story_id", storyId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSave.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSave.kt index ec76e9c9dd..fa7b66e839 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSave.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSave.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.stories.dto.StoriesSaveResponseDto import com.vk.sdk.api.stories.responses.StoriesSaveResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class StoriesSave( private val uploadResults: List -) : VKRequest("stories.save") { +) : ApiRequestBase(methodName = "stories.save") { init { addParam("upload_results", uploadResults) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSearch.kt index e7925ae9d8..b2904ad36c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.stories.dto.StoriesGetV5113ResponseDto import com.vk.sdk.api.stories.responses.StoriesGetV5113Response @@ -59,7 +59,7 @@ class StoriesSearch( private val count: Int? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("stories.search") { +) : ApiRequestBase(methodName = "stories.search") { init { q?.let { value -> addParam("q", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSendInteraction.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSendInteraction.kt index b614614548..f5a9884660 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSendInteraction.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesSendInteraction.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -48,7 +48,7 @@ class StoriesSendInteraction( private val isBroadcast: Boolean? = null, private val isAnonymous: Boolean? = null, private val unseenMarker: Boolean? = null -) : VKRequest("stories.sendInteraction") { +) : ApiRequestBase(methodName = "stories.sendInteraction") { init { addParam("access_key", accessKey) message?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesUnbanOwner.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesUnbanOwner.kt index 7b71554698..2b17a684d2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesUnbanOwner.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/stories/methods/StoriesUnbanOwner.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.stories.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class StoriesUnbanOwner( private val ownersIds: List -) : VKRequest("stories.unbanOwner") { +) : ApiRequestBase(methodName = "stories.unbanOwner") { init { addParam("owners_ids", ownersIds) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/streaming/methods/StreamingGetServerUrl.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/streaming/methods/StreamingGetServerUrl.kt index 3ca164f4b1..43c6004470 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/streaming/methods/StreamingGetServerUrl.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/streaming/methods/StreamingGetServerUrl.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.streaming.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.streaming.dto.StreamingGetServerUrlResponseDto import com.vk.sdk.api.streaming.responses.StreamingGetServerUrlResponse @@ -36,8 +36,8 @@ import org.json.JSONObject /** * Allows to receive data for the connection to Streaming API. */ -class StreamingGetServerUrl : VKRequest("streaming.getServerUrl") - { +class StreamingGetServerUrl : ApiRequestBase(methodName = + "streaming.getServerUrl") { override fun parse(r: JSONObject): StreamingGetServerUrlResponseDto = GsonHolder.gson.fromJson(r.toString(), StreamingGetServerUrlResponse::class.java).response diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/streaming/methods/StreamingSetSettings.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/streaming/methods/StreamingSetSettings.kt index 1b7b00b96e..602fb374f6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/streaming/methods/StreamingSetSettings.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/streaming/methods/StreamingSetSettings.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.streaming.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class StreamingSetSettings( private val monthlyTier: StreamingSetSettingsMonthlyTier? = null -) : VKRequest("streaming.setSettings") { +) : ApiRequestBase(methodName = "streaming.setSettings") { init { monthlyTier?.let { value -> addParam("monthly_tier", value.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGet.kt index e8062b19da..197307488f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.users.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.users.dto.UsersFields import com.vk.sdk.api.users.dto.UsersGetNameCase @@ -44,14 +44,15 @@ import org.json.JSONObject * (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', * 'contacts', 'education', 'online', 'counters', 'relation', 'last_seen', 'activity', * 'can_write_private_message', 'can_see_all_posts', 'can_post', 'universities', 'can_invite_to_chats' - * @param nameCase Case for declension of user name and surname: 'nom' � nominative (default), 'gen' - * � genitive , 'dat' � dative, 'acc' � accusative , 'ins' � instrumental , 'abl' � prepositional + * @param nameCase Case for declension of user name and surname: 'nom' - nominative (default), + * 'gen' - genitive , 'dat' - dative, 'acc' - accusative , 'ins' - instrumental , 'abl' - prepositional + * */ class UsersGet( private val userIds: List? = null, private val fields: List? = null, private val nameCase: UsersGetNameCase? = null -) : VKRequest>("users.get") { +) : ApiRequestBase>(methodName = "users.get") { init { userIds?.let { value -> addParam("user_ids", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGetFollowers.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGetFollowers.kt index f3a408c569..b25ead52ea 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGetFollowers.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGetFollowers.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.users.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.users.dto.UsersFields import com.vk.sdk.api.users.dto.UsersGetFollowersNameCase @@ -46,8 +46,9 @@ import org.json.JSONObject * @param fields Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' * (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', * 'rate', 'contacts', 'education', 'online'. - * @param nameCase Case for declension of user name and surname: 'nom' � nominative (default), 'gen' - * � genitive , 'dat' � dative, 'acc' � accusative , 'ins' � instrumental , 'abl' � prepositional + * @param nameCase Case for declension of user name and surname: 'nom' - nominative (default), + * 'gen' - genitive , 'dat' - dative, 'acc' - accusative , 'ins' - instrumental , 'abl' - prepositional + * */ class UsersGetFollowers( private val userId: Int? = null, @@ -55,7 +56,7 @@ class UsersGetFollowers( private val count: Int? = null, private val fields: List? = null, private val nameCase: UsersGetFollowersNameCase? = null -) : VKRequest("users.getFollowers") { +) : ApiRequestBase(methodName = "users.getFollowers") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGetFollowersFields.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGetFollowersFields.kt index c29e60bec4..cbde424d1a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGetFollowersFields.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersGetFollowersFields.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.users.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.users.dto.UsersFields import com.vk.sdk.api.users.dto.UsersGetFollowersFieldsResponseDto @@ -46,8 +46,9 @@ import org.json.JSONObject * @param fields Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' * (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', * 'rate', 'contacts', 'education', 'online'. - * @param nameCase Case for declension of user name and surname: 'nom' � nominative (default), 'gen' - * � genitive , 'dat' � dative, 'acc' � accusative , 'ins' � instrumental , 'abl' � prepositional + * @param nameCase Case for declension of user name and surname: 'nom' - nominative (default), + * 'gen' - genitive , 'dat' - dative, 'acc' - accusative , 'ins' - instrumental , 'abl' - prepositional + * */ class UsersGetFollowersFields( private val userId: Int? = null, @@ -55,7 +56,7 @@ class UsersGetFollowersFields( private val count: Int? = null, private val fields: List? = null, private val nameCase: UsersGetFollowersNameCase? = null -) : VKRequest("users.getFollowers") { +) : ApiRequestBase(methodName = "users.getFollowers") { init { userId?.let { value -> addParam("user_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersReport.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersReport.kt index 21380660ab..c215846dbe 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersReport.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersReport.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.users.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,15 +39,15 @@ import org.json.JSONObject /** * Reports (submits a complain about) a user. * @param userId ID of the user about whom a complaint is being made. minimum 0 - * @param type Type of complaint: 'porn' � pornography, 'spam' � spamming, 'insult' � abusive - * behavior, 'advertisement' � disruptive advertisements + * @param type Type of complaint: 'porn' - pornography, 'spam' - spamming, 'insult' - abusive + * behavior, 'advertisement' - disruptive advertisements * @param comment Comment describing the complaint. */ class UsersReport( private val userId: Int, private val type: UsersReportType, private val comment: String? = null -) : VKRequest("users.report") { +) : ApiRequestBase(methodName = "users.report") { init { addParam("user_id", userId) addParam("type", type.value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersSearch.kt index 461db68d37..3dff5dc4ec 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/users/methods/UsersSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.users.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.users.dto.UsersFields import com.vk.sdk.api.users.dto.UsersSearchResponseDto @@ -44,7 +44,7 @@ import org.json.JSONObject /** * Returns a list of users matching the search criteria. * @param q Search query string (e.g., 'Vasya Babich'). - * @param sort Sort order: '1' � by date registered, '0' � by rating + * @param sort Sort order: '1' - by date registered, '0' - by rating * @param offset Offset needed to return a specific subset of users. minimum 0 * @param count Number of users to return. default 20 minimum 0 maximum 1000 * @param fields Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' @@ -58,16 +58,16 @@ import org.json.JSONObject * @param universityYear Year of graduation from an institution of higher education. minimum 0 * @param universityFaculty Faculty ID. minimum 0 * @param universityChair Chair ID. minimum 0 - * @param sex '1' � female, '2' � male, '0' � any (default) minimum 0 - * @param status Relationship status: '1' � Not married, '2' � In a relationship, '3' � Engaged, '4' - * � Married, '5' � It's complicated, '6' � Actively searching, '7' � In love minimum 0 + * @param sex '1' - female, '2' - male, '0' - any (default) minimum 0 + * @param status Relationship status: '1' - Not married, '2' - In a relationship, '3' - Engaged, + * '4' - Married, '5' - It's complicated, '6' - Actively searching, '7' - In love minimum 0 * @param ageFrom Minimum age. minimum 0 * @param ageTo Maximum age. minimum 0 * @param birthDay Day of birth. minimum 0 * @param birthMonth Month of birth. minimum 0 * @param birthYear Year of birth. minimum 1900 maximum 2100 - * @param online '1' � online only, '0' � all users - * @param hasPhoto '1' � with photo only, '0' � all users + * @param online '1' - online only, '0' - all users + * @param hasPhoto '1' - with photo only, '0' - all users * @param schoolCountry ID of the country where users finished school. minimum 0 * @param schoolCity ID of the city where users finished school. minimum 0 * @param schoolClass minimum 0 @@ -112,7 +112,7 @@ class UsersSearch( private val position: String? = null, private val groupId: Int? = null, private val fromList: List? = null -) : VKRequest("users.search") { +) : ApiRequestBase(methodName = "users.search") { init { q?.let { value -> addParam("q", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsCheckLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsCheckLink.kt index 9210ce7c20..2fd197e020 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsCheckLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsCheckLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.utils.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.utils.dto.UtilsLinkChecked import com.vk.sdk.api.utils.responses.UtilsCheckLinkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class UtilsCheckLink( private val url: String -) : VKRequest("utils.checkLink") { +) : ApiRequestBase(methodName = "utils.checkLink") { init { addParam("url", url) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsDeleteFromLastShortened.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsDeleteFromLastShortened.kt index 361e3c4b28..a455893943 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsDeleteFromLastShortened.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsDeleteFromLastShortened.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.utils.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,7 +40,7 @@ import org.json.JSONObject */ class UtilsDeleteFromLastShortened( private val key: String -) : VKRequest("utils.deleteFromLastShortened") { +) : ApiRequestBase(methodName = "utils.deleteFromLastShortened") { init { addParam("key", key) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLastShortenedLinks.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLastShortenedLinks.kt index b5af1ac42c..aa466d2558 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLastShortenedLinks.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLastShortenedLinks.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.utils.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.utils.dto.UtilsGetLastShortenedLinksResponseDto import com.vk.sdk.api.utils.responses.UtilsGetLastShortenedLinksResponse @@ -42,7 +42,8 @@ import org.json.JSONObject class UtilsGetLastShortenedLinks( private val count: Int? = null, private val offset: Int? = null -) : VKRequest("utils.getLastShortenedLinks") { +) : ApiRequestBase(methodName = + "utils.getLastShortenedLinks") { init { count?.let { value -> addParam("count", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLinkStats.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLinkStats.kt index 94bbcbc9f9..84ef89bc9a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLinkStats.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLinkStats.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.utils.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.utils.dto.UtilsGetLinkStatsInterval import com.vk.sdk.api.utils.dto.UtilsGetLinkStatsSource @@ -45,7 +45,7 @@ import org.json.JSONObject * @param accessKey Access key for private link stats. * @param interval Interval. default "day" * @param intervalsCount Number of intervals to return. default 1 minimum 0 maximum 100 - * @param extended 1 � to return extended stats data (sex, age, geo). 0 � to return views number + * @param extended 1 - to return extended stats data (sex, age, geo). 0 - to return views number * only. default false */ class UtilsGetLinkStats( @@ -55,7 +55,7 @@ class UtilsGetLinkStats( private val interval: UtilsGetLinkStatsInterval? = null, private val intervalsCount: Int? = null, private val extended: Boolean? = null -) : VKRequest("utils.getLinkStats") { +) : ApiRequestBase(methodName = "utils.getLinkStats") { init { addParam("key", key) source?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLinkStatsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLinkStatsExtended.kt index f69656aeff..f93209e143 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLinkStatsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetLinkStatsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.utils.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.utils.dto.UtilsGetLinkStatsInterval import com.vk.sdk.api.utils.dto.UtilsGetLinkStatsSource @@ -45,7 +45,7 @@ import org.json.JSONObject * @param accessKey Access key for private link stats. * @param interval Interval. default "day" * @param intervalsCount Number of intervals to return. default 1 minimum 0 maximum 100 - * @param extended 1 � to return extended stats data (sex, age, geo). 0 � to return views number + * @param extended 1 - to return extended stats data (sex, age, geo). 0 - to return views number * only. default false */ class UtilsGetLinkStatsExtended( @@ -55,7 +55,7 @@ class UtilsGetLinkStatsExtended( private val interval: UtilsGetLinkStatsInterval? = null, private val intervalsCount: Int? = null, private val extended: Boolean? = null -) : VKRequest("utils.getLinkStats") { +) : ApiRequestBase(methodName = "utils.getLinkStats") { init { addParam("key", key) source?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetServerTime.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetServerTime.kt index f89099a6a2..c03895dc69 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetServerTime.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetServerTime.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.utils.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.utils.responses.UtilsGetServerTimeResponse import kotlin.Int @@ -36,7 +36,7 @@ import org.json.JSONObject /** * Returns the current time of the VK server. */ -class UtilsGetServerTime : VKRequest("utils.getServerTime") { +class UtilsGetServerTime : ApiRequestBase(methodName = "utils.getServerTime") { override fun parse(r: JSONObject): Int = GsonHolder.gson.fromJson(r.toString(), UtilsGetServerTimeResponse::class.java).response } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetShortLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetShortLink.kt index 620ea1d221..47a97dad9a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetShortLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsGetShortLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.utils.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.utils.dto.UtilsShortLink import com.vk.sdk.api.utils.responses.UtilsGetShortLinkResponse @@ -38,12 +38,12 @@ import org.json.JSONObject /** * Allows to receive a link shortened via vk.cc. * @param url URL to be shortened. - * @param private 1 � private stats, 0 � public stats. default false + * @param private 1 - private stats, 0 - public stats. default false */ class UtilsGetShortLink( private val url: String, private val private: Boolean? = null -) : VKRequest("utils.getShortLink") { +) : ApiRequestBase(methodName = "utils.getShortLink") { init { addParam("url", url) private?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsResolveScreenName.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsResolveScreenName.kt index 9fdee9ee6d..a8042933b8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsResolveScreenName.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/utils/methods/UtilsResolveScreenName.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.utils.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.utils.dto.UtilsDomainResolved import com.vk.sdk.api.utils.responses.UtilsResolveScreenNameResponse @@ -41,7 +41,7 @@ import org.json.JSONObject */ class UtilsResolveScreenName( private val screenName: String -) : VKRequest("utils.resolveScreenName") { +) : ApiRequestBase(methodName = "utils.resolveScreenName") { init { addParam("screen_name", screenName) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAdd.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAdd.kt index 0dd70ffa2c..155daa61a8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAdd.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAdd.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -46,7 +46,7 @@ class VideoAdd( private val videoId: Int, private val ownerId: Int, private val targetId: Int? = null -) : VKRequest("video.add") { +) : ApiRequestBase(methodName = "video.add") { init { addParam("video_id", videoId) addParam("owner_id", ownerId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAddAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAddAlbum.kt index a6cc82f8c8..60dbfb6b41 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAddAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAddAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoAddAlbumPrivacy import com.vk.sdk.api.video.dto.VideoAddAlbumResponseDto @@ -41,14 +41,14 @@ import org.json.JSONObject * Creates an empty album for videos. * @param groupId Community ID (if the album will be created in a community). minimum 0 * @param title Album title. - * @param privacy new access permissions for the album. Possible values: , *'0' � all users,, *'1' � - * friends only,, *'2' � friends and friends of friends,, *'3' � "only me". + * @param privacy new access permissions for the album. Possible values: , *'0' - all users,, *'1' - + * friends only,, *'2' - friends and friends of friends,, *'3' - "only me". */ class VideoAddAlbum( private val groupId: Int? = null, private val title: String? = null, private val privacy: List? = null -) : VKRequest("video.addAlbum") { +) : ApiRequestBase(methodName = "video.addAlbum") { init { groupId?.let { value -> addParam("group_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAddToAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAddToAlbum.kt index ee279bf31a..d55fe423bf 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAddToAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoAddToAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -48,7 +48,7 @@ class VideoAddToAlbum( private val targetId: Int? = null, private val albumId: Int? = null, private val albumIds: List? = null -) : VKRequest("video.addToAlbum") { +) : ApiRequestBase(methodName = "video.addToAlbum") { init { addParam("owner_id", ownerId) addParam("video_id", videoId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoCreateComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoCreateComment.kt index 0155bcc4d4..31bd3e935b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoCreateComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoCreateComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.responses.VideoCreateCommentResponse import kotlin.Boolean @@ -42,10 +42,10 @@ import org.json.JSONObject * @param ownerId ID of the user or community that owns the video. * @param message New comment text. * @param attachments List of objects attached to the comment, in the following format: - * "_,_", '' � Type of media attachment: 'photo' � photo, - * 'video' � video, 'audio' � audio, 'doc' � document, '' � ID of the media attachment owner. - * '' � Media attachment ID. Example: "photo100172_166443618,photo66748_265827614" - * @param fromGroup '1' � to post the comment from a community name (only if 'owner_id'<0) + * "_,_", '' - Type of media attachment: 'photo' - photo, + * 'video' - video, 'audio' - audio, 'doc' - document, '' - ID of the media attachment owner. + * '' - Media attachment ID. Example: "photo100172_166443618,photo66748_265827614" + * @param fromGroup '1' - to post the comment from a community name (only if 'owner_id'<0) * @param replyToComment minimum 0 * @param stickerId minimum 0 * @param guid @@ -59,7 +59,7 @@ class VideoCreateComment( private val replyToComment: Int? = null, private val stickerId: Int? = null, private val guid: String? = null -) : VKRequest("video.createComment") { +) : ApiRequestBase(methodName = "video.createComment") { init { addParam("video_id", videoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDelete.kt index d13885e060..3038173c6d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,7 +44,7 @@ class VideoDelete( private val videoId: Int, private val ownerId: Int? = null, private val targetId: Int? = null -) : VKRequest("video.delete") { +) : ApiRequestBase(methodName = "video.delete") { init { addParam("video_id", videoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDeleteAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDeleteAlbum.kt index a120afddaa..45cedd7d70 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDeleteAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDeleteAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class VideoDeleteAlbum( private val albumId: Int, private val groupId: Int? = null -) : VKRequest("video.deleteAlbum") { +) : ApiRequestBase(methodName = "video.deleteAlbum") { init { addParam("album_id", albumId) groupId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDeleteComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDeleteComment.kt index 5fe4b5896f..c55735ef1c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDeleteComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoDeleteComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class VideoDeleteComment( private val commentId: Int, private val ownerId: Int? = null -) : VKRequest("video.deleteComment") { +) : ApiRequestBase(methodName = "video.deleteComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEdit.kt index 6fb49962b1..94cb3c5763 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -48,7 +48,7 @@ import org.json.JSONObject * @param privacyComment Privacy settings for comments in a [vk.com/dev/privacy_setting|special * format]. * @param noComments Disable comments for the group video. - * @param repeat '1' � to repeat the playback of the video, '0' � to play the video once, + * @param repeat '1' - to repeat the playback of the video, '0' - to play the video once, */ class VideoEdit( private val videoId: Int, @@ -59,7 +59,7 @@ class VideoEdit( private val privacyComment: List? = null, private val noComments: Boolean? = null, private val repeat: Boolean? = null -) : VKRequest("video.edit") { +) : ApiRequestBase(methodName = "video.edit") { init { addParam("video_id", videoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEditAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEditAlbum.kt index eaccf8bc09..fd56e10897 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEditAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEditAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,15 +42,15 @@ import org.json.JSONObject * @param albumId Album ID. minimum 0 * @param title New album title. * @param groupId Community ID (if the album edited is owned by a community). minimum 0 - * @param privacy new access permissions for the album. Possible values: , *'0' � all users,, *'1' � - * friends only,, *'2' � friends and friends of friends,, *'3' � "only me". + * @param privacy new access permissions for the album. Possible values: , *'0' - all users,, *'1' - + * friends only,, *'2' - friends and friends of friends,, *'3' - "only me". */ class VideoEditAlbum( private val albumId: Int, private val title: String, private val groupId: Int? = null, private val privacy: List? = null -) : VKRequest("video.editAlbum") { +) : ApiRequestBase(methodName = "video.editAlbum") { init { addParam("album_id", albumId) addParam("title", title) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEditComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEditComment.kt index bc632e7d9a..0e2368e8f5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEditComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoEditComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,16 +42,16 @@ import org.json.JSONObject * @param ownerId ID of the user or community that owns the video. * @param message New comment text. * @param attachments List of objects attached to the comment, in the following format: - * "_,_", '' � Type of media attachment: 'photo' � photo, - * 'video' � video, 'audio' � audio, 'doc' � document, '' � ID of the media attachment owner. - * '' � Media attachment ID. Example: "photo100172_166443618,photo66748_265827614" + * "_,_", '' - Type of media attachment: 'photo' - photo, + * 'video' - video, 'audio' - audio, 'doc' - document, '' - ID of the media attachment owner. + * '' - Media attachment ID. Example: "photo100172_166443618,photo66748_265827614" */ class VideoEditComment( private val commentId: Int, private val ownerId: Int? = null, private val message: String? = null, private val attachments: List? = null -) : VKRequest("video.editComment") { +) : ApiRequestBase(methodName = "video.editComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGet.kt index 1d4348ded1..a88bd60929 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoGetResponseDto import com.vk.sdk.api.video.responses.VideoGetResponse @@ -45,7 +45,7 @@ import org.json.JSONObject * @param albumId ID of the album containing the video(s). * @param count Number of videos to return. default 100 minimum 0 maximum 200 * @param offset Offset needed to return a specific subset of videos. minimum 0 - * @param extended '1' � to return an extended response with additional fields + * @param extended '1' - to return an extended response with additional fields */ class VideoGet( private val ownerId: Int? = null, @@ -54,7 +54,7 @@ class VideoGet( private val count: Int? = null, private val offset: Int? = null, private val extended: Boolean? = null -) : VKRequest("video.get") { +) : ApiRequestBase(methodName = "video.get") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumById.kt index 6e751bf6d2..0ecfe4c94a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoVideoAlbumFull import com.vk.sdk.api.video.responses.VideoGetAlbumByIdResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class VideoGetAlbumById( private val albumId: Int, private val ownerId: Int? = null -) : VKRequest("video.getAlbumById") { +) : ApiRequestBase(methodName = "video.getAlbumById") { init { addParam("album_id", albumId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbums.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbums.kt index 6333cc6bf6..758cc67132 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbums.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbums.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoGetAlbumsResponseDto import com.vk.sdk.api.video.responses.VideoGetAlbumsResponse @@ -40,7 +40,7 @@ import org.json.JSONObject * @param ownerId ID of the user or community that owns the video album(s). * @param offset Offset needed to return a specific subset of video albums. minimum 0 * @param count Number of video albums to return. default 50 minimum 0 maximum 100 - * @param extended '1' � to return additional information about album privacy settings for the + * @param extended '1' - to return additional information about album privacy settings for the * current user * @param needSystem default 0 */ @@ -50,7 +50,7 @@ class VideoGetAlbums( private val count: Int? = null, private val extended: Boolean? = null, private val needSystem: Boolean? = null -) : VKRequest("video.getAlbums") { +) : ApiRequestBase(methodName = "video.getAlbums") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsByVideo.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsByVideo.kt index 5d01f73cd6..d45712c94e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsByVideo.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsByVideo.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.responses.VideoGetAlbumsByVideoResponse import kotlin.Boolean @@ -46,7 +46,7 @@ class VideoGetAlbumsByVideo( private val videoId: Int, private val targetId: Int? = null, private val extended: Boolean? = null -) : VKRequest>("video.getAlbumsByVideo") { +) : ApiRequestBase>(methodName = "video.getAlbumsByVideo") { init { addParam("owner_id", ownerId) addParam("video_id", videoId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsByVideoExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsByVideoExtended.kt index 3e9d467ce6..2c5111de66 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsByVideoExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsByVideoExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoGetAlbumsByVideoExtendedResponseDto import com.vk.sdk.api.video.responses.VideoGetAlbumsByVideoExtendedResponse @@ -46,7 +46,8 @@ class VideoGetAlbumsByVideoExtended( private val videoId: Int, private val targetId: Int? = null, private val extended: Boolean? = null -) : VKRequest("video.getAlbumsByVideo") { +) : ApiRequestBase(methodName = "video.getAlbumsByVideo") + { init { addParam("owner_id", ownerId) addParam("video_id", videoId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsExtended.kt index 8e30f53594..12cc64361f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetAlbumsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoGetAlbumsExtendedResponseDto import com.vk.sdk.api.video.responses.VideoGetAlbumsExtendedResponse @@ -40,7 +40,7 @@ import org.json.JSONObject * @param ownerId ID of the user or community that owns the video album(s). * @param offset Offset needed to return a specific subset of video albums. minimum 0 * @param count Number of video albums to return. default 50 minimum 0 maximum 100 - * @param extended '1' � to return additional information about album privacy settings for the + * @param extended '1' - to return additional information about album privacy settings for the * current user * @param needSystem default 0 */ @@ -50,7 +50,7 @@ class VideoGetAlbumsExtended( private val count: Int? = null, private val extended: Boolean? = null, private val needSystem: Boolean? = null -) : VKRequest("video.getAlbums") { +) : ApiRequestBase(methodName = "video.getAlbums") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetComments.kt index bcfc8e7b6f..fcea7a8c5b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoGetCommentsResponseDto import com.vk.sdk.api.video.dto.VideoGetCommentsSort @@ -42,11 +42,11 @@ import org.json.JSONObject * Returns a list of comments on a video. * @param videoId Video ID. minimum 0 * @param ownerId ID of the user or community that owns the video. - * @param needLikes '1' � to return an additional 'likes' field + * @param needLikes '1' - to return an additional 'likes' field * @param startCommentId minimum 0 * @param offset Offset needed to return a specific subset of comments. * @param count Number of comments to return. default 20 minimum 0 maximum 100 - * @param sort Sort order: 'asc' � oldest comment first, 'desc' � newest comment first + * @param sort Sort order: 'asc' - oldest comment first, 'desc' - newest comment first * @param extended * @param fields */ @@ -60,7 +60,7 @@ class VideoGetComments( private val sort: VideoGetCommentsSort? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("video.getComments") { +) : ApiRequestBase(methodName = "video.getComments") { init { addParam("video_id", videoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetCommentsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetCommentsExtended.kt index 1a29c1cf60..ad2693edad 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetCommentsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetCommentsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoGetCommentsExtendedResponseDto import com.vk.sdk.api.video.dto.VideoGetCommentsSort @@ -42,11 +42,11 @@ import org.json.JSONObject * Returns a list of comments on a video. * @param videoId Video ID. minimum 0 * @param ownerId ID of the user or community that owns the video. - * @param needLikes '1' � to return an additional 'likes' field + * @param needLikes '1' - to return an additional 'likes' field * @param startCommentId minimum 0 * @param offset Offset needed to return a specific subset of comments. * @param count Number of comments to return. default 20 minimum 0 maximum 100 - * @param sort Sort order: 'asc' � oldest comment first, 'desc' � newest comment first + * @param sort Sort order: 'asc' - oldest comment first, 'desc' - newest comment first * @param extended * @param fields */ @@ -60,7 +60,7 @@ class VideoGetCommentsExtended( private val sort: VideoGetCommentsSort? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("video.getComments") { +) : ApiRequestBase(methodName = "video.getComments") { init { addParam("video_id", videoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetExtended.kt index cb26267480..4c9ce7c5f0 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoGetExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoGetExtendedResponseDto import com.vk.sdk.api.video.responses.VideoGetExtendedResponse @@ -45,7 +45,7 @@ import org.json.JSONObject * @param albumId ID of the album containing the video(s). * @param count Number of videos to return. default 100 minimum 0 maximum 200 * @param offset Offset needed to return a specific subset of videos. minimum 0 - * @param extended '1' � to return an extended response with additional fields + * @param extended '1' - to return an extended response with additional fields */ class VideoGetExtended( private val ownerId: Int? = null, @@ -54,7 +54,7 @@ class VideoGetExtended( private val count: Int? = null, private val offset: Int? = null, private val extended: Boolean? = null -) : VKRequest("video.get") { +) : ApiRequestBase(methodName = "video.get") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRemoveFromAlbum.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRemoveFromAlbum.kt index 296d93c328..5dcdcf2222 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRemoveFromAlbum.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRemoveFromAlbum.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -48,7 +48,7 @@ class VideoRemoveFromAlbum( private val targetId: Int? = null, private val albumId: Int? = null, private val albumIds: List? = null -) : VKRequest("video.removeFromAlbum") { +) : ApiRequestBase(methodName = "video.removeFromAlbum") { init { addParam("owner_id", ownerId) addParam("video_id", videoId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReorderAlbums.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReorderAlbums.kt index ba104068a5..7609e82658 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReorderAlbums.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReorderAlbums.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -46,7 +46,7 @@ class VideoReorderAlbums( private val ownerId: Int? = null, private val before: Int? = null, private val after: Int? = null -) : VKRequest("video.reorderAlbums") { +) : ApiRequestBase(methodName = "video.reorderAlbums") { init { addParam("album_id", albumId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReorderVideos.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReorderVideos.kt index b4bef05fb5..efaafd69e6 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReorderVideos.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReorderVideos.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -57,7 +57,7 @@ class VideoReorderVideos( private val beforeVideoId: Int? = null, private val afterOwnerId: Int? = null, private val afterVideoId: Int? = null -) : VKRequest("video.reorderVideos") { +) : ApiRequestBase(methodName = "video.reorderVideos") { init { addParam("owner_id", ownerId) addParam("video_id", videoId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReport.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReport.kt index 2eef4e1946..baf2cb64d0 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReport.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReport.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -40,8 +40,8 @@ import org.json.JSONObject * Reports (submits a complaint about) a video. * @param ownerId ID of the user or community that owns the video. * @param videoId Video ID. minimum 0 - * @param reason Reason for the complaint: '0' � spam, '1' � child pornography, '2' � extremism, '3' - * � violence, '4' � drug propaganda, '5' � adult material, '6' � insult, abuse minimum 0 + * @param reason Reason for the complaint: '0' - spam, '1' - child pornography, '2' - extremism, + * '3' - violence, '4' - drug propaganda, '5' - adult material, '6' - insult, abuse minimum 0 * @param comment Comment describing the complaint. * @param searchQuery (If the video was found in search results.) Search query string. */ @@ -51,7 +51,7 @@ class VideoReport( private val reason: VideoReportReason? = null, private val comment: String? = null, private val searchQuery: String? = null -) : VKRequest("video.report") { +) : ApiRequestBase(methodName = "video.report") { init { addParam("owner_id", ownerId) addParam("video_id", videoId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReportComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReportComment.kt index fca5372598..cce3e6a2a3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReportComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoReportComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,14 +39,14 @@ import org.json.JSONObject * Reports (submits a complaint about) a comment on a video. * @param ownerId ID of the user or community that owns the video. * @param commentId ID of the comment being reported. minimum 0 - * @param reason Reason for the complaint: , 0 � spam , 1 � child pornography , 2 � extremism , 3 � - * violence , 4 � drug propaganda , 5 � adult material , 6 � insult, abuse minimum 0 + * @param reason Reason for the complaint: , 0 - spam , 1 - child pornography , 2 - extremism , 3 - + * violence , 4 - drug propaganda , 5 - adult material , 6 - insult, abuse minimum 0 */ class VideoReportComment( private val ownerId: Int, private val commentId: Int, private val reason: VideoReportCommentReason? = null -) : VKRequest("video.reportComment") { +) : ApiRequestBase(methodName = "video.reportComment") { init { addParam("owner_id", ownerId) addParam("comment_id", commentId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRestore.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRestore.kt index 353d8a0f3e..7eaece0b28 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRestore.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRestore.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class VideoRestore( private val videoId: Int, private val ownerId: Int? = null -) : VKRequest("video.restore") { +) : ApiRequestBase(methodName = "video.restore") { init { addParam("video_id", videoId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRestoreComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRestoreComment.kt index 39f500bf42..db4f359c4e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRestoreComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoRestoreComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.video.responses.VideoRestoreCommentResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class VideoRestoreComment( private val commentId: Int, private val ownerId: Int? = null -) : VKRequest("video.restoreComment") { +) : ApiRequestBase(methodName = "video.restoreComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSave.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSave.kt index 8ddd1828cf..83094f5adb 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSave.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSave.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoSaveResult import com.vk.sdk.api.video.responses.VideoSaveResponse @@ -41,10 +41,10 @@ import org.json.JSONObject * Returns a server address (required for upload) and video data. * @param name Name of the video. * @param description Description of the video. - * @param isPrivate '1' � to designate the video as private (send it via a private message), the - * video will not appear on the user's video list and will not be available by ID for other users, '0' - * � not to designate the video as private - * @param wallpost '1' � to post the saved video on a user's wall, '0' � not to post the saved video + * @param isPrivate '1' - to designate the video as private (send it via a private message), the + * video will not appear on the user's video list and will not be available by ID for other users, + * '0' - not to designate the video as private + * @param wallpost '1' - to post the saved video on a user's wall, '0' - not to post the saved video * on a user's wall * @param link URL for embedding the video from an external website. * @param groupId ID of the community in which the video will be saved. By default, the current @@ -53,7 +53,7 @@ import org.json.JSONObject * @param privacyView * @param privacyComment * @param noComments - * @param repeat '1' � to repeat the playback of the video, '0' � to play the video once, + * @param repeat '1' - to repeat the playback of the video, '0' - to play the video once, * @param compression */ class VideoSave( @@ -69,7 +69,7 @@ class VideoSave( private val noComments: Boolean? = null, private val repeat: Boolean? = null, private val compression: Boolean? = null -) : VKRequest("video.save") { +) : ApiRequestBase(methodName = "video.save") { init { name?.let { value -> addParam("name", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSearch.kt index 11e58c39ca..1cb976286a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoSearchFilters import com.vk.sdk.api.video.dto.VideoSearchResponseDto @@ -42,11 +42,11 @@ import org.json.JSONObject /** * Returns a list of videos under the set search criterion. * @param q Search query string (e.g., 'The Beatles'). - * @param sort Sort order: '1' � by duration, '2' � by relevance, '0' � by date added + * @param sort Sort order: '1' - by duration, '2' - by relevance, '0' - by date added * @param hd If not null, only searches for high-definition videos. - * @param adult '1' � to disable the Safe Search filter, '0' � to enable the Safe Search filter - * @param filters Filters to apply: 'youtube' � return YouTube videos only, 'vimeo' � return Vimeo - * videos only, 'short' � return short videos only, 'long' � return long videos only + * @param adult '1' - to disable the Safe Search filter, '0' - to enable the Safe Search filter + * @param filters Filters to apply: 'youtube' - return YouTube videos only, 'vimeo' - return Vimeo + * videos only, 'short' - return short videos only, 'long' - return long videos only * @param searchOwn * @param offset Offset needed to return a specific subset of videos. minimum 0 * @param longer minimum 0 @@ -66,7 +66,7 @@ class VideoSearch( private val shorter: Int? = null, private val count: Int? = null, private val extended: Boolean? = null -) : VKRequest("video.search") { +) : ApiRequestBase(methodName = "video.search") { init { addParam("q", q) sort?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSearchExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSearchExtended.kt index ff3f31acc9..24fa202f3d 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSearchExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/video/methods/VideoSearchExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.video.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.video.dto.VideoSearchExtendedResponseDto import com.vk.sdk.api.video.dto.VideoSearchFilters @@ -42,11 +42,11 @@ import org.json.JSONObject /** * Returns a list of videos under the set search criterion. * @param q Search query string (e.g., 'The Beatles'). - * @param sort Sort order: '1' � by duration, '2' � by relevance, '0' � by date added + * @param sort Sort order: '1' - by duration, '2' - by relevance, '0' - by date added * @param hd If not null, only searches for high-definition videos. - * @param adult '1' � to disable the Safe Search filter, '0' � to enable the Safe Search filter - * @param filters Filters to apply: 'youtube' � return YouTube videos only, 'vimeo' � return Vimeo - * videos only, 'short' � return short videos only, 'long' � return long videos only + * @param adult '1' - to disable the Safe Search filter, '0' - to enable the Safe Search filter + * @param filters Filters to apply: 'youtube' - return YouTube videos only, 'vimeo' - return Vimeo + * videos only, 'short' - return short videos only, 'long' - return long videos only * @param searchOwn * @param offset Offset needed to return a specific subset of videos. minimum 0 * @param longer minimum 0 @@ -66,7 +66,7 @@ class VideoSearchExtended( private val shorter: Int? = null, private val count: Int? = null, private val extended: Boolean? = null -) : VKRequest("video.search") { +) : ApiRequestBase(methodName = "video.search") { init { addParam("q", q) sort?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCheckCopyrightLink.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCheckCopyrightLink.kt index 6eb50048f6..0e7511ea29 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCheckCopyrightLink.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCheckCopyrightLink.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -39,7 +39,7 @@ import org.json.JSONObject */ class WallCheckCopyrightLink( private val link: String -) : VKRequest("wall.checkCopyrightLink") { +) : ApiRequestBase(methodName = "wall.checkCopyrightLink") { init { addParam("link", link) } diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCloseComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCloseComments.kt index 92a2d2e8b4..ed008d774e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCloseComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCloseComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class WallCloseComments( private val ownerId: Int, private val postId: Int -) : VKRequest("wall.closeComments") { +) : ApiRequestBase(methodName = "wall.closeComments") { init { addParam("owner_id", ownerId) addParam("post_id", postId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCreateComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCreateComment.kt index 2684d14058..defb482a33 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCreateComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallCreateComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.wall.dto.WallCreateCommentResponseDto import com.vk.sdk.api.wall.responses.WallCreateCommentResponse @@ -44,9 +44,9 @@ import org.json.JSONObject * @param message (Required if 'attachments' is not set.) Text of the comment. * @param replyToComment ID of comment to reply. * @param attachments (Required if 'message' is not set.) List of media objects attached to the - * comment, in the following format: "_,_", '' � Type of media - * ojbect: 'photo' � photo, 'video' � video, 'audio' � audio, 'doc' � document, '' � ID of - * the media owner. '' � Media ID. For example: "photo100172_166443618,photo66748_265827614" + * comment, in the following format: "_,_", '' - Type of media + * ojbect: 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, '' - ID of + * the media owner. '' - Media ID. For example: "photo100172_166443618,photo66748_265827614" * @param stickerId Sticker ID. minimum 0 * @param guid Unique identifier to avoid repeated comments. */ @@ -59,7 +59,7 @@ class WallCreateComment( private val attachments: List? = null, private val stickerId: Int? = null, private val guid: String? = null -) : VKRequest("wall.createComment") { +) : ApiRequestBase(methodName = "wall.createComment") { init { addParam("post_id", postId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallDelete.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallDelete.kt index aef4c0c675..9655b84ce8 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallDelete.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallDelete.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class WallDelete( private val ownerId: Int? = null, private val postId: Int? = null -) : VKRequest("wall.delete") { +) : ApiRequestBase(methodName = "wall.delete") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallDeleteComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallDeleteComment.kt index b949b95c2f..20be2260cb 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallDeleteComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallDeleteComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class WallDeleteComment( private val commentId: Int, private val ownerId: Int? = null -) : VKRequest("wall.deleteComment") { +) : ApiRequestBase(methodName = "wall.deleteComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEdit.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEdit.kt index f0a4702a9e..abacb3a4ec 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEdit.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEdit.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.wall.dto.WallEditResponseDto import com.vk.sdk.api.wall.responses.WallEditResponse @@ -45,9 +45,9 @@ import org.json.JSONObject * @param friendsOnly * @param message (Required if 'attachments' is not set.) Text of the post. * @param attachments (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, '' � ID of the media - * application owner. '' � Media application ID. Example: + * the following format: "_,_", '' - Type of media attachment: + * 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, '' - ID of the media + * application owner. '' - Media application ID. Example: * "photo100172_166443618,photo66748_265827614", May contain a link to an external page to include in * the post. Example: "photo66748_265827614,http://habrahabr.ru", "NOTE: If more than one link is being * attached, an error is thrown." @@ -82,7 +82,7 @@ class WallEdit( private val posterBkgOwnerId: Int? = null, private val posterBkgAccessHash: String? = null, private val copyright: String? = null -) : VKRequest("wall.edit") { +) : ApiRequestBase(methodName = "wall.edit") { init { addParam("post_id", postId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEditAdsStealth.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEditAdsStealth.kt index 76573473fc..6ae7fd6679 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEditAdsStealth.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEditAdsStealth.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -44,15 +44,15 @@ import org.json.JSONObject * @param ownerId User ID or community ID. Use a negative value to designate a community ID. * @param message (Required if 'attachments' is not set.) Text of the post. * @param attachments (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, 'page' � wiki-page, 'note' � - * note, 'poll' � poll, 'album' � photo album, '' � ID of the media application owner. - * '' � Media application ID. Example: "photo100172_166443618,photo66748_265827614", May + * the following format: "_,_", '' - Type of media attachment: + * 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, 'page' - wiki-page, 'note' - + * note, 'poll' - poll, 'album' - photo album, '' - ID of the media application owner. + * '' - Media application ID. Example: "photo100172_166443618,photo66748_265827614", May * contain a link to an external page to include in the post. Example: * "photo66748_265827614,http://habrahabr.ru", "NOTE: If more than one link is being attached, an error * will be thrown." - * @param signed Only for posts in communities with 'from_group' set to '1': '1' � post will be - * signed with the name of the posting user, '0' � post will not be signed (default) + * @param signed Only for posts in communities with 'from_group' set to '1': '1' - post will be + * signed with the name of the posting user, '0' - post will not be signed (default) * @param lat Geographical latitude of a check-in, in degrees (from -90 to 90). * @param long Geographical longitude of a check-in, in degrees (from -180 to 180). * @param placeId ID of the location where the user was tagged. minimum 0 @@ -74,7 +74,7 @@ class WallEditAdsStealth( private val linkTitle: String? = null, private val linkImage: String? = null, private val linkVideo: String? = null -) : VKRequest("wall.editAdsStealth") { +) : ApiRequestBase(methodName = "wall.editAdsStealth") { init { addParam("post_id", postId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEditComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEditComment.kt index 61ba8f7e28..638c24fe33 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEditComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallEditComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,16 +42,16 @@ import org.json.JSONObject * @param ownerId User ID or community ID. Use a negative value to designate a community ID. * @param message New comment text. * @param attachments List of objects attached to the comment, in the following format: , - * "_,_", '' � Type of media attachment: 'photo' � photo, - * 'video' � video, 'audio' � audio, 'doc' � document, '' � ID of the media attachment owner. - * '' � Media attachment ID. For example: "photo100172_166443618,photo66748_265827614" + * "_,_", '' - Type of media attachment: 'photo' - photo, + * 'video' - video, 'audio' - audio, 'doc' - document, '' - ID of the media attachment owner. + * '' - Media attachment ID. For example: "photo100172_166443618,photo66748_265827614" */ class WallEditComment( private val commentId: Int, private val ownerId: Int? = null, private val message: String? = null, private val attachments: List? = null -) : VKRequest("wall.editComment") { +) : ApiRequestBase(methodName = "wall.editComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGet.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGet.kt index cfff768e5c..80cc711596 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGet.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGet.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallGetFilter @@ -46,10 +46,10 @@ import org.json.JSONObject * @param domain User or community short address. * @param offset Offset needed to return a specific subset of posts. minimum 0 * @param count Number of posts to return (maximum 100). minimum 0 - * @param filter Filter to apply: 'owner' � posts by the wall owner, 'others' � posts by someone - * else, 'all' � posts by the wall owner and others (default), 'postponed' � timed posts (only - * available for calls with an 'access_token'), 'suggests' � suggested posts on a community wall - * @param extended '1' � to return 'wall', 'profiles', and 'groups' fields, '0' � to return no + * @param filter Filter to apply: 'owner' - posts by the wall owner, 'others' - posts by someone + * else, 'all' - posts by the wall owner and others (default), 'postponed' - timed posts (only + * available for calls with an 'access_token'), 'suggests' - suggested posts on a community wall + * @param extended '1' - to return 'wall', 'profiles', and 'groups' fields, '0' - to return no * additional fields (default) * @param fields */ @@ -61,7 +61,7 @@ class WallGet( private val filter: WallGetFilter? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("wall.get") { +) : ApiRequestBase(methodName = "wall.get") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetById.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetById.kt index d169e967cc..567381f920 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetById.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetById.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallWallpostFull @@ -42,7 +42,7 @@ import org.json.JSONObject * Returns a list of posts from user or community walls by their IDs. * @param posts User or community IDs and post IDs, separated by underscores. Use a negative value * to designate a community ID. Example: "93388_21539,93388_20904,2943_4276,-1_1" - * @param extended '1' � to return user and community objects needed to display posts, '0' � no + * @param extended '1' - to return user and community objects needed to display posts, '0' - no * additional fields are returned (default) * @param copyHistoryDepth Sets the number of parent elements to include in the array 'copy_history' * that is returned if the post is a repost from another wall. default 2 @@ -53,7 +53,7 @@ class WallGetById( private val extended: Boolean? = null, private val copyHistoryDepth: Int? = null, private val fields: List? = null -) : VKRequest>("wall.getById") { +) : ApiRequestBase>(methodName = "wall.getById") { init { addParam("posts", posts) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetByIdExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetByIdExtended.kt index f220516c79..f1e6e4f48b 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetByIdExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetByIdExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallGetByIdExtendedResponseDto @@ -42,7 +42,7 @@ import org.json.JSONObject * Returns a list of posts from user or community walls by their IDs. * @param posts User or community IDs and post IDs, separated by underscores. Use a negative value * to designate a community ID. Example: "93388_21539,93388_20904,2943_4276,-1_1" - * @param extended '1' � to return user and community objects needed to display posts, '0' � no + * @param extended '1' - to return user and community objects needed to display posts, '0' - no * additional fields are returned (default) * @param copyHistoryDepth Sets the number of parent elements to include in the array 'copy_history' * that is returned if the post is a repost from another wall. default 2 @@ -53,7 +53,7 @@ class WallGetByIdExtended( private val extended: Boolean? = null, private val copyHistoryDepth: Int? = null, private val fields: List? = null -) : VKRequest("wall.getById") { +) : ApiRequestBase(methodName = "wall.getById") { init { addParam("posts", posts) extended?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetComment.kt index 3376c608f1..b64de192ed 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallGetCommentResponseDto @@ -49,7 +49,7 @@ class WallGetComment( private val ownerId: Int? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("wall.getComment") { +) : ApiRequestBase(methodName = "wall.getComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetCommentExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetCommentExtended.kt index ffbbf7cc6f..d28e3a82ef 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetCommentExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetCommentExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallGetCommentExtendedResponseDto @@ -49,7 +49,7 @@ class WallGetCommentExtended( private val ownerId: Int? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("wall.getComment") { +) : ApiRequestBase(methodName = "wall.getComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetComments.kt index 7e75d056ab..89e4a103e3 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallGetCommentsResponseDto @@ -42,12 +42,12 @@ import org.json.JSONObject * Returns a list of comments on a post on a user wall or community wall. * @param ownerId User ID or community ID. Use a negative value to designate a community ID. * @param postId Post ID. minimum 0 - * @param needLikes '1' � to return the 'likes' field, '0' � not to return the 'likes' field + * @param needLikes '1' - to return the 'likes' field, '0' - not to return the 'likes' field * (default) * @param startCommentId minimum 0 * @param offset Offset needed to return a specific subset of comments. * @param count Number of comments to return (maximum 100). minimum 0 - * @param sort Sort order: 'asc' � chronological, 'desc' � reverse chronological + * @param sort Sort order: 'asc' - chronological, 'desc' - reverse chronological * @param previewLength Number of characters at which to truncate comments when previewed. By * default, '90'. Specify '0' if you do not want to truncate comments. minimum 0 * @param extended @@ -68,7 +68,7 @@ class WallGetComments( private val fields: List? = null, private val commentId: Int? = null, private val threadItemsCount: Int? = null -) : VKRequest("wall.getComments") { +) : ApiRequestBase(methodName = "wall.getComments") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetCommentsExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetCommentsExtended.kt index 867c1649f2..0ab4b8b05e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetCommentsExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetCommentsExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallGetCommentsExtendedResponseDto @@ -42,12 +42,12 @@ import org.json.JSONObject * Returns a list of comments on a post on a user wall or community wall. * @param ownerId User ID or community ID. Use a negative value to designate a community ID. * @param postId Post ID. minimum 0 - * @param needLikes '1' � to return the 'likes' field, '0' � not to return the 'likes' field + * @param needLikes '1' - to return the 'likes' field, '0' - not to return the 'likes' field * (default) * @param startCommentId minimum 0 * @param offset Offset needed to return a specific subset of comments. * @param count Number of comments to return (maximum 100). minimum 0 - * @param sort Sort order: 'asc' � chronological, 'desc' � reverse chronological + * @param sort Sort order: 'asc' - chronological, 'desc' - reverse chronological * @param previewLength Number of characters at which to truncate comments when previewed. By * default, '90'. Specify '0' if you do not want to truncate comments. minimum 0 * @param extended @@ -68,7 +68,7 @@ class WallGetCommentsExtended( private val fields: List? = null, private val commentId: Int? = null, private val threadItemsCount: Int? = null -) : VKRequest("wall.getComments") { +) : ApiRequestBase(methodName = "wall.getComments") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetExtended.kt index 847b70a0c3..1865d9b49c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallGetExtendedResponseDto @@ -46,10 +46,10 @@ import org.json.JSONObject * @param domain User or community short address. * @param offset Offset needed to return a specific subset of posts. minimum 0 * @param count Number of posts to return (maximum 100). minimum 0 - * @param filter Filter to apply: 'owner' � posts by the wall owner, 'others' � posts by someone - * else, 'all' � posts by the wall owner and others (default), 'postponed' � timed posts (only - * available for calls with an 'access_token'), 'suggests' � suggested posts on a community wall - * @param extended '1' � to return 'wall', 'profiles', and 'groups' fields, '0' � to return no + * @param filter Filter to apply: 'owner' - posts by the wall owner, 'others' - posts by someone + * else, 'all' - posts by the wall owner and others (default), 'postponed' - timed posts (only + * available for calls with an 'access_token'), 'suggests' - suggested posts on a community wall + * @param extended '1' - to return 'wall', 'profiles', and 'groups' fields, '0' - to return no * additional fields (default) * @param fields */ @@ -61,7 +61,7 @@ class WallGetExtended( private val filter: WallGetFilter? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("wall.get") { +) : ApiRequestBase(methodName = "wall.get") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetReposts.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetReposts.kt index 23db148e71..a458f03d3c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetReposts.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallGetReposts.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.wall.dto.WallGetRepostsResponseDto import com.vk.sdk.api.wall.responses.WallGetRepostsResponse @@ -47,7 +47,7 @@ class WallGetReposts( private val postId: Int? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("wall.getReposts") { +) : ApiRequestBase(methodName = "wall.getReposts") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallOpenComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallOpenComments.kt index 82356cb435..b14b6ec4aa 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallOpenComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallOpenComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseBoolInt import com.vk.sdk.api.base.responses.BaseBoolResponse @@ -41,7 +41,7 @@ import org.json.JSONObject class WallOpenComments( private val ownerId: Int, private val postId: Int -) : VKRequest("wall.openComments") { +) : ApiRequestBase(methodName = "wall.openComments") { init { addParam("owner_id", ownerId) addParam("post_id", postId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPin.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPin.kt index 1e042a1c18..849f1531fe 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPin.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPin.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class WallPin( private val postId: Int, private val ownerId: Int? = null -) : VKRequest("wall.pin") { +) : ApiRequestBase(methodName = "wall.pin") { init { addParam("post_id", postId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPost.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPost.kt index a9fd7ad5bd..7d823829b2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPost.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPost.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.wall.dto.WallPostResponseDto import com.vk.sdk.api.wall.responses.WallPostResponse @@ -42,23 +42,23 @@ import org.json.JSONObject * Adds a new post on a user wall or community wall. Can also be used to publish suggested or * scheduled posts. * @param ownerId User ID or community ID. Use a negative value to designate a community ID. - * @param friendsOnly '1' � post will be available to friends only, '0' � post will be available to + * @param friendsOnly '1' - post will be available to friends only, '0' - post will be available to * all users (default) - * @param fromGroup For a community: '1' � post will be published by the community, '0' � post will + * @param fromGroup For a community: '1' - post will be published by the community, '0' - post will * be published by the user (default) * @param message (Required if 'attachments' is not set.) Text of the post. * @param attachments (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, 'page' � wiki-page, 'note' � - * note, 'poll' � poll, 'album' � photo album, '' � ID of the media application owner. - * '' � Media application ID. Example: "photo100172_166443618,photo66748_265827614", May + * the following format: "_,_", '' - Type of media attachment: + * 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, 'page' - wiki-page, 'note' - + * note, 'poll' - poll, 'album' - photo album, '' - ID of the media application owner. + * '' - Media application ID. Example: "photo100172_166443618,photo66748_265827614", May * contain a link to an external page to include in the post. Example: * "photo66748_265827614,http://habrahabr.ru", "NOTE: If more than one link is being attached, an error * will be thrown." * @param services List of services or websites the update will be exported to, if the user has so * requested. Sample values: 'twitter', 'facebook'. - * @param signed Only for posts in communities with 'from_group' set to '1': '1' � post will be - * signed with the name of the posting user, '0' � post will not be signed (default) + * @param signed Only for posts in communities with 'from_group' set to '1': '1' - post will be + * signed with the name of the posting user, '0' - post will not be signed (default) * @param publishDate Publication date (in Unix time). If used, posting will be delayed until the * set time. minimum 0 * @param lat Geographical latitude of a check-in, in degrees (from -90 to 90). @@ -89,7 +89,7 @@ class WallPost( private val closeComments: Boolean? = null, private val muteNotifications: Boolean? = null, private val copyright: String? = null -) : VKRequest("wall.post") { +) : ApiRequestBase(methodName = "wall.post") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPostAdsStealth.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPostAdsStealth.kt index ea81d55f36..32d7e00f45 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPostAdsStealth.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallPostAdsStealth.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.wall.dto.WallPostAdsStealthResponseDto import com.vk.sdk.api.wall.responses.WallPostAdsStealthResponse @@ -44,15 +44,15 @@ import org.json.JSONObject * @param ownerId User ID or community ID. Use a negative value to designate a community ID. * @param message (Required if 'attachments' is not set.) Text of the post. * @param attachments (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, 'page' � wiki-page, 'note' � - * note, 'poll' � poll, 'album' � photo album, '' � ID of the media application owner. - * '' � Media application ID. Example: "photo100172_166443618,photo66748_265827614", May + * the following format: "_,_", '' - Type of media attachment: + * 'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document, 'page' - wiki-page, 'note' - + * note, 'poll' - poll, 'album' - photo album, '' - ID of the media application owner. + * '' - Media application ID. Example: "photo100172_166443618,photo66748_265827614", May * contain a link to an external page to include in the post. Example: * "photo66748_265827614,http://habrahabr.ru", "NOTE: If more than one link is being attached, an error * will be thrown." - * @param signed Only for posts in communities with 'from_group' set to '1': '1' � post will be - * signed with the name of the posting user, '0' � post will not be signed (default) + * @param signed Only for posts in communities with 'from_group' set to '1': '1' - post will be + * signed with the name of the posting user, '0' - post will not be signed (default) * @param lat Geographical latitude of a check-in, in degrees (from -90 to 90). * @param long Geographical longitude of a check-in, in degrees (from -180 to 180). * @param placeId ID of the location where the user was tagged. minimum 0 @@ -75,7 +75,7 @@ class WallPostAdsStealth( private val linkTitle: String? = null, private val linkImage: String? = null, private val linkVideo: String? = null -) : VKRequest("wall.postAdsStealth") { +) : ApiRequestBase(methodName = "wall.postAdsStealth") { init { addParam("owner_id", ownerId) message?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallReportComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallReportComment.kt index 68d2d55e31..2bbc88514e 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallReportComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallReportComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,14 +39,14 @@ import org.json.JSONObject * Reports (submits a complaint about) a comment on a post on a user wall or community wall. * @param ownerId ID of the user or community that owns the wall. * @param commentId Comment ID. minimum 0 - * @param reason Reason for the complaint: '0' � spam, '1' � child pornography, '2' � extremism, '3' - * � violence, '4' � drug propaganda, '5' � adult material, '6' � insult, abuse minimum 0 + * @param reason Reason for the complaint: '0' - spam, '1' - child pornography, '2' - extremism, + * '3' - violence, '4' - drug propaganda, '5' - adult material, '6' - insult, abuse minimum 0 */ class WallReportComment( private val ownerId: Int, private val commentId: Int, private val reason: WallReportCommentReason? = null -) : VKRequest("wall.reportComment") { +) : ApiRequestBase(methodName = "wall.reportComment") { init { addParam("owner_id", ownerId) addParam("comment_id", commentId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallReportPost.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallReportPost.kt index d9df6cb38d..a71574c99c 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallReportPost.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallReportPost.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -39,14 +39,14 @@ import org.json.JSONObject * Reports (submits a complaint about) a post on a user wall or community wall. * @param ownerId ID of the user or community that owns the wall. * @param postId Post ID. minimum 0 - * @param reason Reason for the complaint: '0' � spam, '1' � child pornography, '2' � extremism, '3' - * � violence, '4' � drug propaganda, '5' � adult material, '6' � insult, abuse minimum 0 + * @param reason Reason for the complaint: '0' - spam, '1' - child pornography, '2' - extremism, + * '3' - violence, '4' - drug propaganda, '5' - adult material, '6' - insult, abuse minimum 0 */ class WallReportPost( private val ownerId: Int, private val postId: Int, private val reason: WallReportPostReason? = null -) : VKRequest("wall.reportPost") { +) : ApiRequestBase(methodName = "wall.reportPost") { init { addParam("owner_id", ownerId) addParam("post_id", postId) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRepost.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRepost.kt index 77d4a97d9f..8af6d146b5 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRepost.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRepost.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.wall.dto.WallRepostResponseDto import com.vk.sdk.api.wall.responses.WallRepostResponse @@ -50,7 +50,7 @@ class WallRepost( private val groupId: Int? = null, private val markAsAds: Boolean? = null, private val muteNotifications: Boolean? = null -) : VKRequest("wall.repost") { +) : ApiRequestBase(methodName = "wall.repost") { init { addParam("object", objectValue) message?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRestore.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRestore.kt index 41fad975bf..64871b2084 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRestore.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRestore.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class WallRestore( private val ownerId: Int? = null, private val postId: Int? = null -) : VKRequest("wall.restore") { +) : ApiRequestBase(methodName = "wall.restore") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRestoreComment.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRestoreComment.kt index 4836371a93..ae758111bf 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRestoreComment.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallRestoreComment.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -42,7 +42,7 @@ import org.json.JSONObject class WallRestoreComment( private val commentId: Int, private val ownerId: Int? = null -) : VKRequest("wall.restoreComment") { +) : ApiRequestBase(methodName = "wall.restoreComment") { init { addParam("comment_id", commentId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallSearch.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallSearch.kt index 7cf2dcd30f..9e779f13e1 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallSearch.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallSearch.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallSearchResponseDto @@ -44,7 +44,7 @@ import org.json.JSONObject * * @param domain user or community screen name. * @param query search query string. - * @param ownersOnly '1' � returns only page owner's posts. + * @param ownersOnly '1' - returns only page owner's posts. * @param count count of posts to return. default 20 minimum 0 maximum 100 * @param offset Offset needed to return a specific subset of posts. default 0 minimum 0 * @param extended show extended post info. @@ -59,7 +59,7 @@ class WallSearch( private val offset: Int? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("wall.search") { +) : ApiRequestBase(methodName = "wall.search") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallSearchExtended.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallSearchExtended.kt index 513ab86a91..d37e941056 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallSearchExtended.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallSearchExtended.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseUserGroupFields import com.vk.sdk.api.wall.dto.WallSearchExtendedResponseDto @@ -44,7 +44,7 @@ import org.json.JSONObject * * @param domain user or community screen name. * @param query search query string. - * @param ownersOnly '1' � returns only page owner's posts. + * @param ownersOnly '1' - returns only page owner's posts. * @param count count of posts to return. default 20 minimum 0 maximum 100 * @param offset Offset needed to return a specific subset of posts. default 0 minimum 0 * @param extended show extended post info. @@ -59,7 +59,7 @@ class WallSearchExtended( private val offset: Int? = null, private val extended: Boolean? = null, private val fields: List? = null -) : VKRequest("wall.search") { +) : ApiRequestBase(methodName = "wall.search") { init { ownerId?.let { value -> addParam("owner_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallUnpin.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallUnpin.kt index 5c7e0a3c5b..17c9cfd58f 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallUnpin.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/wall/methods/WallUnpin.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.wall.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.base.dto.BaseOkResponseDto import com.vk.sdk.api.base.responses.BaseOkResponse @@ -43,7 +43,7 @@ import org.json.JSONObject class WallUnpin( private val postId: Int, private val ownerId: Int? = null -) : VKRequest("wall.unpin") { +) : ApiRequestBase(methodName = "wall.unpin") { init { addParam("post_id", postId) ownerId?.let { value -> diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/widgets/methods/WidgetsGetComments.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/widgets/methods/WidgetsGetComments.kt index 4619edbb84..e03d18d2a2 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/widgets/methods/WidgetsGetComments.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/widgets/methods/WidgetsGetComments.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.widgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.users.dto.UsersFields import com.vk.sdk.api.widgets.dto.WidgetsGetCommentsResponseDto @@ -55,7 +55,7 @@ class WidgetsGetComments( private val fields: List? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("widgets.getComments") { +) : ApiRequestBase(methodName = "widgets.getComments") { init { widgetApiId?.let { value -> addParam("widget_api_id", value) diff --git a/vk-sdk-api/src/main/java/com/vk/sdk/api/widgets/methods/WidgetsGetPages.kt b/vk-sdk-api/src/main/java/com/vk/sdk/api/widgets/methods/WidgetsGetPages.kt index d04f5f3881..61cb082f4a 100644 --- a/vk-sdk-api/src/main/java/com/vk/sdk/api/widgets/methods/WidgetsGetPages.kt +++ b/vk-sdk-api/src/main/java/com/vk/sdk/api/widgets/methods/WidgetsGetPages.kt @@ -27,7 +27,7 @@ // ********************************************************************* package com.vk.sdk.api.widgets.methods -import com.vk.api.sdk.requests.VKRequest +import com.vk.sdk.api.ApiRequestBase import com.vk.sdk.api.GsonHolder import com.vk.sdk.api.widgets.dto.WidgetsGetPagesResponseDto import com.vk.sdk.api.widgets.responses.WidgetsGetPagesResponse @@ -50,7 +50,7 @@ class WidgetsGetPages( private val period: String? = null, private val offset: Int? = null, private val count: Int? = null -) : VKRequest("widgets.getPages") { +) : ApiRequestBase(methodName = "widgets.getPages") { init { widgetApiId?.let { value -> addParam("widget_api_id", value) diff --git a/vk-sdk-core/src/main/AndroidManifest.xml b/vk-sdk-core/src/main/AndroidManifest.xml index a9aec97a5b..c335d89add 100644 --- a/vk-sdk-core/src/main/AndroidManifest.xml +++ b/vk-sdk-core/src/main/AndroidManifest.xml @@ -24,6 +24,21 @@ + + + + + + + + + + + + + + + diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/VKApiConfig.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/VKApiConfig.kt index e3b7fd0d3b..8542b31575 100644 --- a/vk-sdk-core/src/main/java/com/vk/api/sdk/VKApiConfig.kt +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/VKApiConfig.kt @@ -25,6 +25,7 @@ package com.vk.api.sdk import android.content.Context +import com.vk.api.sdk.chain.RateLimitReachedChainCall import com.vk.api.sdk.utils.log.DefaultApiLogger import com.vk.api.sdk.utils.log.Logger import java.util.concurrent.TimeUnit @@ -52,7 +53,8 @@ data class VKApiConfig( val httpApiHostProvider: () -> String = { DEFAULT_API_DOMAIN }, val lang: String = "en", val keyValueStorage: VKKeyValueStorage = VKPreferencesKeyValueStorage(context), - val customApiEndpoint: Lazy = lazy { DEFAULT_API_ENDPOINT } + val customApiEndpoint: Lazy = lazy { DEFAULT_API_ENDPOINT }, + val rateLimitBackoffTimeoutMs: Long = TimeUnit.HOURS.toMillis(1) ) { fun builder(context: Context) = Builder(VKApiConfig(context, validationHandler = VKDefaultValidationHandler(context))) @@ -125,6 +127,10 @@ data class VKApiConfig( config = config.copy(debugCycleCalls = lazy { debugCycleCalls }) } + fun setRateLimitBackoff(rateLimitBackoffTimeoutMs: Long) = apply { + config = config.copy(rateLimitBackoffTimeoutMs = rateLimitBackoffTimeoutMs) + } + fun build(): VKApiConfig { return config } diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/VKApiManager.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/VKApiManager.kt index 8791f882b2..e43fecdc4b 100644 --- a/vk-sdk-core/src/main/java/com/vk/api/sdk/VKApiManager.kt +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/VKApiManager.kt @@ -30,12 +30,21 @@ import com.vk.api.sdk.okhttp.OkHttpExecutor import com.vk.api.sdk.okhttp.OkHttpExecutorConfig import com.vk.api.sdk.okhttp.OkHttpMethodCall import java.io.IOException +import java.util.concurrent.TimeUnit /** * Class for execution api request */ @Suppress("UseExpressionBody") open class VKApiManager(val config: VKApiConfig) { + + private val rateLimitBackoff by lazy { + RateLimitReachedChainCall.RateLimitBackoff( + context = config.context, + backoffTimeMs = config.rateLimitBackoffTimeoutMs + ) + } + internal val validationHandler: VKApiValidationHandler? = config.validationHandler open val executor by lazy { OkHttpExecutor(OkHttpExecutorConfig(config)) } @@ -84,6 +93,7 @@ open class VKApiManager(val config: VKApiConfig) { cc = InvalidCredentialsObserverChainCall(this, cc, 1) cc = TooManyRequestRetryChainCall(this, call.retryCount, cc) + cc = RateLimitReachedChainCall(this, call.method, rateLimitBackoff, cc) if (call.retryCount > 0) { cc = InternalErrorRetryChainCall(this, call.retryCount, cc) } diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/auth/VKAuthManager.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/auth/VKAuthManager.kt index d612831dc8..4f75462253 100644 --- a/vk-sdk-core/src/main/java/com/vk/api/sdk/auth/VKAuthManager.kt +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/auth/VKAuthManager.kt @@ -36,7 +36,7 @@ import java.util.* internal class VKAuthManager(private val keyValueStorage: VKKeyValueStorage) { fun login(activity: Activity, scopes: Collection) { val params = VKAuthParams(VK.getAppId(activity), scope = scopes) - if (VKUtils.isAppInstalled(activity, VK_APP_PACKAGE_ID) && VKUtils.isIntentAvailable(activity, VK_APP_AUTH_ACTION)) { + if (VKUtils.isIntentAvailable(activity, VK_APP_AUTH_ACTION, null, VK_APP_PACKAGE_ID)) { startAuthActivity(activity, params) } else { // start dialog with webview diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserDescriptor.java b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserDescriptor.java new file mode 100644 index 0000000000..fe124e23fd --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserDescriptor.java @@ -0,0 +1,169 @@ +/* + * Copyright 2016 The AppAuth for Android Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.vk.api.sdk.browser; + +import android.content.pm.PackageInfo; +import android.content.pm.Signature; +import android.util.Base64; + +import androidx.annotation.NonNull; + +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.HashSet; +import java.util.Set; + +/** + * Represents a browser that may be used for an authorization flow. + */ +public class BrowserDescriptor { + + // See: http://stackoverflow.com/a/2816747 + private static final int PRIME_HASH_FACTOR = 92821; + + private static final String DIGEST_SHA_512 = "SHA-512"; + + /** + * The package name of the browser app. + */ + public final String packageName; + + /** + * The set of {@link Signature signatures} of the browser app, + * which have been hashed with SHA-512, and Base-64 URL-safe encoded. + */ + public final Set signatureHashes; + + /** + * The version string of the browser app. + */ + public final String version; + + /** + * Whether it is intended that the browser will be used via a custom tab. + */ + public final Boolean useCustomTab; + + /** + * Creates a description of a browser from a {@link PackageInfo} object returned from the + * {@link android.content.pm.PackageManager}. The object is expected to include the + * signatures of the app, which can be retrieved with the + * {@link android.content.pm.PackageManager#GET_SIGNATURES GET_SIGNATURES} flag when + * calling {@link android.content.pm.PackageManager#getPackageInfo(String, int)}. + */ + public BrowserDescriptor(@NonNull PackageInfo packageInfo, boolean useCustomTab) { + this( + packageInfo.packageName, + generateSignatureHashes(packageInfo.signatures), + packageInfo.versionName, + useCustomTab); + } + + /** + * Creates a description of a browser from the core properties that are frequently used to + * decide whether a browser can be used for an authorization flow. In most cases, it is + * more convenient to use the other variant of the constructor that consumes a + * {@link PackageInfo} object provided by the package manager. + * + * @param packageName The Android package name of the browser. + * @param signatureHashes The set of SHA-512, Base64 url safe encoded signatures for the app. This can be + * generated for a signature by calling {@link #generateSignatureHash(Signature)}. + * @param version The version name of the browser. + * @param useCustomTab Whether it is intended to use the browser as a custom tab. + */ + public BrowserDescriptor( + @NonNull String packageName, + @NonNull Set signatureHashes, + @NonNull String version, + boolean useCustomTab) { + this.packageName = packageName; + this.signatureHashes = signatureHashes; + this.version = version; + this.useCustomTab = useCustomTab; + } + + /** + * Creates a copy of this browser descriptor, changing the intention to use it as a custom + * tab to the specified value. + */ + @NonNull + public BrowserDescriptor changeUseCustomTab(boolean newUseCustomTabValue) { + return new BrowserDescriptor( + packageName, + signatureHashes, + version, + newUseCustomTabValue); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (obj == null || !(obj instanceof BrowserDescriptor)) { + return false; + } + + BrowserDescriptor other = (BrowserDescriptor) obj; + return this.packageName.equals(other.packageName) + && this.version.equals(other.version) + && this.useCustomTab == other.useCustomTab + && this.signatureHashes.equals(other.signatureHashes); + } + + @Override + public int hashCode() { + int hash = packageName.hashCode(); + + hash = PRIME_HASH_FACTOR * hash + version.hashCode(); + hash = PRIME_HASH_FACTOR * hash + (useCustomTab ? 1 : 0); + + for (String signatureHash : signatureHashes) { + hash = PRIME_HASH_FACTOR * hash + signatureHash.hashCode(); + } + + return hash; + } + + /** + * Generates a SHA-512 hash, Base64 url-safe encoded, from a {@link Signature}. + */ + @NonNull + public static String generateSignatureHash(@NonNull Signature signature) { + try { + MessageDigest digest = MessageDigest.getInstance(DIGEST_SHA_512); + byte[] hashBytes = digest.digest(signature.toByteArray()); + return Base64.encodeToString(hashBytes, Base64.URL_SAFE | Base64.NO_WRAP); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException( + "Platform does not support" + DIGEST_SHA_512 + " hashing"); + } + } + + /** + * Generates a set of SHA-512, Base64 url-safe encoded signature hashes from the provided + * array of signatures. + */ + @NonNull + public static Set generateSignatureHashes(@NonNull Signature[] signatures) { + Set signatureHashes = new HashSet<>(); + for (Signature signature : signatures) { + signatureHashes.add(generateSignatureHash(signature)); + } + + return signatureHashes; + } +} \ No newline at end of file diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserMatcher.java b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserMatcher.java new file mode 100644 index 0000000000..49f2d08423 --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserMatcher.java @@ -0,0 +1,7 @@ +package com.vk.api.sdk.browser; + +import androidx.annotation.NonNull; + +public interface BrowserMatcher { + boolean matches(@NonNull BrowserDescriptor descriptor); +} diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserSelector.java b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserSelector.java new file mode 100644 index 0000000000..987e4df209 --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/BrowserSelector.java @@ -0,0 +1,211 @@ +/* + * Copyright 2015 The AppAuth for Android Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.vk.api.sdk.browser; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.content.pm.PackageManager.NameNotFoundException; +import android.content.pm.ResolveInfo; +import android.net.Uri; +import android.os.Build.VERSION; +import android.os.Build.VERSION_CODES; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * Utility class to obtain the browser package name to be used for + * OAuth calls. It prioritizes browsers which support + * [custom tabs](https://developer.chrome.com/multidevice/android/customtabs). To mitigate + * man-in-the-middle attacks by malicious apps pretending to be browsers for the specific URI we + * query, only those which are registered as a handler for _all_ HTTP and HTTPS URIs will be + * used. + */ +public final class BrowserSelector { + + private static final String SCHEME_HTTP = "http"; + private static final String SCHEME_HTTPS = "https"; + + /** + * The service we expect to find on a web browser that indicates it supports custom tabs. + */ + @VisibleForTesting + // HACK: Using a StringBuilder prevents Jetifier from tempering with our constants. + @SuppressWarnings("StringBufferReplaceableByString") + private static final String ACTION_CUSTOM_TABS_CONNECTION = new StringBuilder("android") + .append(".support.customtabs.action.CustomTabsService").toString(); + + /** + * An arbitrary (but unregistrable, per + * IANA rules) web intent used to query + * for installed web browsers on the system. + */ + @VisibleForTesting + static final Intent BROWSER_INTENT = new Intent( + Intent.ACTION_VIEW, + Uri.parse("http://www.example.com")); + + /** + * Retrieves the full list of browsers installed on the device. Two entries will exist + * for each browser that supports custom tabs, with the {@link BrowserDescriptor#useCustomTab} + * flag set to `true` in one and `false` in the other. The list is in the + * order returned by the package manager, so indirectly reflects the user's preferences + * (i.e. their default browser, if set, should be the first entry in the list). + */ + @SuppressLint("PackageManagerGetSignatures") + @NonNull + public static List getAllBrowsers(Context context) { + PackageManager pm = context.getPackageManager(); + List browsers = new ArrayList<>(); + String defaultBrowserPackage = null; + + int queryFlag = PackageManager.GET_RESOLVED_FILTER; + if (VERSION.SDK_INT >= VERSION_CODES.M) { + queryFlag |= PackageManager.MATCH_ALL; + } + // When requesting all matching activities for an intent from the package manager, + // the user's preferred browser is not guaranteed to be at the head of this list. + // Therefore, the preferred browser must be separately determined and the resultant + // list of browsers reordered to restored this desired property. + ResolveInfo resolvedDefaultActivity = + pm.resolveActivity(BROWSER_INTENT, 0); + if (resolvedDefaultActivity != null) { + defaultBrowserPackage = resolvedDefaultActivity.activityInfo.packageName; + } + List resolvedActivityList = + pm.queryIntentActivities(BROWSER_INTENT, queryFlag); + + for (ResolveInfo info : resolvedActivityList) { + // ignore handlers which are not browsers + if (!isFullBrowser(info)) { + continue; + } + + try { + int defaultBrowserIndex = 0; + PackageInfo packageInfo = pm.getPackageInfo( + info.activityInfo.packageName, + PackageManager.GET_SIGNATURES); + + if (hasWarmupService(pm, info.activityInfo.packageName)) { + BrowserDescriptor customTabBrowserDescriptor = + new BrowserDescriptor(packageInfo, true); + if (info.activityInfo.packageName.equals(defaultBrowserPackage)) { + // If the default browser is having a WarmupService, + // will it be added to the beginning of the list. + browsers.add(defaultBrowserIndex, customTabBrowserDescriptor); + defaultBrowserIndex++; + } else { + browsers.add(customTabBrowserDescriptor); + } + } + + BrowserDescriptor fullBrowserDescriptor = + new BrowserDescriptor(packageInfo, false); + if (info.activityInfo.packageName.equals(defaultBrowserPackage)) { + // The default browser is added to the beginning of the list. + // If there is support for Custom Tabs, will the one disabling Custom Tabs + // be added as the second entry. + browsers.add(defaultBrowserIndex, fullBrowserDescriptor); + } else { + browsers.add(fullBrowserDescriptor); + } + } catch (NameNotFoundException e) { + // a descriptor cannot be generated without the package info + } + } + + return browsers; + } + + /** + * Searches through all browsers for the best match based on the supplied browser matcher. + * Custom tab supporting browsers are preferred, if the matcher permits them, and browsers + * are evaluated in the order returned by the package manager, which should indirectly match + * the user's preferences. + * + * @param context {@link Context} to use for accessing {@link PackageManager}. + * @return The package name recommended to use for connecting to custom tabs related components. + */ + @SuppressLint("PackageManagerGetSignatures") + @Nullable + public static BrowserDescriptor select(Context context, BrowserMatcher browserMatcher) { + List allBrowsers = getAllBrowsers(context); + BrowserDescriptor bestMatch = null; + for (BrowserDescriptor browser : allBrowsers) { + if (!browserMatcher.matches(browser)) { + continue; + } + + if (browser.useCustomTab) { + // directly return the first custom tab supporting browser that is matched + return browser; + } + + if (bestMatch == null) { + // store this as the best match for use if we don't find any matching + // custom tab supporting browsers + bestMatch = browser; + } + } + return bestMatch; + } + + private static boolean hasWarmupService(PackageManager pm, String packageName) { + Intent serviceIntent = new Intent(); + serviceIntent.setAction(ACTION_CUSTOM_TABS_CONNECTION); + serviceIntent.setPackage(packageName); + return (pm.resolveService(serviceIntent, 0) != null); + } + + private static boolean isFullBrowser(ResolveInfo resolveInfo) { + // The filter must match ACTION_VIEW, CATEGORY_BROWSEABLE, and at least one scheme, + if (!resolveInfo.filter.hasAction(Intent.ACTION_VIEW) + || !resolveInfo.filter.hasCategory(Intent.CATEGORY_BROWSABLE) + || resolveInfo.filter.schemesIterator() == null) { + return false; + } + + // The filter must not be restricted to any particular set of authorities + if (resolveInfo.filter.authoritiesIterator() != null) { + return false; + } + + // The filter must support both HTTP and HTTPS. + boolean supportsHttp = false; + boolean supportsHttps = false; + Iterator schemeIter = resolveInfo.filter.schemesIterator(); + while (schemeIter.hasNext()) { + String scheme = schemeIter.next(); + supportsHttp |= SCHEME_HTTP.equals(scheme); + supportsHttps |= SCHEME_HTTPS.equals(scheme); + + if (supportsHttp && supportsHttps) { + return true; + } + } + + // at least one of HTTP or HTTPS is not supported + return false; + } +} \ No newline at end of file diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/Browsers.java b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/Browsers.java new file mode 100644 index 0000000000..d78eb8c72e --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/Browsers.java @@ -0,0 +1,182 @@ +package com.vk.api.sdk.browser; + +/* + * Copyright 2016 The AppAuth for Android Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ + +import androidx.annotation.NonNull; + +import java.util.Collections; +import java.util.Set; + +/** + * Defines the attributes of some commonly-used browsers on Android, for use in browser matchers. + */ +public final class Browsers { + + /** + * Constants related to Google Chrome. + */ + public static final class Chrome { + + /** + * The package name for Chrome. + */ + public static final String PACKAGE_NAME = "com.android.chrome"; + + /** + * The SHA-512 hash (Base64 url-safe encoded) of the public key for Chrome. + */ + public static final String SIGNATURE = + "7fmduHKTdHHrlMvldlEqAIlSfii1tl35bxj1OXN5Ve8c4lU6URVu4xtSHc3BVZxS" + + "6WWJnxMDhIfQN0N0K2NDJg=="; + + /** + * The set of signature hashes for Chrome. + */ + public static final Set SIGNATURE_SET = + Collections.singleton(SIGNATURE); + + /** + * The version in which Custom Tabs were introduced in Chrome. + */ + public static final DelimitedVersion MINIMUM_VERSION_FOR_CUSTOM_TAB = + DelimitedVersion.parse("45"); + + /** + * Creates a browser descriptor for the specified version of Chrome, when used as a + * standalone browser. + */ + public static BrowserDescriptor standaloneBrowser(@NonNull String version) { + return new BrowserDescriptor(PACKAGE_NAME, SIGNATURE_SET, version, false); + } + + /** + * Creates a browser descriptor for the specified version of Chrome, when used as + * a custom tab. + */ + public static BrowserDescriptor customTab(@NonNull String version) { + return new BrowserDescriptor(PACKAGE_NAME, SIGNATURE_SET, version, true); + } + + private Chrome() { + // no need to construct this class + } + } + + /** + * Constants related to Mozilla Firefox. + */ + public static final class Firefox { + + /** + * The package name for Firefox. + */ + public static final String PACKAGE_NAME = "org.mozilla.firefox"; + + /** + * The SHA-512 hash (Base64 url-safe encoded) of the public key for Firefox. + */ + public static final String SIGNATURE_HASH = + "2gCe6pR_AO_Q2Vu8Iep-4AsiKNnUHQxu0FaDHO_qa178GByKybdT_BuE8_dYk99G" + + "5Uvx_gdONXAOO2EaXidpVQ=="; + + /** + * The set of signature hashes for Firefox. + */ + public static final Set SIGNATURE_SET = + Collections.singleton(SIGNATURE_HASH); + + /** + * The version in which Custom Tabs were introduced in Firefox. + */ + public static final DelimitedVersion MINIMUM_VERSION_FOR_CUSTOM_TAB = + DelimitedVersion.parse("57"); + + /** + * Creates a browser descriptor for the specified version of Firefox, when used + * as a standalone browser. + */ + public static BrowserDescriptor standaloneBrowser(@NonNull String version) { + return new BrowserDescriptor(PACKAGE_NAME, SIGNATURE_SET, version, false); + } + + /** + * Creates a browser descriptor for the specified version of Firefox, when used as + * a custom tab. + */ + public static BrowserDescriptor customTab(@NonNull String version) { + return new BrowserDescriptor(PACKAGE_NAME, SIGNATURE_SET, version, true); + } + + private Firefox() { + // no need to construct this class + } + } + + /** + * Constants related to + * [SBrowser](https://play.google.com/store/apps/details?id=com.sec.android.app.sbrowser), + * the default browser on Samsung devices. + */ + public static final class SBrowser { + + /** + * The package name for SBrowser. + */ + public static final String PACKAGE_NAME = "com.sec.android.app.sbrowser"; + + /** + * The SHA-512 hash (Base64 url-safe encoded) of the public key for SBrowser. + */ + public static final String SIGNATURE_HASH = + "ABi2fbt8vkzj7SJ8aD5jc4xJFTDFntdkMrYXL3itsvqY1QIw-dZozdop5rgKNxjb" + + "rQAd5nntAGpgh9w84O1Xgg=="; + + /** + * The set of signature hashes for SBrowser. + */ + public static final Set SIGNATURE_SET = + Collections.singleton(SIGNATURE_HASH); + + /** + * The version in which Custom Tabs were introduced in Samsung Internet. + */ + public static final DelimitedVersion MINIMUM_VERSION_FOR_CUSTOM_TAB = + DelimitedVersion.parse("4.0"); + + /** + * Creates a browser descriptor for the specified version of SBrowser, when + * used as a standalone browser. + */ + public static BrowserDescriptor standaloneBrowser(@NonNull String version) { + return new BrowserDescriptor(PACKAGE_NAME, SIGNATURE_SET, version, false); + } + + /** + * Creates a browser descriptor for the specified version of SBrowser, when + * used as a custom tab. + */ + public static BrowserDescriptor customTab(@NonNull String version) { + return new BrowserDescriptor(PACKAGE_NAME, SIGNATURE_SET, version, true); + } + + private SBrowser() { + // no need to construct this class + } + } + + private Browsers() { + // no need to construct this class + } +} \ No newline at end of file diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/DelimitedVersion.java b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/DelimitedVersion.java new file mode 100644 index 0000000000..ab0f3d2aaf --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/DelimitedVersion.java @@ -0,0 +1,141 @@ +/* + * Copyright 2016 The AppAuth for Android Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.vk.api.sdk.browser; + +import androidx.annotation.NonNull; + +/** + * Represents a delimited version number for an application. This can parse common version number + * formats, treating any sequence of non-numeric characters as a delimiter, and discards these + * to retain just the numeric content for comparison. Trailing zeroes in a version number + * are discarded to produce a compact, canonical representation. Empty versions are equivalent to + * "0". Each numeric part is expected to fit within a 64-bit integer. + */ +public class DelimitedVersion implements Comparable { + + // See: http://stackoverflow.com/a/2816747 + private static final int PRIME_HASH_FACTOR = 92821; + + private static final long BIT_MASK_32 = 0xFFFFFFFF; + + private final long[] mNumericParts; + + /** + * Creates a version with the specified parts, ordered from major to minor. + */ + public DelimitedVersion(long[] numericParts) { + mNumericParts = numericParts; + } + + @Override + public String toString() { + if (mNumericParts.length == 0) { + return "0"; + } + + StringBuilder builder = new StringBuilder(); + builder.append(mNumericParts[0]); + + int index = 1; + while (index < mNumericParts.length) { + builder.append('.'); + builder.append(mNumericParts[index]); + index++; + } + + return builder.toString(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (obj == null || !(obj instanceof DelimitedVersion)) { + return false; + } + + return this.compareTo((DelimitedVersion) obj) == 0; + } + + @Override + public int hashCode() { + int result = 0; + + for (long numericPart : mNumericParts) { + result = result * PRIME_HASH_FACTOR + (int) (numericPart & BIT_MASK_32); + } + + return result; + } + + @Override + public int compareTo(@NonNull DelimitedVersion other) { + int index = 0; + + while (index < this.mNumericParts.length && index < other.mNumericParts.length) { + int currentPartOrder = + compareLongs(this.mNumericParts[index], other.mNumericParts[index]); + if (currentPartOrder != 0) { + return currentPartOrder; + } + index++; + } + + return compareLongs(this.mNumericParts.length, other.mNumericParts.length); + } + + /** + * Parses a delimited version number from the provided string. + */ + public static DelimitedVersion parse(String versionString) { + + if (versionString == null) { + return new DelimitedVersion(new long[0]); + } + + String[] stringParts = versionString.split("[^0-9]+"); + + long[] parsedParts = new long[stringParts.length]; + int index = 0; + for (String numericPart : stringParts) { + if (numericPart.isEmpty()) { + continue; + } + + parsedParts[index] = Long.parseLong(numericPart); + index++; + } + + // discard all trailing zeroes + index--; + while (index >= 0) { + if (parsedParts[index] > 0) { + break; + } + index--; + } + + int length = index + 1; + long[] onlyParsedParts = new long[length]; + System.arraycopy(parsedParts, 0, onlyParsedParts, 0, length); + return new DelimitedVersion(onlyParsedParts); + } + + private static int compareLongs(long a, long b) { + return a < b ? -1 : (a > b ? 1 : 0); + } +} \ No newline at end of file diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/VersionRange.java b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/VersionRange.java new file mode 100644 index 0000000000..ce08b4c05a --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/VersionRange.java @@ -0,0 +1,124 @@ +/* + * Copyright 2016 The AppAuth for Android Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.vk.api.sdk.browser; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +/** + * A browser filter which matches when a browser falls into a version range. Versions are + * expected to match the semantics of {@link DelimitedVersion}. + */ +public class VersionRange { + + /** + * A version range that matches any delimited version. + */ + public static final VersionRange ANY_VERSION = new VersionRange(null, null); + + private DelimitedVersion mLowerBound; + private DelimitedVersion mUpperBound; + + /** + * Creates a version range that will match any version at or above the specified version, + * which will be parsed as a {@link DelimitedVersion}. + */ + public static VersionRange atLeast(String version) { + return atLeast(DelimitedVersion.parse(version)); + } + + /** + * Creates a version range that will match any version at or above the specified version. + */ + public static VersionRange atLeast(DelimitedVersion version) { + return new VersionRange(version, null); + } + + /** + * Creates a version range that will match any version at or below the specified version, + * which will be parsed as a {@link DelimitedVersion}. + */ + public static VersionRange atMost(String version) { + return atMost(DelimitedVersion.parse(version)); + } + + /** + * Creates a version range that will match any version at or below the specified version. + */ + public static VersionRange atMost(DelimitedVersion version) { + return new VersionRange(null, version); + } + + /** + * Creates a version range that will match any version equal to or between the specified + * versions, which will be parsed as {@link DelimitedVersion} instances. + */ + public static VersionRange between(String lowerBound, String upperBound) { + return new VersionRange( + DelimitedVersion.parse(lowerBound), + DelimitedVersion.parse(upperBound)); + } + + /** + * Creates a version range with the specified bounds. A null bound is treated as "no bound" + * on that end. + */ + public VersionRange( + @Nullable DelimitedVersion lowerBound, + @Nullable DelimitedVersion upperBound) { + mLowerBound = lowerBound; + mUpperBound = upperBound; + } + + /** + * Determines whether the specified version (parsed as an {@link DelimitedVersion} falls within + * the version range. + */ + public boolean matches(@NonNull String version) { + return matches(DelimitedVersion.parse(version)); + } + + /** + * Determines whether the specified version falls within the version range. + */ + public boolean matches(@NonNull DelimitedVersion version) { + if (mLowerBound != null && mLowerBound.compareTo(version) > 0) { + return false; + } + + if (mUpperBound != null && mUpperBound.compareTo(version) < 0) { + return false; + } + + return true; + } + + @Override + public String toString() { + if (mLowerBound == null) { + if (mUpperBound == null) { + return "any version"; + } + + return mUpperBound.toString() + " or lower"; + } + + if (mUpperBound != null) { + return "between " + mLowerBound + " and " + mUpperBound; + } + + return mLowerBound.toString() + " or higher"; + } +} \ No newline at end of file diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/VersionedBrowserMatcher.java b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/VersionedBrowserMatcher.java new file mode 100644 index 0000000000..ddd54cb664 --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/VersionedBrowserMatcher.java @@ -0,0 +1,135 @@ + +/* + * Copyright 2016 The AppAuth for Android Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.vk.api.sdk.browser; + +import androidx.annotation.NonNull; + +import java.util.Collections; +import java.util.Set; + +/** + * Matches a browser based on its package name, set of signatures, version and whether it is + * being used as a custom tab. This can be used as part of a browser whitelist or blacklist. + */ +public class VersionedBrowserMatcher implements BrowserMatcher { + + /** + * Matches any version of Chrome for use as a custom tab. + */ + public static final VersionedBrowserMatcher CHROME_CUSTOM_TAB = new VersionedBrowserMatcher( + Browsers.Chrome.PACKAGE_NAME, + Browsers.Chrome.SIGNATURE_SET, + true, + VersionRange.atLeast(Browsers.Chrome.MINIMUM_VERSION_FOR_CUSTOM_TAB)); + + /** + * Matches any version of Google Chrome for use as a standalone browser. + */ + public static final VersionedBrowserMatcher CHROME_BROWSER = new VersionedBrowserMatcher( + Browsers.Chrome.PACKAGE_NAME, + Browsers.Chrome.SIGNATURE_SET, + false, + VersionRange.ANY_VERSION); + + /** + * Matches any version of Firefox for use as a custom tab. + */ + public static final VersionedBrowserMatcher FIREFOX_CUSTOM_TAB = new VersionedBrowserMatcher( + Browsers.Firefox.PACKAGE_NAME, + Browsers.Firefox.SIGNATURE_SET, + true, + VersionRange.atLeast(Browsers.Firefox.MINIMUM_VERSION_FOR_CUSTOM_TAB)); + + /** + * Matches any version of Mozilla Firefox. + */ + public static final VersionedBrowserMatcher FIREFOX_BROWSER = new VersionedBrowserMatcher( + Browsers.Firefox.PACKAGE_NAME, + Browsers.Firefox.SIGNATURE_SET, + false, + VersionRange.ANY_VERSION); + + /** + * Matches any version of SBrowser for use as a standalone browser. + */ + public static final VersionedBrowserMatcher SAMSUNG_BROWSER = new VersionedBrowserMatcher( + Browsers.SBrowser.PACKAGE_NAME, + Browsers.SBrowser.SIGNATURE_SET, + false, + VersionRange.ANY_VERSION); + + /** + * Matches any browser. + */ + public static final BrowserMatcher ANY_BROWSER = new BrowserMatcher() { + @Override + public boolean matches(@NonNull BrowserDescriptor descriptor) { + return true; + } + }; + + /** + * Matches any version of SBrowser for use as a custom tab. + */ + public static final VersionedBrowserMatcher SAMSUNG_CUSTOM_TAB = new VersionedBrowserMatcher( + Browsers.SBrowser.PACKAGE_NAME, + Browsers.SBrowser.SIGNATURE_SET, + true, + VersionRange.atLeast(Browsers.SBrowser.MINIMUM_VERSION_FOR_CUSTOM_TAB)); + + private String mPackageName; + private Set mSignatureHashes; + private VersionRange mVersionRange; + private boolean mUsingCustomTab; + + /** + * Creates a browser matcher that requires an exact match on package name, single signature + * hash, custom tab usage mode, and a version range. + */ + public VersionedBrowserMatcher( + @NonNull String packageName, + @NonNull String signatureHash, + boolean usingCustomTab, + @NonNull VersionRange versionRange) { + this(packageName, + Collections.singleton(signatureHash), + usingCustomTab, + versionRange); + } + + /** + * Creates a browser matcher that requires an exact match on package name, set of signature + * hashes, custom tab usage mode, and a version range. + */ + public VersionedBrowserMatcher( + @NonNull String packageName, + @NonNull Set signatureHashes, + boolean usingCustomTab, + @NonNull VersionRange versionRange) { + mPackageName = packageName; + mSignatureHashes = signatureHashes; + mUsingCustomTab = usingCustomTab; + mVersionRange = versionRange; + } + + @Override + public boolean matches(@NonNull BrowserDescriptor descriptor) { + return mPackageName.equals(descriptor.packageName) + && mUsingCustomTab == descriptor.useCustomTab + && mVersionRange.matches(descriptor.version) + && mSignatureHashes.equals(descriptor.signatureHashes); + } +} \ No newline at end of file diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/WhiteListedBrowserHelper.java b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/WhiteListedBrowserHelper.java new file mode 100644 index 0000000000..c8ec96e777 --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/browser/WhiteListedBrowserHelper.java @@ -0,0 +1,38 @@ +package com.vk.api.sdk.browser; + +import android.content.Context; +import android.util.Log; + +import androidx.annotation.Nullable; + +import java.util.Arrays; +import java.util.List; + +public class WhiteListedBrowserHelper { + + private static final List WHITE_LIST = Arrays.asList( + VersionedBrowserMatcher.CHROME_BROWSER, + VersionedBrowserMatcher.CHROME_CUSTOM_TAB, + VersionedBrowserMatcher.FIREFOX_CUSTOM_TAB, + VersionedBrowserMatcher.FIREFOX_BROWSER, + VersionedBrowserMatcher.SAMSUNG_BROWSER, + VersionedBrowserMatcher.SAMSUNG_CUSTOM_TAB); + + @Nullable + public static BrowserDescriptor selectBestBrowser(Context context) { + try { + List allBrowsers = BrowserSelector.getAllBrowsers(context); + for (BrowserDescriptor descriptor : allBrowsers) { + for (VersionedBrowserMatcher versionedBrowserMatcher : WHITE_LIST) { + if (versionedBrowserMatcher.matches(descriptor)) { + return descriptor; + } + } + } + return allBrowsers.isEmpty() ? null : allBrowsers.get(0); + } catch (Exception e) { + Log.e("BrowserSelector", "Exception in select browser", e); + return null; + } + } +} diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/chain/RateLimitReachedChainCall.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/chain/RateLimitReachedChainCall.kt new file mode 100644 index 0000000000..605890e61a --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/chain/RateLimitReachedChainCall.kt @@ -0,0 +1,97 @@ +package com.vk.api.sdk.chain + +import android.content.Context +import android.os.SystemClock +import com.vk.api.sdk.VKApiManager +import com.vk.api.sdk.exceptions.RateLimitReachedException +import com.vk.api.sdk.exceptions.VKApiCodes +import com.vk.api.sdk.exceptions.VKApiExecutionException + +/** + * chain call which handles [VKApiCodes.CODE_RATE_LIMIT_REACHED] error code + * for now if we receive that code we don't have to call this method for the next backoff time + * in most cases normal back off time is 1 hour + * + * if backoff time for the current method is not over we throw our custom [RateLimitReachedException] + * and don't do real api method call + * + * @param manager - [VKApiManager] instance + * @param method - method name + * @param chainCall - current [ChainCall] + */ +class RateLimitReachedChainCall( + manager: VKApiManager, + private val method: String, + private val backoff: RateLimitBackoff, + private val chainCall: ChainCall +): ChainCall(manager) { + + override fun call(args: ChainArgs): T? { + if (backoff.shouldWait(method)) { + throw RateLimitReachedException(method, DETAIL_MESSAGE) + } + + backoff.reset(method) + try { + return chainCall.call(args) + } catch (ex: VKApiExecutionException) { + if (ex.isRateLimitReachedError) { + backoff.backoff(method) + logDebug(DETAIL_MESSAGE, ex) + } + throw ex + } + } + + /** + * backoff implementation for the api rate limit + * + * @param context - android [Context] + * @param backoffTimeMs - backoff time in ms the default is 1 hour + * + * it's based on [SystemClock.elapsedRealtime] and here we don't want to handle system reboot + * + * in case of reboot we will make another api call and then go through a normal [RateLimitBackoff] logic + */ + class RateLimitBackoff( + context: Context, + private val backoffTimeMs: Long, + private val realTimeProvider: () -> Long = { + SystemClock.elapsedRealtime() + } + ) { + + private val prefStorage by lazy { + context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE) + } + + fun shouldWait(operationKey: String): Boolean { + if (prefStorage.contains(operationKey).not()) { + return false + } + + val elapsedTime = realTimeProvider() + val value = prefStorage.getLong(operationKey, backoffTimeMs) + + //we don't want to handle device reboot + if (elapsedTime - value >= 0) { + return value + backoffTimeMs > elapsedTime + } + + return false + } + + fun reset(operationKey: String) { + prefStorage.edit().remove(operationKey).apply() + } + + fun backoff(operationKey: String) { + prefStorage.edit().putLong(operationKey, realTimeProvider()).apply() + } + } + + companion object { + private const val DETAIL_MESSAGE = "Rate limit reached." + private const val PREF_NAME = "rate_limit_backoff_storage" + } +} \ No newline at end of file diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/exceptions/RateLimitReachedException.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/exceptions/RateLimitReachedException.kt new file mode 100644 index 0000000000..f22bfa74fa --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/exceptions/RateLimitReachedException.kt @@ -0,0 +1,8 @@ +package com.vk.api.sdk.exceptions + +class RateLimitReachedException(method: String, message: String): VKApiExecutionException( + code = VKApiCodes.CODE_RATE_LIMIT_REACHED, + apiMethod = method, + hasLocalizedMessage = false, + detailMessage = message +) \ No newline at end of file diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/exceptions/VKApiExecutionException.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/exceptions/VKApiExecutionException.kt index cd48e596b1..0999219f50 100644 --- a/vk-sdk-core/src/main/java/com/vk/api/sdk/exceptions/VKApiExecutionException.kt +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/exceptions/VKApiExecutionException.kt @@ -98,6 +98,9 @@ open class VKApiExecutionException val isPasswordConfirmRequired: Boolean get() = code == VKApiCodes.CODE_ERROR_NEED_TOKEN_EXTENSION + val isRateLimitReachedError: Boolean + get() = code == VKApiCodes.CODE_RATE_LIMIT_REACHED + val captchaSid: String get() = extra?.getString(VKApiCodes.EXTRA_CAPTCHA_SID, "") ?: "" @@ -137,9 +140,16 @@ open class VKApiExecutionException } override fun toString(): String { + val printableExtra = when { + extra?.containsKey(VKApiCodes.EXTRA_ACCESS_TOKEN) == true -> Bundle(extra).apply { + putString(VKApiCodes.EXTRA_ACCESS_TOKEN, "hidden") + } + else -> extra + } + return "VKApiExecutionException{" + "code=$code" + - ", extra=$extra" + + ", extra=$printableExtra" + ", method=$apiMethod" + ", executeErrors=" + executeErrors?.joinToString(prefix = "[", postfix = "]") + ", super=" + super.toString() + diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/okhttp/OkHttpExecutor.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/okhttp/OkHttpExecutor.kt index 968ba725f6..82b20b88b7 100644 --- a/vk-sdk-core/src/main/java/com/vk/api/sdk/okhttp/OkHttpExecutor.kt +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/okhttp/OkHttpExecutor.kt @@ -59,7 +59,8 @@ open class OkHttpExecutor(protected val config: OkHttpExecutorConfig) { get() = config.hostProvider() @Volatile var accessToken = config.accessToken private set - @Volatile protected var secret = config.secret + @Volatile var secret = config.secret + private set private val customEndpoint = config.customEndpoint private val clientsByTimeouts = LongSparseArray() diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/requests/VKRequest.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/requests/VKRequest.kt index 020ce98648..158b4c14a7 100644 --- a/vk-sdk-core/src/main/java/com/vk/api/sdk/requests/VKRequest.kt +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/requests/VKRequest.kt @@ -41,7 +41,7 @@ import java.util.* * Use sdk sample as an example * If you need more flexibility, use ApiCommand */ -open class VKRequest(var method: String) : VKApiResponseParser, ApiCommand() { +open class VKRequest(var method: String, val requestApiVersion: String? = null) : VKApiResponseParser, ApiCommand() { val params = LinkedHashMap() // Params @@ -75,15 +75,15 @@ open class VKRequest(var method: String) : VKApiResponseParser, ApiCommand @Throws(InterruptedException::class, IOException::class, VKApiException::class) override fun onExecute(manager: VKApiManager): T { val config = manager.config - + val version = requestApiVersion ?: config.version params["lang"] = config.lang params["device_id"] = config.deviceId.value - params["v"] = config.version + params["v"] = version val callBuilder = createBaseCallBuilder(config) .args(params) .method(method) - .version(config.version) + .version(version) return manager.execute(callBuilder.build(), this) } diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/ui/VKBaseAuthActivity.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/ui/VKBaseAuthActivity.kt new file mode 100644 index 0000000000..6b787b018a --- /dev/null +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/ui/VKBaseAuthActivity.kt @@ -0,0 +1,106 @@ +package com.vk.api.sdk.ui + +import android.app.Activity +import android.content.Intent +import android.net.Uri +import android.os.Bundle + +abstract class VKBaseAuthActivity : Activity() { + /** + * Flag indicating that auth process was started before onResume (cleared in onPause) + * It isn't saved in onSaveInstanceState because of this flag is just session flag. + */ + private var authWasStarted = false + + /** + * Flag indicating that this or previously destroyed activity is waiting for auth. + * It's saved in onSaveInstanceState because of system could kill our app after opening + * the browser and we have to know what state was the last in out app. + */ + private var isWaitingForAuthResult = false + + override fun onCreate(savedInstanceState: Bundle?) { + overridePendingTransition(0, 0) + super.onCreate(savedInstanceState) + + isWaitingForAuthResult = savedInstanceState?.getBoolean(KEY_WAITING_FOR_AUTH_RESULT, false) ?: false + + processIntent(intent, false) + } + + override fun onNewIntent(intent: Intent?) { + super.onNewIntent(intent) + processIntent(intent, true) + } + + override fun onResume() { + super.onResume() + if (isWaitingForAuthResult && !authWasStarted) { + // We're waiting for auth result but user returns to activity. Okay. Just finish it. + setResult(RESULT_CANCELED) + finish() + } + } + + private fun processIntent(intent: Intent?, allowRedirectHandle: Boolean) { + val data = intent?.data + if (!isWaitingForAuthResult && isIntentWithAuthRequest(intent) && data != null) { + if (handleStartAuth(data)) { + isWaitingForAuthResult = true + authWasStarted = true + } else { + finish() + } + } else if (allowRedirectHandle) { + val result = handleRedirectUri(data) + setResult(RESULT_OK, result) + finish() + isWaitingForAuthResult = false + } + } + + override fun onPause() { + super.onPause() + authWasStarted = false + } + + override fun onSaveInstanceState(outState: Bundle) { + super.onSaveInstanceState(outState) + outState.putBoolean(KEY_WAITING_FOR_AUTH_RESULT, isWaitingForAuthResult) + } + + override fun finish() { + super.finish() + overridePendingTransition(0, 0) + } + + /** + * Check this activity was started for auth but not with redirect + * + * @param intent intent to check + * + * @return true if this intent for auth request, false otherwise + */ + protected abstract fun isIntentWithAuthRequest(intent: Intent?): Boolean + + /** + * Called on auth using external service (or via browser) was started + * + * @param oauthUri oauth uri this activity was started with (taken from [Intent.getData]) + */ + protected abstract fun handleStartAuth(oauthUri: Uri): Boolean + + /** + * Called on redirect from browser/another app on oauth finished. + * + * @param redirectUri uri redirect occurred with + * + * @return intent for [Activity.setResult] + */ + protected abstract fun handleRedirectUri(redirectUri: Uri?): Intent + + + companion object { + private const val KEY_WAITING_FOR_AUTH_RESULT = "VK_waitingForAuthResult" + } +} \ No newline at end of file diff --git a/vk-sdk-core/src/main/java/com/vk/api/sdk/utils/VKUtils.kt b/vk-sdk-core/src/main/java/com/vk/api/sdk/utils/VKUtils.kt index b3f30aba4f..e51410e079 100644 --- a/vk-sdk-core/src/main/java/com/vk/api/sdk/utils/VKUtils.kt +++ b/vk-sdk-core/src/main/java/com/vk/api/sdk/utils/VKUtils.kt @@ -31,6 +31,7 @@ import android.content.Context import android.content.Intent import android.content.pm.PackageManager import android.content.res.Resources +import android.net.Uri import android.os.Build import android.util.DisplayMetrics import android.webkit.CookieManager @@ -50,9 +51,16 @@ object VKUtils { } } + /** + * @param allowedPackage the only package that allowed for that action + */ @JvmStatic - fun isIntentAvailable(context: Context, action: String) - = context.packageManager?.queryIntentActivities(Intent(action), PackageManager.MATCH_DEFAULT_ONLY)?.any() ?: false + fun isIntentAvailable(context: Context, action: String, data: Uri?, allowedPackage: String): Boolean { + val resolveInfos = context.packageManager + ?.queryIntentActivities(Intent(action, data), PackageManager.MATCH_DEFAULT_ONLY) + ?: return false + return resolveInfos.any { it.activityInfo.packageName == allowedPackage } + } @JvmStatic fun explodeQueryString(queryString: String?): MutableMap? {