Skip to content

joeirimpan/pyosticket

Repository files navigation

PyOSTicket

Python client for os ticket

from pyosticket import OSTicketAPI, TicketModel

osticket = OSTicketAPI(url="URL", api_key="API-KEY")

# XXX Custom endpoints
osticket.ticket.all("email@email.com")
osticket.ticket.get("XXXXXXXXXXX", "email@email.com")

# create ticket
ticket = TicketModel(**{
    "name": "John Doe",
    "email": "johndoe@lorem.com",
    "subject": "Lorem Ipsum",
    "topicId": "1",
    "message": "data:text/html,Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam lobortis sagittis turpis vel bibendum. Nunc eget tincidunt leo. Suspendisse a nibh vulputate, ultrices leo mollis, maximus nisl.",
    "attachments": [{
        "filename.png": "data:image/png;base64,BASE64_ENCODED_IMAGE_HERE"
    }]
})
osticket.ticket.create(ticket)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published