Skip to main content

用于与 TeamSupport API 交互的 Python 库

项目描述

Python TeamSupport 客户端
==========================


|构建状态| |最新版本|

用于与 TeamSupport XML API 交互的 Python 库,使用 `demands <https://github.com/yola/demands>`__。

免费软件:麻省理工学院许可证

功能
--------

- 客户端方法解析响应内容以返回 LXML 元素
对象
- 将 Python 字典转换为 XML 以进行 POST 和 PUT 调用
- 票证和操作的简单模型。

用法
-----

::

from teamsupport import Ticket, init

init(<org_id>, <auth_key>[, default_ticket_type=<>, default_ticket_status=<>])

# 获取给定 ID/Number 的票证。
ticket = Ticket(<ticket_number_or_ticket_id>)

# 创建新票。
ticket = Ticket.create(
contact_email, contact_first_name, contact_last_name,
ticket_name, ticket_text)

# 获取工单描述。
descr = ticket.get_description()

# 更新票证描述。
ticket.set_decription('New description')

要运行集成测试,请在 `teamsupport/config.py` 中设置正确的值
并运行:`nosetests integration_tests`

.. |Build Status| 图片:: https://img.shields.io/travis/yola/teamsupport-python.svg?style=flat-square
:target: https://travis-ci.org/yola/teamsupport-python
.. |最新版本| 图片:: https://img.shields.io/pypi/v/teamsupport.svg?style=flat-square
:target: https://warehouse.python.org/project/teamsupport


运行测试
------ -------

在 teamsupport/config.py

::

nosetests


Changelog中设置正确的数据
=========

0.5.0 (2018-07-05)
----------- --------

- 切换到 JSON API。
- 创建工单时设置正确的工单状态- 添加调用 teamsupport.init() 0.4.1 ( 2018-02-08)
时修改默认工单类型和状态的功能-------------- ---- - 编写 XML 时将输入数据转换为 str。0.4.0 (2016-10-21) ----------------











- 切换到需求 == 4.0.0

0.3.0 (2015-12-01)
------------------

- 自动将日期时间字段转换为工单模型的日期时间类型。

0.2.2 (2015-11-27)
------------------

- 添加 Ticket.search() 和 Ticket.update() 方法。

0.2.1 (2015-11-27)
------------------

- 修复 README.rst 格式。

0.2.0 (2015-11-26)
------------------

- 在 Ticket 模型中添加 `create` 类方法;添加 `Contact` 模型;
- 删除用户模型。
- 将模型构造函数更改为不需要 `client` 参数。

0.1.3 (2015-09-13)
-------

修复 `update_ticket` 方法中的错误

0.1.2 (2015-09-12)
---- --------------

- 修复 PyPI 上传问题

0.1.1 (2015-09-12)的 Bump 版本
------

- 添加 `User` 模型和 `TeamSupportService.get_user` 方法。

0.1.0 (2015-09-10)
------------------

- PyPI 上的第一个版本。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

teamsupport-0.5.0.tar.gz (8.2 kB 查看哈希)

已上传 source