How to use vkbottle - 10 common examples

To help you get started, we’ve selected a few vkbottle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github timoniq / vkbottle / vkbottle / types / methods / friends.py View on Github external
params = {
            k if not k.endswith("_") else k[:-1]: v
            for k, v in {**locals(), **self.kwargs}.items()
            if k not in ["self"] and v is not None
        }
        return await self.request(
            "friends.deleteList",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )


class FriendsEdit(BaseMethod):
    kwargs: dict = {}
    access_token_type: APIAccessibility = [APIAccessibility.USER]

    async def __call__(
        self, user_id: int, list_ids: typing.List = None
    ) -> responses.ok_response.OkResponse:
        """ friends.edit
        From Vk Docs: Edits the friend lists of the selected user.
        Access from user token(s)
        :param user_id: ID of the user whose friend list is to be edited.
        :param list_ids: IDs of the friend lists to which to add the user.
        """

        params = {
            k if not k.endswith("_") else k[:-1]: v
            for k, v in {**locals(), **self.kwargs}.items()
            if k not in ["self"] and v is not None
        }
github timoniq / vkbottle / vkbottle / types / events / event.py View on Github external
object: EventsObjects.BoardPostNew = None


class BoardPostEdit(BoardPostNew):
    ...


class BoardPostRestore(BoardPostNew):
    ...


class BoardPostDelete(BaseEvent):
    object: EventsObjects.BoardPostDelete = None


class MarketCommentNew(BaseEvent):
    object: EventsObjects.MarketCommentNew = None


class MarketCommentEdit(MarketCommentNew):
    ...


class MarketCommentRestore(MarketCommentNew):
    ...


class MarketCommentDelete(BaseEvent):
    object: EventsObjects.MarketCommentDelete = None


class GroupLeave(BaseEvent):
github timoniq / vkbottle / vkbottle / types / events / event.py View on Github external
...


class WallReplyNew(BaseEvent):
    object: EventsObjects.WallReplyNew = None


class WallReplyEdit(WallReplyNew):
    ...


class WallReplyRestore(WallReplyNew):
    ...


class WallReplyDelete(BaseEvent):
    object: EventsObjects.WallReplyDelete = None


class BoardPostNew(BaseEvent):
    object: EventsObjects.BoardPostNew = None


class BoardPostEdit(BoardPostNew):
    ...


class BoardPostRestore(BoardPostNew):
    ...


class BoardPostDelete(BaseEvent):
github timoniq / vkbottle / vkbottle / types / events / event.py View on Github external
object: EventsObjects.MarketCommentDelete = None


class GroupLeave(BaseEvent):
    object: EventsObjects.GroupLeave = None


class GroupJoin(BaseEvent):
    object: EventsObjects.GroupJoin = None


class UserBlock(BaseEvent):
    object: EventsObjects.UserBlock = None


class UserUnblock(BaseEvent):
    object: EventsObjects.UserUnblock = None


class PollVoteNew(BaseEvent):
    object: EventsObjects.PollVoteNew = None


class GroupOfficersEdit(BaseEvent):
    object: EventsObjects.GroupOfficersEdit = None


class GroupChangeSettings(BaseEvent):
    object: EventsObjects.GroupChangeSettings = None


class GroupChangePhoto(BaseEvent):
github timoniq / vkbottle / vkbottle / types / events / event.py View on Github external
object: EventsObjects.UserUnblock = None


class PollVoteNew(BaseEvent):
    object: EventsObjects.PollVoteNew = None


class GroupOfficersEdit(BaseEvent):
    object: EventsObjects.GroupOfficersEdit = None


class GroupChangeSettings(BaseEvent):
    object: EventsObjects.GroupChangeSettings = None


class GroupChangePhoto(BaseEvent):
    object: EventsObjects.GroupChangePhoto = None
github timoniq / vkbottle / vkbottle / types / events / event.py View on Github external
object: objects.video.Video = None


class VideoCommentNew(BaseEvent):
    object: EventsObjects.VideoComment = None


class VideoCommentEdit(VideoCommentNew):
    ...


class VideoCommentRestore(VideoCommentNew):
    ...


class VideoCommentDelete(BaseEvent):
    object: EventsObjects.VideoCommentDelete = None


class WallPostNew(BaseEvent):
    object: Wallpost = None


class WallRepost(WallPostNew):
    ...


class WallReplyNew(BaseEvent):
    object: EventsObjects.WallReplyNew = None


class WallReplyEdit(WallReplyNew):
github timoniq / vkbottle / vkbottle / types / events / event.py View on Github external
object: EventsObjects.MarketCommentNew = None


class MarketCommentEdit(MarketCommentNew):
    ...


class MarketCommentRestore(MarketCommentNew):
    ...


class MarketCommentDelete(BaseEvent):
    object: EventsObjects.MarketCommentDelete = None


class GroupLeave(BaseEvent):
    object: EventsObjects.GroupLeave = None


class GroupJoin(BaseEvent):
    object: EventsObjects.GroupJoin = None


class UserBlock(BaseEvent):
    object: EventsObjects.UserBlock = None


class UserUnblock(BaseEvent):
    object: EventsObjects.UserUnblock = None


class PollVoteNew(BaseEvent):
github timoniq / vkbottle / vkbottle / types / events / event.py View on Github external
object: EventsObjects.WallReplyDelete = None


class BoardPostNew(BaseEvent):
    object: EventsObjects.BoardPostNew = None


class BoardPostEdit(BoardPostNew):
    ...


class BoardPostRestore(BoardPostNew):
    ...


class BoardPostDelete(BaseEvent):
    object: EventsObjects.BoardPostDelete = None


class MarketCommentNew(BaseEvent):
    object: EventsObjects.MarketCommentNew = None


class MarketCommentEdit(MarketCommentNew):
    ...


class MarketCommentRestore(MarketCommentNew):
    ...


class MarketCommentDelete(BaseEvent):
github timoniq / vkbottle / vkbottle / types / events / event.py View on Github external
...


class MarketCommentRestore(MarketCommentNew):
    ...


class MarketCommentDelete(BaseEvent):
    object: EventsObjects.MarketCommentDelete = None


class GroupLeave(BaseEvent):
    object: EventsObjects.GroupLeave = None


class GroupJoin(BaseEvent):
    object: EventsObjects.GroupJoin = None


class UserBlock(BaseEvent):
    object: EventsObjects.UserBlock = None


class UserUnblock(BaseEvent):
    object: EventsObjects.UserUnblock = None


class PollVoteNew(BaseEvent):
    object: EventsObjects.PollVoteNew = None


class GroupOfficersEdit(BaseEvent):
github timoniq / vkbottle / vkbottle / types / events / event.py View on Github external
object: objects.photos.Photo = None


class PhotoCommentNew(BaseEvent):
    object: EventsObjects.PhotoComment = None


class PhotoCommentEdit(PhotoCommentNew):
    ...


class PhotoCommentRestore(PhotoCommentNew):
    ...


class PhotoCommentDelete(BaseEvent):
    object: EventsObjects.PhotoCommentDelete = None


class AudioNew(BaseEvent):
    object: objects.audio.Audio = None


class VideoNew(BaseEvent):
    object: objects.video.Video = None


class VideoCommentNew(BaseEvent):
    object: EventsObjects.VideoComment = None


class VideoCommentEdit(VideoCommentNew):