How to use the vkbottle.types.responses.ok_response.OkResponseModel 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 / stories.py View on Github external
""" stories.hideReply
        From Vk Docs: Hides the reply to the current user's story.
        Access from user, group token(s)
        :param owner_id: ID of the user whose replies should be hidden.
        :param story_id: Story ID.
        """

        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.hideReply",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )
github timoniq / vkbottle / vkbottle / types / methods / pages.py View on Github external
async def __call__(self, url: str) -> responses.ok_response.OkResponse:
        """ pages.clearCache
        From Vk Docs: Allows to clear the cache of particular 'external' pages which may be attached to VK posts.
        Access from user, service token(s)
        :param url: Address of the page where you need to refesh the cached version
        """

        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.clearCache",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )
github timoniq / vkbottle / vkbottle / types / methods / messages.py View on Github external
From Vk Docs: Marks and unmarks conversations as unanswered.
        Access from user, group token(s)
        :param peer_id: ID of conversation to mark as important.
        :param answered: '1' — to mark as answered, '0' — to remove the mark
        :param group_id: Group ID (for group messages with group access token)
        """

        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(
            "messages.markAsAnsweredConversation",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )
github timoniq / vkbottle / vkbottle / types / methods / fave.py View on Github external
async def __call__(self,) -> responses.ok_response.OkResponse:
        """ fave.markSeen
        From Vk Docs: 
        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(
            "fave.markSeen",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )
github timoniq / vkbottle / vkbottle / types / methods / apps.py View on Github external
async def __call__(self,) -> responses.ok_response.OkResponse:
        """ apps.deleteAppRequests
        From Vk Docs: Deletes all request notifications from the current app.
        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(
            "apps.deleteAppRequests",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )
github timoniq / vkbottle / vkbottle / types / methods / secure.py View on Github external
Access from service token(s)
        :param counters: 
        :param user_id: 
        :param counter: counter value.
        :param increment: 
        """

        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(
            "secure.setCounter",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )
github timoniq / vkbottle / vkbottle / types / methods / market.py View on Github external
From Vk Docs: Sends a complaint to the item's comment.
        Access from user token(s)
        :param owner_id: ID of an item owner community.
        :param comment_id: Comment ID.
        :param reason: Complaint reason. Possible values: *'0' — spam,, *'1' — child porn,, *'2' — extremism,, *'3' — violence,, *'4' — drugs propaganda,, *'5' — adult materials,, *'6' — insult.
        """

        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(
            "market.reportComment",
            params,
            response_model=responses.ok_response.OkResponseModel,
        )
github timoniq / vkbottle / vkbottle / types / methods / storage.py View on Github external
""" storage.set
        From Vk Docs: Saves a value of variable with the name set by 'key' parameter.
        Access from user token(s)
        :param key: 
        :param value: 
        :param user_id: 
        :param global: 
        """

        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(
            "storage.set", params, response_model=responses.ok_response.OkResponseModel
        )
github timoniq / vkbottle / vkbottle / types / methods / status.py View on Github external
) -> responses.ok_response.OkResponse:
        """ status.set
        From Vk Docs: Sets a new status for the current user.
        Access from user token(s)
        :param text: Text of the new status.
        :param group_id: Identifier of a community to set a status in. If left blank the status is set to current user.
        :param audio: needed to make status with audio
        """

        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(
            "status.set", params, response_model=responses.ok_response.OkResponseModel
        )
github timoniq / vkbottle / vkbottle / types / methods / board.py View on Github external
""" board.fixTopic
        From Vk Docs: Pins a topic (fixes its place) to the top of a community's discussion board.
        Access from user token(s)
        :param group_id: ID of the community that owns the discussion board.
        :param topic_id: Topic ID.
        """

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