微软Bing翻译API的使用
来源:互联网 发布:java 枚举接口 编辑:程序博客网 时间:2024/05/02 02:56
- 首先要有微软账号,比如hotmail什么的
- https://datamarket.azure.com/developer/applications
订阅翻译服务
https://datamarket.azure.com/dataset/bing/microsofttranslator
注册自己的注册应用程序
https://datamarket.azure.com/developer/applications
- POST
Content-Type: application/x-www-form-urlencoded
https://datamarket.accesscontrol.windows.net/v2/OAuth2-13
grant_type=client_credentials&client_id=active_gaowei&client_secret=secretsecretsecretsecret&scope=http://api.microsofttranslator.com
{
"token_type": "http://schemas.xmlsoap.org/ws/2009/11/swt-token-profile-1.0",
"access_token": "http%3a%2f%2fschemas.xmlsoap.org%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=active_gaowei&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&Audience=http%3a%2f%2fapi.microsofttranslator.com&ExpiresOn=1437443770&Issuer=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&HMACSHA256=j69yYSrpz%2bB%2fbLUUSaGAjrxvZxLijAJMGDDm1fRJuog%3d",
"expires_in": "600",
"scope": "http://api.microsofttranslator.com"
}
注意获得的token密匙是有有效时间的,为600秒即10分钟。 超过10分钟后密匙失效。
- GET
Authorization: Bearer http%3a%2f%2fschemas.xmlsoap.org%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=active_gaowei&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&Audience=http%3a%2f%2fapi.microsofttranslator.com&ExpiresOn=1437443770&Issuer=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&HMACSHA256=j69yYSrpz%2bB%2fbLUUSaGAjrxvZxLijAJMGDDm1fRJuog%3d
http://api.microsofttranslator.com/v2/Http.svc/Translate?text=monday&from=en&to=zh
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">星期一</string>
其他翻译API :
http://apistore.baidu.com/astore/classificationservicelist/38.html
0 0
- 微软Bing翻译API的使用
- c#:使用bing翻译API
- 让Python使用Bing翻译API V2
- 让Python使用Bing翻译API V2
- bing翻译使用-Unity
- 微软Bing的反攻
- bing 地图api使用
- Bing翻译实例(microsoft translator API)
- python调用bing翻译API V2
- bing翻译API调用(java版本)
- 微软翻译api接口
- Bing API 2的体验
- bing的搜索api简介
- 微软的bing(www.bing.com.cn)
- Java 实现在线翻译功能 调用微软Bing API
- 保存Google、Bing翻译的语音
- Google 翻译API的使用
- 微软使用的术语翻译表
- 网易笔试题:幸运的袋子
- iOS——NSArray
- 最短路~bellman-ford
- 关于发布代码注意事项
- Activity中UI框架基本概念
- 微软Bing翻译API的使用
- 使用adb shell dumpsys获取包名和分辨率
- 多态(Polymorphism)
- Redis持久化
- CentOS7安装firewalld
- HDU2437 2008 Asia Chengdu Regional Contest Online 记忆化搜索+剪枝
- HDU-1166(线段树-单点更新)
- 数据结构上机实验之二分查找
- TextView省略&相关处理