Skip to content

gpirrotta/protezione-civile-bot

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages