How to use the vkbottle.types.responses function in vkbottle

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 / polls.py View on Github external
""" polls.addVote
        From Vk Docs: Adds the current user's vote to the selected answer in the poll.
        Access from user token(s)
        :param owner_id: ID of the user or community that owns the poll. Use a negative value to designate a community ID.
        :param poll_id: Poll ID.
        :param answer_ids: 
        :param is_board: 
        """

        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(
            "polls.addVote", params, response_model=responses.polls.AddVoteModel
        )
github timoniq / vkbottle / vkbottle / types / methods / groups.py View on Github external
) -> responses.groups.AddLink:
        """ groups.addLink
        From Vk Docs: Allows to add a link to the community.
        Access from user token(s)
        :param group_id: Community ID.
        :param link: Link URL.
        :param text: Description text for the link.
        """

        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(
            "groups.addLink", params, response_model=responses.groups.AddLinkModel
        )
github timoniq / vkbottle / vkbottle / types / methods / notifications.py View on Github external
    async def __call__(self,) -> responses.notifications.MarkAsViewed:
        """ notifications.markAsViewed
        From Vk Docs: Resets the counter of new notifications about other users' feedback to the current user's wall posts.
        Access from user token(s)
        
        """

        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(
            "notifications.markAsViewed",
            params,
            response_model=responses.notifications.MarkAsViewedModel,
        )
github timoniq / vkbottle / vkbottle / types / methods / auth.py View on Github external
Access from user, open token(s)
        :param phone: Phone number.
        :param client_id: User ID.
        :param client_secret: 
        :param auth_by_phone: 
        """

        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(
            "auth.checkPhone",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )
github timoniq / vkbottle / vkbottle / types / methods / video.py View on Github external
From Vk Docs: Returns a list of video albums owned by a user or community.
        Access from user token(s)
        :param owner_id: ID of the user or community that owns the video album(s).
        :param offset: Offset needed to return a specific subset of video albums.
        :param count: Number of video albums to return.
        :param extended: '1' — to return additional information about album privacy settings for the current user
        :param need_system: 
        """

        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(
            "video.getAlbums", params, response_model=responses.video.GetAlbumsModel
        )
github timoniq / vkbottle / vkbottle / types / methods / stories.py View on Github external
) -> responses.stories.GetById:
        """ stories.getById
        From Vk Docs: Returns story by its ID.
        Access from user, group token(s)
        :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 fields: Additional fields to return
        """

        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(
            "stories.getById", params, response_model=responses.stories.GetByIdModel
        )
github timoniq / vkbottle / vkbottle / types / methods / pages.py View on Github external
async def __call__(
        self, text: str, group_id: int = None
    ) -> responses.pages.ParseWiki:
        """ pages.parseWiki
        From Vk Docs: Returns HTML representation of the wiki markup.
        Access from user token(s)
        :param text: Text of the wiki page.
        :param group_id: ID of the group in the context of which this markup is interpreted.
        """

        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(
            "pages.parseWiki", params, response_model=responses.pages.ParseWikiModel
        )
github timoniq / vkbottle / vkbottle / types / methods / newsfeed.py View on Github external
From Vk Docs: Hides an item from the newsfeed.
        Access from user token(s)
        :param type: Item type. Possible values: *'wall' – post on the wall,, *'tag' – tag on a photo,, *'profilephoto' – profile photo,, *'video' – video,, *'audio' – audio.
        :param owner_id: Item owner's identifier (user or community), "Note that community id must be negative. 'owner_id=1' – user , 'owner_id=-1' – community "
        :param item_id: Item identifier
        """

        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(
            "newsfeed.ignoreItem",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )