python [freshdesk - python]客户服务#customer

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python [freshdesk - python]客户服务#customer相关的知识,希望对你有一定的参考价值。

"""
https://github.com/sjkingo/python-freshdesk
"""
from freshdesk.api import API
a = API('company.freshdesk.com', 'q8dnkjaS554Aol21dmnas9d92')

a.tickets.list_open_tickets()
a.tickets.list_deleted_tickets()
a.tickets.list_open_tickets()[0].created_at

##---------------------------------------------------------------------------------------------------
## tickets
##
# get ticket
ticket = a.tickets.get_ticket(4)
repr(ticket)
ticket._keys

# create a ticket
ticket = a.tickets.create_ticket('This is a sample ticket',
                                 email='example@example.com',
                                 description='This is the description of the ticket',
                                 tags=['example'])

# update a ticket
ticket = a.tickets.update_ticket(4,
                                 subject='This is an urgent ticket',
                                 priority=4)

# delete a ticket
a.tickets.delete_ticket(4)

##---------------------------------------------------------------------------------------------------
## comments
##
a.comments.list_comments(4)  # list comments in ticket

# create a note
comment = a.comments.create_note(4,
                                     'This is a public note',
                                     private=False)

# create a reply
a.comments.create_reply(4, 'This is the body of a reply')

##---------------------------------------------------------------------------------------------------
## contacts
##
repr(a.contacts.get_contact('1234'))

##---------------------------------------------------------------------------------------------------
##
##

以上是关于python [freshdesk - python]客户服务#customer的主要内容,如果未能解决你的问题,请参考以下文章

php [freshdesk php core] freshdesk php api #customer

使用 Swift 2.2 中的 Freshdesk API

javascript [freshdesk节点] #customer

html [freshdesk jquery] #customer

从 SQL Server 触发器调用 Freshdesk API

php [freshdesk php]客户服务#customer