PHP code example of matucana / weather-bot
1. Go to this page and download the library: Download matucana/weather-bot library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
matucana / weather-bot example snippets
use Matucana\WeatherBot\Handlers\Handler;
class MainHandler implements Handler
{
public function handle(string $message)
{
// TODO: Implement handle() method.
}
}
$mainHandler = new MainHandler();
$app->addHandler(Handler $mainHandler);
$app->run();
$mainHandler = new MainHandler();
$vkHandler = new VkHandler($_ENV['VK_API_KEY'], $_ENV['VK_PEER_ID']);
$app->addHandlers([$mainHandler, $vkHandler]);
$app->run();