Create ticket, upload images and text for each customer using Python, Golang or other scripting language?

Create ticket, upload images and text for each customer using Python, Golang or other scripting language?

Hi Everyone!

Can you please tell me where I can obtain some documentation or an example of how I can create ticket, upload images and text for each assigned customer within ZohoDesk?  Thank you for your time. 

Below is a small snippet of doing this process with ZenDesk in Python. 

  • zenpy_client = Zenpy(**creds1)

  • yesterday = datetime.datetime.now() - datetime.timedelta(days=62)
  • yesterday = yesterday.replace(hour=0, minute=0, second=0, microsecond=0) # Returns a copy
  • today = datetime.datetime.now()
  • today = today.replace(hour=23, minute=59, second=0, microsecond=0) # Returns a copy
  • for ticket in zenpy_client.search(
  •     created_between=[yesterday, today],
  •     group="Data Analytics",
  •     type="ticket",
  •     status=['new', 'open'],
  •     minus='negated'
  • ):
  •     print(ticket)
  •     print(ticket.custom_fields[5])

  •   # Upload to Zenpy Ticket
  •             tname = str5 + "out.png"
  •             upload_comb = zenpy_client.attachments.upload(
  •                 "C:/FIleName/" + str5 + "out.png"
  •             )
  •             ticket = zenpy_client.tickets(id=ticket.id)
  •             ticket.comment = Comment(
  •                 body="Uploaded Charts",
  •                 public=False,
  •                 uploads=[upload_comb.token],
  •             )
  •             zenpy_client.tickets.update(ticket)
  •             break