用于与 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 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 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 198924d1299100bab12128e238d89c15b80909041d2dddffeeebebe39e7bd365 |
|
MD5 | 355a5ff76d9dab498936f8dd4c5dbcc8 |
|
布莱克2-256 | 127c64c249c2efacd400f4fbcb15db19e01cabc03d32bb4a149589651b836ced |