arjomand/eitaa

A lightweight library for working with Eitaayar api

1.0.0 2023-05-25 05:30 UTC

This package is auto-updated.

Last update: 2024-04-29 22:04:57 UTC


README

EitaaPHP is a lightweight library for working with Eitaayar api in php

How to add it in my project?

1. with composer

$ composer require arjomand/eitaa

2. with git

$ git clone https://github.com/mohammadali-arjomand/eitaaphplib.git

NOTICE

if you use git for add library to your project, you should also add cURL in your project

now you should include library file:

include "eitaa.php";

How to use it?

for use this library:

  1. first find your eitaayar token and channel id from here.
$token = "bot16344:6d3e4430-****-****-****-************";
$channel_id = 23333622;
  1. now, create a object from Eitaa class.
$eitaa = new EitaaPHP($token, $channel_id);
  1. use sendMessage or sendFile methods to sending.
// send message
$eitaa->sendMessgae("YOUR_TEXT_TO_SEND");
// send file
$eitaa->sendFile("YOUR_FILE_PATH_TO_SEND");
  1. you can use other parameters in methods (See other parameters document: ~/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

you can see examples code in ~/examples

Donate

68747470733a2f2f636f66666565626564652e69722f44617368626f61726454656d706c61746556322f6170702d6173736574732f696d616765732f62616e6e65722f64656661756c742d79656c6c6f772e737667