当前位置: 首页>>代码示例>>Python>>正文


Python MyGengo.getServiceLanguages方法代码示例

本文整理汇总了Python中mygengo.MyGengo.getServiceLanguages方法的典型用法代码示例。如果您正苦于以下问题:Python MyGengo.getServiceLanguages方法的具体用法?Python MyGengo.getServiceLanguages怎么用?Python MyGengo.getServiceLanguages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mygengo.MyGengo的用法示例。


在下文中一共展示了MyGengo.getServiceLanguages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: MyGengo

# 需要导入模块: from mygengo import MyGengo [as 别名]
# 或者: from mygengo.MyGengo import getServiceLanguages [as 别名]
# -*- coding: utf-8 -*-
#!/usr/bin/python

from mygengo import MyGengo

# Get an instance of MyGengo to work with...
gengo = MyGengo(
    public_key = 'your_public_key',
    private_key = 'your_private_key',
    sandbox = True, # possibly false, depending on your dev needs
)

# Get a list of every supported language, with their respective language codes.
print gengo.getServiceLanguages()
开发者ID:crschmidt,项目名称:mygengo-python,代码行数:16,代码来源:getServiceLanguages.py

示例2: test_getServiceLanguages

# 需要导入模块: from mygengo import MyGengo [as 别名]
# 或者: from mygengo.MyGengo import getServiceLanguages [as 别名]
	def test_getServiceLanguages(self):
		myGengo = MyGengo(public_key = public_key, private_key = private_key, sandbox = SANDBOX)
		resp = myGengo.getServiceLanguages()
		self.assertEqual(resp['opstat'], 'ok')
开发者ID:fvbock,项目名称:mygengo-python,代码行数:6,代码来源:tests.py

示例3: MyGengo

# 需要导入模块: from mygengo import MyGengo [as 别名]
# 或者: from mygengo.MyGengo import getServiceLanguages [as 别名]
# -*- coding: utf-8 -*-
#!/usr/bin/python

from mygengo import MyGengo
from pprint import pprint

mygengo = MyGengo(
    public_key = 'your public key',
    private_key = 'your private key',
    sandbox = False
)

# Pretty-print a list of every supported language
pprint(mygengo.getServiceLanguages())
开发者ID:fvbock,项目名称:mygengo-python,代码行数:16,代码来源:getServiceLanguages.py


注:本文中的mygengo.MyGengo.getServiceLanguages方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。