Download the PHP package hujiayucc/chatnio without Composer

On this page you can find all versions of the php package hujiayucc/chatnio. 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 chatnio

ChatNio SDK 使用文档

一、简介

为 ChatNio 提供的PHP平台SDK

二、快速开始

创建一个composer.json文件,然后将以下代码添加到composer.json中:

然后在命令行中执行以下命令:

在开始使用 SDK 之前,你需要首先生成一个ChatNio实例,这需要提供一个由ChatNio服务提供的密钥:

三、余额

相关API

通过调用以下方法购买余额:

四、对话

相关API

SDK 提供了一个便捷的对话查询方法:

这将返回一个TaskBean对象的列表,你可以通过这些TaskBean对象获取例如任务的id、userId、name、model、enableWeb等信息,并且获取任务的Message消息列表。

五、订阅和礼包

相关API

你可以使用SDK提供的方法查询订阅状态,购买订阅和续费等操作

六、聊天

相关API 模型API

使用 SDK,你可以选择同步方式或异步方式进行消息发送。其中,Token对象用于指定用户或密钥和对话id,也可以设置为匿名或新对话。

1. 同步方式

2. 异步方式

在异步方式下,你可以重写 onMessage方法来接收消息,也可以重写 onError方法来处理错误。

七、调用实例


All versions of chatnio with dependencies

PHP Build Version
Package Version
Requires textalk/websocket Version ^1.6.3
ext-json Version *
ext-curl Version *
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 hujiayucc/chatnio contains the following files

Loading the files please wait ...