# This file was autogenerated from vk-api json schema

from typing import List, Union, Optional, overload
from easy_vk.types import objects
from easy_vk.types import responses
from easy_vk.api_category import BaseCategory
try:
    from typing import Literal
except Exception:
    from typing_extensions import Literal


class Widgets(BaseCategory):
    def __init__(self, session, access_token: str, v: str, last_call_timer, delay: float, auto_retry: bool, max_retries: int, timeout: float):
        super().__init__(session, access_token, v, last_call_timer, delay, auto_retry, max_retries, timeout)

    def get_comments(self, widget_api_id: Optional[int] = None, url: Optional[str] = None, page_id: Optional[str] = None, order: Optional[str] = None, fields: Optional[List[Union[objects.UsersFields, str]]] = None, offset: Optional[int] = None, count: Optional[int] = None) -> responses.WidgetsGetComments:
        """
        Gets a list of comments for the page added through the [vk.com/dev/Comments|Comments widget].
        
        :param widget_api_id:
        :param url:
        :param page_id:
        :param order:
        :param fields:
        :param offset:
        :param count:
        """
    
        method_parameters = {k: v for k, v in locals().items() if k not in {'self', 'raw_response'}}
        param_aliases = []
        method_name = 'widgets.getComments'
        response_type = responses.WidgetsGetComments
        return self._call(method_name, method_parameters, param_aliases, response_type)

    def get_pages(self, widget_api_id: Optional[int] = None, order: Optional[str] = None, period: Optional[str] = None, offset: Optional[int] = None, count: Optional[int] = None) -> responses.WidgetsGetPages:
        """
        Gets a list of application/site pages where the [vk.com/dev/Comments|Comments widget] or [vk.com/dev/Like|Like widget] is installed.
        
        :param widget_api_id:
        :param order:
        :param period:
        :param offset:
        :param count:
        """
    
        method_parameters = {k: v for k, v in locals().items() if k not in {'self', 'raw_response'}}
        param_aliases = []
        method_name = 'widgets.getPages'
        response_type = responses.WidgetsGetPages
        return self._call(method_name, method_parameters, param_aliases, response_type)
