幽灵客户端
yolap的Python项目详细描述
用法
# settings filefromyolapy.configurationimportconfigureconfigure(auth=('username','password'),url='https://wl.qa.yola.net/',)# application codefromyolapy.modelsimportUserasYolaUseryola_user=YolaUser(email='test@example.com',name='Jane',surname='Doe',partner_id='WL_YOLA',preferences={'name':'value'})yola_user.save()
有关 文档。
开发
运行测试:
$ nosetests
默认情况下不运行集成测试。要运行它们,必须设置 集成环境和编辑测试设置:
$ cp tests/test_integration/test_settings.py.sample \ tests/test_integration/test_settings.py
注意:尽量不要对yola qa环境运行测试。它得到 用于手动测试,我们不想让它与创建的用户混淆 在自动测试运行中。
然后可以显式运行集成测试:
$ nosetests tests/test_integration
若要在进行更改时自动测试和精简代码,请执行以下操作:
$ cp tube.py.sample tube.py $ stir
打开带有用测试设置初始化的yola客户机的repl
$ python -i shell.py
文档
公共接口的更改应记录在案。请参见docs目录。
推送到位于http://yolapy.readthedocs.org/en/latest/的master分支构建 自动。
您可以使用以下命令在本地测试文档更改:
$ cd docs $ make html $ open _build/html/index.html
0.6.1
- 添加yola.get_user_wsites方法。
0.6.0
- 删除六个依赖项
- 删除用户。保存方法
- 添加用户。创建类方法
- 添加yola.get_sso_url方法
- 修复由于调用签名不正确而导致的错误 约拉服务
- 更新user.\uu init\uu以接受**kwargs而不是命名参数。这个 使其与其他YoLAPY模型一致,并且更灵活的情况下 更改服务返回的数据。
0.5.0
- 删除yola.subscribe_campaign()和yola.cancel_campaign_subscription 方法,它们不允许在外部使用。
- 添加用于创建和列出的siteImport模型和api
- yola.get_sso_create_site_url和yola.get_sso_open_site_url 现在接受可选的locale参数,这些参数定义 应为 生成返回的URL
0.4.2
- 使用ssl支持删除方法的标志 user.get_sso_create_site_url()和site.change_site_domain()。
- 添加yola.create_cname_zone()方法。
0.4.1
- 为方法添加的支持 user.get_sso_create_site_url()和site.change_site_domain()。
0.4.0
- 更新订阅模型以期望来自服务响应的实际数据。
0.3.0
- 放弃对Python3.2的支持
- yola.get_sso_open_site_url现在接受一个可选的site_id指定 要为其生成URL的网站
- 使用要求>;=4.0.0
0.2.4(2016-06-17)
- 修复setup.py和requirements.txt中的需求版本不匹配问题
0.2.3(2016-06-17)
- 在site.list中处理分页
- 添加返回填充的用户对象的User.get类方法
0.2.2(2016-04-06)
- 添加Site.is_published
0.2.1(2016-03-31)
- 添加Site.list
0.2.0(2016-03-29)
- Yola.create_subscription现在返回创建的订阅。
- 中断更改:删除Yola.suspend_user和Yola.resume_user。
- 添加Site模型。
0.1.7(2015-12-02)
- 更新订阅模型以包含从api返回的所有属性。
0.1.6(2015-12-01)
- <里>更新安装要求(需求)
- 支持Python3
0.1.5(2015-11-23)
- 从change_subscription_type和^{tt9}返回值$ 方法。
- 修复了失败的集成测试。
0.1.4(2015-11-19)
- 添加订阅模型
0.1.3(2015-10-19)
- 添加合作伙伴模型
0.1.2(2015-10-15)
- 添加配置模块
- 添加用户模型
- 添加sphinx文档-http://yolapy.readthedocs.org/
0.1.1(2015-09-11)
- 更新安装要求
0.1.0(2015-09-02)
- 初始版本,带有yola api的Yolawrapper