sjkingo / python-freshdesk

An API for the Freshdesk helpdesk
BSD 2-Clause "Simplified" License
87 stars 67 forks source link

Error on get tickets #61

Closed rubenssoto closed 4 years ago

rubenssoto commented 4 years ago

Hi,

How are you?

Thank you for this great Lib. I got some errors on get_tickets, probably I'm using freshdesk Api V1.

ticket = a.tickets.get_ticket(205020 , "conversation", "requester", "company", "stats")

TypeError: get_ticket() takes 2 positional arguments but 6 were given

My version is 1.3.4.

Could you help me?

aharabedian commented 4 years ago

You will need to update the version of python-freshdesk to >= 1.3.5.

In version 1.3.4, the get_ticket method only takes the ticket ID and does not accept include parameters. In version 1.3.5, the get_ticket method takes extra arguments that are passed as include parameters.

However, if you are using API V1, you are out of luck. The get_ticket method in the V1 API does not take extra arguments even in version 1.3.5 of python-freshdesk.

If you do not need to pass any include parameters, you can try: ticket = a.tickets.get_ticket(205020)

This should work on version 1.3.4 of python-freshdesk and with the V1 or V2 API.

sjkingo commented 4 years ago

Thanks @aharabedian!

@rubenssoto let us know if you have any other issues.