laravel-madeline-proto/README.md

44 lines
2.0 KiB
Markdown
Raw Permalink Normal View History

2020-11-18 15:26:24 +01:00
# Laravel MadelineProto
2020-07-12 18:30:22 +02:00
[![Latest Stable Version](https://poser.pugx.org/setiawanhu/laravel-madeline-proto/v)](//packagist.org/packages/setiawanhu/laravel-madeline-proto)
[![Total Downloads](https://poser.pugx.org/setiawanhu/laravel-madeline-proto/downloads)](//packagist.org/packages/setiawanhu/laravel-madeline-proto)
[![License](https://poser.pugx.org/setiawanhu/laravel-madeline-proto/license)](//packagist.org/packages/setiawanhu/laravel-madeline-proto)
2020-07-09 18:35:37 +02:00
A third party Telegram client library [danog/MadelineProto](https://github.com/danog/MadelineProto) wrapper for Laravel.
2020-08-12 22:23:22 +02:00
# Getting Started
2020-07-09 18:35:37 +02:00
Add the laravel-madeline-proto to the project dependency:
```shell script
composer require setiawanhu/laravel-madeline-proto
```
2020-08-12 22:23:22 +02:00
Then publish the `telegram.php` config file:
2020-07-09 18:35:37 +02:00
```shell script
php artisan vendor:publish --provider="Hu\MadelineProto\MadelineProtoServiceProvider"
```
Set up the Telegram API key by providing env variables:
```dotenv
MP_TELEGRAM_API_ID=... //your telegram api id here
MP_TELEGRAM_API_HASH=... //your telegram api hash here
```
2020-08-12 22:23:22 +02:00
This wrapper package supports for running both [single](https://github.com/setiawanhu/laravel-madeline-proto/wiki/Single-Telegram-Account) / [multiple](https://github.com/setiawanhu/laravel-madeline-proto/wiki/Multiple-Telegram-Account) telegram account.
2020-07-09 18:35:37 +02:00
2020-08-12 22:23:22 +02:00
## Dig Deeper
2020-07-09 18:35:37 +02:00
2020-08-12 22:23:22 +02:00
Please check [wiki](https://github.com/setiawanhu/sanctum-auth/wiki) for more details about laravel-madeline-proto usage
2020-07-09 18:35:37 +02:00
# Notes
* This wrapper package is still not wrapping all the apis yet, I'm still focusing on wrapping the messages api.
* If you can't find the method that you want in Messages facade or need to use the default danog/MadelineProto api, you might want to use `MadelineProto::getClient()` facade method. It will return `danog\MadelineProto\API` object where you can call all the method provided by the [danog/MadelineProto](https://github.com/danog/MadelineProto) library.
2020-11-20 18:38:30 +01:00
# Thanks To
[Bryan Ramaputra](https://github.com/Ordinal43) for helping me to write readable documentations.