zendesk_sdk =========== .. py:module:: zendesk_sdk .. autoapi-nested-parse:: Interface to Zendesk API. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/zendesk_sdk/client/index /autoapi/zendesk_sdk/exceptions/index /autoapi/zendesk_sdk/models/index Exceptions ---------- .. autoapisummary:: zendesk_sdk.TicketClosedError Classes ------- .. autoapisummary:: zendesk_sdk.ZendeskServices zendesk_sdk.Attachment zendesk_sdk.Ticket zendesk_sdk.TicketComment Package Contents ---------------- .. py:class:: ZendeskServices(base_url: str, username: str, password: str, timeout: float) A class wrapping Zendesk interaction. .. py:attribute:: client .. py:method:: _make_request(method: str, path: str, params: dict[str, Any] | None = None, json: dict[str, Any] | None = None) -> httpx.Response Make a request to Zendesk. .. py:method:: search(type_: Literal['ticket', 'user', 'organization'] = 'ticket', statuses: list[Literal['new', 'open', 'pending', 'hold', 'solved', 'closed']] | None = None, tags: list[str] | None = None) -> list[zendesk_sdk.models.Ticket] Search. .. py:method:: get_ticket(ticket_id: int) -> zendesk_sdk.models.Ticket Find and load to base64. .. py:method:: create_ticket(subject: str, body: str, group_id: int, priority: Literal['urgent', 'high', 'normal', 'low'] = 'normal') -> zendesk_sdk.models.Ticket Find and load to base64. .. py:method:: update_ticket(ticket_id: int, status: Literal['new', 'open', 'pending', 'hold', 'solved', 'closed'] | None = None, comment: str | None = None, comment_is_public: bool = True) -> zendesk_sdk.models.Ticket Update a ticket. .. py:method:: add_tags_to_ticket(ticket_id: int, tags: list[str]) -> list[str] Add tags to a ticket. .. py:method:: get_ticket_comments(ticket_id: int) -> list[zendesk_sdk.models.TicketComment] Find and load to base64. .. py:exception:: TicketClosedError Bases: :py:obj:`Exception` Raised when a ticket is closed. .. py:class:: Attachment(/, **data: Any) Bases: :py:obj:`_BaseModel` Attachment model. .. py:attribute:: id :type: int .. py:attribute:: url :type: str .. py:attribute:: file_name :type: str .. py:attribute:: content_url :type: str .. py:class:: Ticket(/, **data: Any) Bases: :py:obj:`_BaseModel` Ticket model. .. py:attribute:: id :type: int .. py:attribute:: status :type: Literal['new', 'open', 'pending', 'hold', 'solved', 'closed'] .. py:attribute:: url :type: str .. py:attribute:: created_at :type: datetime.datetime :value: None .. py:attribute:: tags :type: list[str] .. py:class:: TicketComment(/, **data: Any) Bases: :py:obj:`_BaseModel` Ticket model. .. py:attribute:: id :type: int .. py:attribute:: public :type: bool .. py:attribute:: plain_body :type: str .. py:attribute:: attachments :type: list[Attachment]