可爱猫 API 接口 Demo,PHP 版

陈德本 ba7c83c535 可爱猫 API 接口 Demo 6 年 前
.gitignore a443423a39 Initial commit 6 年 前
LICENSE a443423a39 Initial commit 6 年 前
LovelyCat.php ba7c83c535 可爱猫 API 接口 Demo 6 年 前
README.md ba7c83c535 可爱猫 API 接口 Demo 6 年 前
api.php ba7c83c535 可爱猫 API 接口 Demo 6 年 前

README.md

LovecatApi-PHP

###可爱猫 API 接口示例--PHP 版本

示例代码可查看 api.php,需要设置可爱猫API接口地址,默认为http://127.0.0.1:8073/send

如果外网使用,可参考:

 $url="http://ip:8073/send";
 $config=["url"=>$url];
 $lovelyCat=new lovelyCat($config);
 

单例模式使用方式:

1、使用默认配置(http://127.0.0.1:8073/send)

 $msg="Hello World";
 lovelyCat::getInstance()->sendTextMsg($msg);

2、使用外网API接口配置:

 $url="http://ip:8073/send";
 $msg="Hello World";
 lovelyCat::getInstance($url)->sendTextMsg($msg);