eitaaphplib
v1.0.0
Eitaaphp是一个轻巧的库,用于与PHP中的Eitaayar API合作
$ composer require arjomand/eitaa
$ git clone https://github.com/mohammadali-arjomand/eitaaphplib.git
注意
如果您使用git将库添加到项目中,则还应在项目中添加卷发
现在您应该包括库文件:
include " eitaa.php " ;用于使用此库:
$ token = " bot16344:6d3e4430-****-****-****-************ " ;
$ channel_id = 23333622 ; $ eitaa = new EitaaPHP ( $ token , $ channel_id ); // send message
$ eitaa -> sendMessgae ( " YOUR_TEXT_TO_SEND " );
// send file
$ eitaa -> sendFile ( " YOUR_FILE_PATH_TO_SEND " );~/docs/other-argument.md )。 // send message
$ eitaa -> sendMessgae ( " YOUR_TEXT_TO_SEND " , [ OTHER_PARAMETER => " VALUE " ]);
// send file
$ eitaa -> sendFile ( " YOUR_FILE_PATH_TO_SEND " , [ OTHER_PARAMETER => " VALUE " ]);例子
您可以在
~/examples中看到示例代码