Download the PHP package leander/youdao-ai without Composer

On this page you can find all versions of the php package leander/youdao-ai. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package youdao-ai

php-sdk-youdaoai

有道AI第三方PHP-SDK,目前维护者只有一人,出于项目需要与兴趣维护她。如果你有bug反馈欢迎提供issues,如果你对项目维护迭代有想法,也欢迎@leander。

安装

你需要从release中选择稳定版本下载,并将sdk主文件require进项目源文件。

如果你使用CodeIgniter,你可以将sdk文件夹释放到application/libraries/目录,创建SDK入口文件YoudaoAi.php:

之后,你可以在CodeIgniter的模型控制器中,通过如下方式调用接口api:

配置

你应该创建/youdao-ai/src/conf.inc.php.example副本/youdao-ai/src/conf.inc.php:

配置项参照表如下:

名称 别名 默认值 版本支持 备注
应用参数
API_SERV api服务器 http://openapi.youdao.com/ ~1.0
APP_KEY 应用编号 ~1.0
SEC_KEY 应用密钥 ~1.0
HTTP参数
HTTP_TIMEOUT 超时时间 10 ~1.0 超过设定值(秒),超时失败
API_PATH 接口映射表 ~1.0 配置组,通常不需要修改

文档

请自行查阅官方文档,了解各接口作用:https://ai.youdao.com/docs/doc-trans-api.s#p01
我们对接口名进行了抽象映射,接口目录如下:

映射名 官方路径 别名 参数 描述 备注
trans api 自然语言翻译 ... ...
sti speechtransapi 语音翻译 ... ...
oti ocrtransapi ocr文档翻译 ... ...

其他说明


All versions of youdao-ai with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.3
guzzlehttp/guzzle Version ^6.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package leander/youdao-ai contains the following files

Loading the files please wait ....