No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
json
src/GP/ProtezioneCivileBot
LICENSE
README.md
composer.json
getUpdates.php

README.md

Protezione Civile Telegram BOT

NOT FOR PRODUCTION

Installation

Clone the github repo in your machine

$ git clone https://github.com/gpirrotta/protezione-civile-bot.git
$ cd protezione-civile-bot

And run these two commands to install it:

$ wget http://getcomposer.org/composer.phar
$ php composer.phar install

Now you can add the autoloader, and you will have access to the library:

<?php

require 'vendor/autoload.php';

You're done.

Usage

Rename the protezione-civile-config-blank.php, configure it with TOKEN string and json filepath.

Se

<?php

    use GP\ProtezioneCivileBot\ProtezioneCivileBot;

    $config = require __DIR__ . '/config/protezione-civile-config.php';

    $token = $config['token'];
    $geoJSONFilename = $config['geoJSONFilename'];

    $protezioneCivileBot = new ProtezioneCivileBot($token, $geoJSONFilename);

    // If you use WebHook invoke the following method
    $protezioneCivileBot->withWebHook();

    $protezioneCivileBot->run();

Requirements

  • = PHP 5.5

Detail

Demo

TODO

  • Add Tests :-( Sorry, I know they must be written before the code, TDD dixit

Credits

License

protezione-civile-bot package is released under the MIT License. See the bundled LICENSE file for details.