本文整理汇总了Python中mygengo.MyGengo.getServiceLanguagePairs方法的典型用法代码示例。如果您正苦于以下问题:Python MyGengo.getServiceLanguagePairs方法的具体用法?Python MyGengo.getServiceLanguagePairs怎么用?Python MyGengo.getServiceLanguagePairs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mygengo.MyGengo
的用法示例。
在下文中一共展示了MyGengo.getServiceLanguagePairs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MyGengo
# 需要导入模块: from mygengo import MyGengo [as 别名]
# 或者: from mygengo.MyGengo import getServiceLanguagePairs [as 别名]
# -*- coding: utf-8 -*-
#!/usr/bin/python
from mygengo import MyGengo
# Get an instance of MyGengo to work with...
gengo = MyGengo(
public_key = '[email protected]#OOsAeR4z49IX|j}#dwyliMp2RIq1vM9OIKq-K#{mg~sVBUX^91',
private_key = '~Q9hI|sV(I^iX7|8WQ=l5=CvUmEWx3[=c5ms09|$JIuT-$aiTIYkS4~1F7^C9dw3',
sandbox = False, # possibly false, depending on your dev needs
debug = True
)
# Useful for figuring out what language paths are supported - e.g, if
# we use 'en' below, we'll see what languages we can translate TO from 'en'.
print gengo.getServiceLanguagePairs(lc_src = 'en')
示例2: test_getServiceLanguagePairs
# 需要导入模块: from mygengo import MyGengo [as 别名]
# 或者: from mygengo.MyGengo import getServiceLanguagePairs [as 别名]
def test_getServiceLanguagePairs(self):
myGengo = MyGengo(public_key = public_key, private_key = private_key, sandbox = SANDBOX)
resp = myGengo.getServiceLanguagePairs()
self.assertEqual(resp['opstat'], 'ok')