From a743b749d7ec6fae2896d55f64aad4235f988c0b Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Wed, 23 Jan 2019 15:30:58 +0300 Subject: [PATCH] Readme update & new api methods --- .env.example | 4 +- .gitignore | 3 +- composer.lock | 2644 ++++++++++++++++++++++++++++++++++++++++++++++++ src/Client.php | 154 ++- 4 files changed, 2783 insertions(+), 22 deletions(-) create mode 100644 composer.lock diff --git a/.env.example b/.env.example index a3a3bde..1d199cb 100644 --- a/.env.example +++ b/.env.example @@ -2,9 +2,9 @@ SWOOLE_SERVER_ADDRESS=127.0.0.1 SWOOLE_SERVER_PORT=9503 SWOOLE_WORKER_NUM=1 -SWOOLE_HTTP_COMPRESSION=1 +SWOOLE_HTTP_COMPRESSION=0 -API_CLIENT_WHITELIST=['127.0.0.1'] +API_CLIENT_WHITELIST=["127.0.0.1"] # TELEGRAM CLIENT TELEGRAM_API_ID= diff --git a/.gitignore b/.gitignore index 95935a2..7bc7630 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,4 @@ nbproject .phpunit.result.cache *.madeline *.madeline.lock -composer.phar -composer.lock \ No newline at end of file +composer.phar \ No newline at end of file diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..1ee9042 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2644 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "23370261ebb22e24d52fd89b793726dd", + "packages": [ + { + "name": "amphp/amp", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/amp.git", + "reference": "7075ef7d74dbd32626bfd31c976b23055c3ade6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/amp/zipball/7075ef7d74dbd32626bfd31c976b23055c3ade6a", + "reference": "7075ef7d74dbd32626bfd31c976b23055c3ade6a", + "shasum": "" + }, + "require": { + "php": ">=7" + }, + "require-dev": { + "amphp/phpunit-util": "^1", + "friendsofphp/php-cs-fixer": "^2.3", + "phpstan/phpstan": "^0.8.5", + "phpunit/phpunit": "^6.0.9", + "react/promise": "^2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Amp\\": "lib" + }, + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "http://amphp.org/amp", + "keywords": [ + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" + ], + "time": "2018-12-11T10:31:37+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v1.5.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "6bbfcb6f47e92577e739586ba0c87e867be70a23" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/6bbfcb6f47e92577e739586ba0c87e867be70a23", + "reference": "6bbfcb6f47e92577e739586ba0c87e867be70a23", + "shasum": "" + }, + "require": { + "amphp/amp": "^2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "friendsofphp/php-cs-fixer": "^2.3", + "infection/infection": "^0.9.3", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\ByteStream\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" + ], + "time": "2018-12-27T18:08:06+00:00" + }, + { + "name": "amphp/cache", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/cache.git", + "reference": "ab2339e465d9d383dc748f288d530fd7cd7aadea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/cache/zipball/ab2339e465d9d383dc748f288d530fd7cd7aadea", + "reference": "ab2339e465d9d383dc748f288d530fd7cd7aadea", + "shasum": "" + }, + "require": { + "amphp/amp": "^2" + }, + "require-dev": { + "amphp/phpunit-util": "^1", + "friendsofphp/php-cs-fixer": "^2.3", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Cache\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + } + ], + "description": "A promise-aware caching API for Amp.", + "homepage": "https://github.com/amphp/cache", + "time": "2017-10-04T19:22:12+00:00" + }, + { + "name": "amphp/dns", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/amphp/dns.git", + "reference": "861cc857b1ba6e02e8a7439c30403682785fce96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/dns/zipball/861cc857b1ba6e02e8a7439c30403682785fce96", + "reference": "861cc857b1ba6e02e8a7439c30403682785fce96", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "amphp/byte-stream": "^1.1", + "amphp/cache": "^1.2", + "amphp/parser": "^1", + "amphp/windows-registry": "^0.3", + "daverandom/libdns": "^2.0.1", + "ext-filter": "*", + "php": ">=7.0" + }, + "require-dev": { + "amphp/phpunit-util": "^1", + "friendsofphp/php-cs-fixer": "^2.3", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Dns\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Chris Wright", + "email": "addr@daverandom.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Async DNS resolution for Amp.", + "homepage": "https://github.com/amphp/dns", + "keywords": [ + "amp", + "amphp", + "async", + "client", + "dns", + "resolve" + ], + "time": "2019-01-04T17:20:52+00:00" + }, + { + "name": "amphp/file", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/amphp/file.git", + "reference": "5a69fca406ac5fd220de0aa68c887bc8046eb93c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/file/zipball/5a69fca406ac5fd220de0aa68c887bc8046eb93c", + "reference": "5a69fca406ac5fd220de0aa68c887bc8046eb93c", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "amphp/byte-stream": "^1", + "amphp/parallel": "^1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\File\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Allows non-blocking access to the filesystem for Amp.", + "homepage": "https://github.com/amphp/file", + "keywords": [ + "amp", + "amphp", + "async", + "disk", + "file", + "filesystem", + "io", + "non-blocking", + "static" + ], + "time": "2019-01-07T17:38:45+00:00" + }, + { + "name": "amphp/log", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/log.git", + "reference": "728678d6e751abeb54a4d2fc6e76ef977de3f43b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/log/zipball/728678d6e751abeb54a4d2fc6e76ef977de3f43b", + "reference": "728678d6e751abeb54a4d2fc6e76ef977de3f43b", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "amphp/byte-stream": "^1.3", + "monolog/monolog": "^1.23" + }, + "require-dev": { + "amphp/file": "^0.3", + "amphp/phpunit-util": "^1", + "friendsofphp/php-cs-fixer": "^2.3", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Log\\": "src" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Non-blocking logging for PHP based on Amp and Monolog.", + "homepage": "https://github.com/amphp/log", + "keywords": [ + "amp", + "amphp", + "async", + "log", + "logger", + "logging", + "non-blocking" + ], + "time": "2018-03-22T19:39:52+00:00" + }, + { + "name": "amphp/parallel", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/parallel.git", + "reference": "687776dc6933af4c6009ac58f915faf45e8463ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/parallel/zipball/687776dc6933af4c6009ac58f915faf45e8463ce", + "reference": "687776dc6933af4c6009ac58f915faf45e8463ce", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "amphp/byte-stream": "^1.5", + "amphp/parser": "^1", + "amphp/process": "^1", + "amphp/sync": "^1.0.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "phpunit/phpunit": "^6" + }, + "suggest": { + "ext-pthreads": "Required for thread contexts" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Parallel\\": "lib" + }, + "files": [ + "lib/Worker/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Parallel processing component for Amp.", + "homepage": "https://github.com/amphp/parallel", + "keywords": [ + "async", + "asynchronous", + "concurrent", + "multi-processing", + "multi-threading" + ], + "time": "2019-01-09T21:31:46+00:00" + }, + { + "name": "amphp/parser", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/parser.git", + "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/parser/zipball/f83e68f03d5b8e8e0365b8792985a7f341c57ae1", + "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1", + "shasum": "" + }, + "require": { + "php": ">=7" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.3", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Parser\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "A generator parser to make streaming parsers simple.", + "homepage": "https://github.com/amphp/parser", + "keywords": [ + "async", + "non-blocking", + "parser", + "stream" + ], + "time": "2017-06-06T05:29:10+00:00" + }, + { + "name": "amphp/process", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/amphp/process.git", + "reference": "e7e28219da753f865f9055e87d0b9b110ea607ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/process/zipball/e7e28219da753f865f9055e87d0b9b110ea607ba", + "reference": "e7e28219da753f865f9055e87d0b9b110ea607ba", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "amphp/byte-stream": "^1.4", + "php": ">=7" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Process\\": "lib" + }, + "files": [ + "lib/constants.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Asynchronous process manager.", + "homepage": "https://github.com/amphp/process", + "time": "2019-01-15T21:42:43+00:00" + }, + { + "name": "amphp/socket", + "version": "v0.10.11", + "source": { + "type": "git", + "url": "https://github.com/amphp/socket.git", + "reference": "2cb9d0ef823cfd1de4cfbd0e680c58841367f727" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/socket/zipball/2cb9d0ef823cfd1de4cfbd0e680c58841367f727", + "reference": "2cb9d0ef823cfd1de4cfbd0e680c58841367f727", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "amphp/byte-stream": "^1.1", + "amphp/dns": "^0.9", + "amphp/uri": "^0.1", + "php": ">=7.0" + }, + "require-dev": { + "amphp/phpunit-util": "^1", + "friendsofphp/php-cs-fixer": "^2.3", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Socket\\": "src" + }, + "files": [ + "src/functions.php", + "src/Internal/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@gmail.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Async socket connection / server tools for Amp.", + "homepage": "https://github.com/amphp/socket", + "keywords": [ + "amp", + "async", + "encryption", + "non-blocking", + "sockets", + "tcp", + "tls" + ], + "time": "2018-10-17T16:53:02+00:00" + }, + { + "name": "amphp/sync", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/sync.git", + "reference": "a1d8f244eb19e3e2a96abc4686cebc80995bbc90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/sync/zipball/a1d8f244eb19e3e2a96abc4686cebc80995bbc90", + "reference": "a1d8f244eb19e3e2a96abc4686cebc80995bbc90", + "shasum": "" + }, + "require": { + "amphp/amp": "^2" + }, + "require-dev": { + "amphp/phpunit-util": "^1", + "friendsofphp/php-cs-fixer": "^2.3", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Sync\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Mutex, Semaphore, and other synchronization tools for Amp.", + "homepage": "https://github.com/amphp/sync", + "keywords": [ + "async", + "asynchronous", + "mutex", + "semaphore", + "synchronization" + ], + "time": "2017-11-29T21:48:53+00:00" + }, + { + "name": "amphp/uri", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/amphp/uri.git", + "reference": "f3195b163275383909ded7770a11d8eb865cbc86" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/uri/zipball/f3195b163275383909ded7770a11d8eb865cbc86", + "reference": "f3195b163275383909ded7770a11d8eb865cbc86", + "shasum": "" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.3", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Uri\\": "src" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey" + } + ], + "description": "Uri Parser and Resolver.", + "homepage": "https://github.com/amphp/uri", + "time": "2018-12-21T10:29:41+00:00" + }, + { + "name": "amphp/websocket-client", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/amphp/websocket-client.git", + "reference": "68d326556093507fc9f7c4bdebbf0e2922968652" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/websocket-client/zipball/68d326556093507fc9f7c4bdebbf0e2922968652", + "reference": "68d326556093507fc9f7c4bdebbf0e2922968652", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "amphp/byte-stream": "^1", + "amphp/socket": "^0.10", + "php": ">=7" + }, + "require-dev": { + "amphp/aerys": "^0.7.2", + "amphp/phpunit-util": "^1", + "friendsofphp/php-cs-fixer": "^2.9", + "phpunit/phpunit": "^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Websocket\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Async WebSocket client for PHP based on Amp.", + "keywords": [ + "amp", + "amphp", + "async", + "client", + "http", + "non-blocking", + "websocket" + ], + "time": "2018-12-13T17:35:05+00:00" + }, + { + "name": "amphp/windows-registry", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/amphp/windows-registry.git", + "reference": "834af7a30ad7c006b0326ccd2686ddc6e6943366" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/windows-registry/zipball/834af7a30ad7c006b0326ccd2686ddc6e6943366", + "reference": "834af7a30ad7c006b0326ccd2686ddc6e6943366", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "amphp/byte-stream": "^1.4", + "amphp/process": "^1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\WindowsRegistry\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Windows Registry Reader.", + "time": "2018-10-24T03:34:54+00:00" + }, + { + "name": "cache/adapter-common", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-cache/adapter-common.git", + "reference": "6320bb5f5574cb88438059b59f8708da6b6f1d32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-cache/adapter-common/zipball/6320bb5f5574cb88438059b59f8708da6b6f1d32", + "reference": "6320bb5f5574cb88438059b59f8708da6b6f1d32", + "shasum": "" + }, + "require": { + "cache/tag-interop": "^1.0", + "php": "^5.6 || ^7.0", + "psr/cache": "^1.0", + "psr/log": "^1.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "cache/integration-tests": "^0.16", + "phpunit/phpunit": "^5.7.21" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Cache\\Adapter\\Common\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Scherer", + "email": "aequasi@gmail.com", + "homepage": "https://github.com/aequasi" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/nyholm" + } + ], + "description": "Common classes for PSR-6 adapters", + "homepage": "http://www.php-cache.com/en/latest/", + "keywords": [ + "cache", + "psr-6", + "tag" + ], + "time": "2018-07-08T13:04:33+00:00" + }, + { + "name": "cache/filesystem-adapter", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-cache/filesystem-adapter.git", + "reference": "306ade48debb191955d4dde9b8fbca979b1621d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-cache/filesystem-adapter/zipball/306ade48debb191955d4dde9b8fbca979b1621d5", + "reference": "306ade48debb191955d4dde9b8fbca979b1621d5", + "shasum": "" + }, + "require": { + "cache/adapter-common": "^1.0", + "league/flysystem": "^1.0", + "php": "^5.6 || ^7.0", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0" + }, + "provide": { + "psr/cache-implementation": "^1.0", + "psr/simple-cache-implementation": "^1.0" + }, + "require-dev": { + "cache/integration-tests": "^0.16", + "phpunit/phpunit": "^5.7.21" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Cache\\Adapter\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Scherer", + "email": "aequasi@gmail.com", + "homepage": "https://github.com/aequasi" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/nyholm" + } + ], + "description": "A PSR-6 cache implementation using filesystem. This implementation supports tags", + "homepage": "http://www.php-cache.com/en/latest/", + "keywords": [ + "cache", + "filesystem", + "psr-6", + "tag" + ], + "time": "2018-06-06T20:11:28+00:00" + }, + { + "name": "cache/tag-interop", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-cache/tag-interop.git", + "reference": "992b7ed3048e3201396208b38f88388918e25ced" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-cache/tag-interop/zipball/992b7ed3048e3201396208b38f88388918e25ced", + "reference": "992b7ed3048e3201396208b38f88388918e25ced", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "psr/cache": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Cache\\TagInterop\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/nyholm" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com", + "homepage": "https://github.com/nicolas-grekas" + } + ], + "description": "Framework interoperable interfaces for tags", + "homepage": "http://www.php-cache.com/en/latest/", + "keywords": [ + "cache", + "psr", + "psr6", + "tag" + ], + "time": "2018-06-06T20:11:28+00:00" + }, + { + "name": "danog/madelineproto", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/danog/MadelineProto.git", + "reference": "bcebd5e0fb40ae67f69ef6bbae3637bb620e3e3d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danog/MadelineProto/zipball/bcebd5e0fb40ae67f69ef6bbae3637bb620e3e3d", + "reference": "bcebd5e0fb40ae67f69ef6bbae3637bb620e3e3d", + "shasum": "" + }, + "require": { + "amphp/amp": "^2.0", + "amphp/dns": "dev-master#861cc857b1ba6e02e8a7439c30403682785fce96 as 0.9.9", + "amphp/file": "dev-master#5a69fca406ac5fd220de0aa68c887bc8046eb93c as 0.3.3", + "amphp/log": "^1.0", + "amphp/parser": "^1.0", + "amphp/socket": "^0.10.11", + "amphp/uri": "dev-master#f3195b163275383909ded7770a11d8eb865cbc86 as 0.1.3", + "amphp/websocket-client": "dev-master", + "danog/magicalserializer": "^1.0", + "danog/primemodule": "^1.0.3", + "erusev/parsedown": "^1.6", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "php": ">=5.6.0", + "phpseclib/phpseclib": "dev-master#27370df", + "rollbar/rollbar": "dev-master", + "vlucas/phpdotenv": "^2.4" + }, + "conflict": { + "krakjoe/pthreads-polyfill": "*" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^3.1" + }, + "suggest": { + "ext-libtgvoip": "Install the php-libtgvoip extension to make phone calls (https://github.com/danog/php-libtgvoip)", + "ext-sockets": "Install the socket extension to speed up MadelineProto" + }, + "type": "project", + "autoload": { + "psr-0": { + "danog\\MadelineProto\\": "src/" + }, + "files": [ + "src/BigIntegor.php", + "src/Socket.php", + "src/Collectable.php", + "src/Threaded.php", + "src/Volatile.php", + "src/Thread.php", + "src/Worker.php", + "src/Pool.php", + "src/HttpProxy.php", + "src/SocksProxy.php", + "src/YieldReturnValue.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-only" + ], + "authors": [ + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + } + ], + "description": "PHP implementation of telegram's MTProto protocol.", + "homepage": "https://daniil.it/MadelineProto", + "keywords": [ + "GB", + "Messenger", + "audio", + "bytes", + "client", + "files", + "mtproto", + "php", + "protocol", + "stickers", + "telegram", + "video" + ], + "time": "2018-12-31T14:12:08+00:00" + }, + { + "name": "danog/magicalserializer", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/danog/MagicalSerializer.git", + "reference": "87b6ed05a86021e9364f31133089bb83980d5e24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danog/MagicalSerializer/zipball/87b6ed05a86021e9364f31133089bb83980d5e24", + "reference": "87b6ed05a86021e9364f31133089bb83980d5e24", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "danog\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-only" + ], + "authors": [ + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + } + ], + "description": "Serialize Volatile, Threaded or any other internal PHP class!", + "homepage": "https://daniil.it/MagicalSerializer", + "keywords": [ + "pthreads", + "serializable", + "serialize", + "threading", + "volatile" + ], + "time": "2018-02-20T10:35:49+00:00" + }, + { + "name": "danog/primemodule", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/danog/PrimeModule.git", + "reference": "a18918c4092d6d8696521b05a59a3cdb5cdc061e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danog/PrimeModule/zipball/a18918c4092d6d8696521b05a59a3cdb5cdc061e", + "reference": "a18918c4092d6d8696521b05a59a3cdb5cdc061e", + "shasum": "" + }, + "suggest": { + "ext-primemodule": "Install the native C++ extension for extremely fast factorization (https://github.com/danog/PrimeModule-ext)" + }, + "type": "library", + "autoload": { + "psr-0": { + "danog\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-only" + ], + "authors": [ + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + } + ], + "description": "Prime module capable of doing prime factorization of huge numbers very quickly.\"", + "time": "2018-03-21T10:47:51+00:00" + }, + { + "name": "daverandom/libdns", + "version": "2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/DaveRandom/LibDNS.git", + "reference": "1ecd825b6fa9bb3fddc07751997e29dc78749b95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/1ecd825b6fa9bb3fddc07751997e29dc78749b95", + "reference": "1ecd825b6fa9bb3fddc07751997e29dc78749b95", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": ">=7.0" + }, + "suggest": { + "ext-intl": "Required for IDN support" + }, + "type": "library", + "autoload": { + "psr-4": { + "LibDNS\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "DNS protocol implementation written in pure PHP", + "keywords": [ + "dns" + ], + "time": "2018-01-10T15:56:17+00:00" + }, + { + "name": "erusev/parsedown", + "version": "1.8.0-beta-5", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "c26a2ee4bf8ba0270daab7da0353f2525ca6564a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/c26a2ee4bf8ba0270daab7da0353f2525ca6564a", + "reference": "c26a2ee4bf8ba0270daab7da0353f2525ca6564a", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2018-06-11T18:15:32+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "02411203ceb2de638f80346223e67ddc65be50ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/02411203ceb2de638f80346223e67ddc65be50ee", + "reference": "02411203ceb2de638f80346223e67ddc65be50ee", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2019-01-11T14:42:53+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "926eaa3ff73cde2becf652b785831bcb7618568a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/926eaa3ff73cde2becf652b785831bcb7618568a", + "reference": "926eaa3ff73cde2becf652b785831bcb7618568a", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2018-10-30T00:20:04+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "ae7949ee7b865f0eb8b191c438cda63cad59d437" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/ae7949ee7b865f0eb8b191c438cda63cad59d437", + "reference": "ae7949ee7b865f0eb8b191c438cda63cad59d437", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2018-12-28T01:59:01+00:00" + }, + { + "name": "jaeger/g-http", + "version": "V1.6.0", + "source": { + "type": "git", + "url": "https://github.com/jae-jae/GHttp.git", + "reference": "eb34d266a07c687aef45087370ef47d48321bd2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jae-jae/GHttp/zipball/eb34d266a07c687aef45087370ef47d48321bd2e", + "reference": "eb34d266a07c687aef45087370ef47d48321bd2e", + "shasum": "" + }, + "require": { + "cache/filesystem-adapter": "^1.0", + "guzzlehttp/guzzle": "^6.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Jaeger\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaeger", + "email": "JaegerCode@gmail.com" + } + ], + "description": "Simple Http client base on GuzzleHttp", + "time": "2018-12-12T04:21:15+00:00" + }, + { + "name": "jaeger/phpquery-single", + "version": "0.9.9", + "source": { + "type": "git", + "url": "https://github.com/jae-jae/phpQuery-single.git", + "reference": "6c12e3a1648dc619f16920f96082f397d74e0127" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jae-jae/phpQuery-single/zipball/6c12e3a1648dc619f16920f96082f397d74e0127", + "reference": "6c12e3a1648dc619f16920f96082f397d74e0127", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "phpQuery.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobiasz Cudnik", + "email": "tobiasz.cudnik@gmail.com", + "homepage": "https://github.com/TobiaszCudnik", + "role": "Developer" + }, + { + "name": "Jaeger", + "role": "Packager" + } + ], + "description": "phpQuery单文件版本,是Querylist的依赖(http://querylist.cc/),phpQuery项目主页:http://code.google.com/p/phpquery/", + "homepage": "http://code.google.com/p/phpquery/", + "time": "2017-12-07T02:13:37+00:00" + }, + { + "name": "jaeger/querylist", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/jae-jae/QueryList.git", + "reference": "df9e3bbf1943b77ac7ab91bd3fc59643fe458044" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jae-jae/QueryList/zipball/df9e3bbf1943b77ac7ab91bd3fc59643fe458044", + "reference": "df9e3bbf1943b77ac7ab91bd3fc59643fe458044", + "shasum": "" + }, + "require": { + "jaeger/g-http": "^1.1", + "jaeger/phpquery-single": "^0.9", + "php": ">=7.0", + "tightenco/collect": "^5" + }, + "require-dev": { + "phpunit/phpunit": "^7.5", + "symfony/var-dumper": "^3.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "QL\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaeger", + "email": "JaegerCode@gmail.com" + } + ], + "description": "Simple, elegant, extensible PHP Web Scraper (crawler/spider),Use the css3 dom selector,Based on phpQuery! 简洁、优雅、可扩展的PHP采集工具(爬虫),基于phpQuery。", + "homepage": "http://querylist.cc", + "keywords": [ + "QueryList", + "phpQuery", + "spider" + ], + "time": "2018-12-12T07:29:31+00:00" + }, + { + "name": "league/flysystem", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "f4202b9a9a0b47aa10cf84a33729d56d6be9f829" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f4202b9a9a0b47aa10cf84a33729d56d6be9f829", + "reference": "f4202b9a9a0b47aa10cf84a33729d56d6be9f829", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.10" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2019-01-14T06:55:18+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "4d5b7e6ba1127789c7ff59d6f762298eaa29787f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4d5b7e6ba1127789c7ff59d6f762298eaa29787f", + "reference": "4d5b7e6ba1127789c7ff59d6f762298eaa29787f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2018-12-26T14:24:03+00:00" + }, + { + "name": "paragonie/constant_time_encoding", + "version": "v1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "2132f0f293d856026d7d11bd81b9f4a23a1dc1f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/2132f0f293d856026d7d11bd81b9f4a23a1dc1f6", + "reference": "2132f0f293d856026d7d11bd81b9f4a23a1dc1f6", + "shasum": "" + }, + "require": { + "php": "^5.3|^7" + }, + "require-dev": { + "paragonie/random_compat": "^1.4|^2", + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^0.3|^1" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "time": "2018-04-30T17:57:16+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.18", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2019-01-03T20:59:08+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "PhpOption\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "time": "2015-07-25T16:39:46+00:00" + }, + { + "name": "phpseclib/phpseclib", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/danog/phpseclib", + "reference": "27370dff48f01e4e9363f6fcdb15f9eede298cd4" + }, + "require": { + "paragonie/constant_time_encoding": "^1", + "paragonie/random_compat": "^1.4|^2.0", + "php": ">=5.6.1" + }, + "require-dev": { + "phing/phing": "~2.7", + "phpunit/phpunit": "^4.8.35|^5.7|^6.0", + "sami/sami": "~2.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "suggest": { + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib\\": "phpseclib/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "time": "2018-02-20T14:40:20+00:00" + }, + { + "name": "psr/cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "78c5a01ddbf11cf731f1338a4f5aba23b14d5b47" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/78c5a01ddbf11cf731f1338a4f5aba23b14d5b47", + "reference": "78c5a01ddbf11cf731f1338a4f5aba23b14d5b47", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-10-13T14:48:10+00:00" + }, + { + "name": "psr/http-message", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "c4421fcac1edd5a324fda73e589a5cf96e52ffd0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/c4421fcac1edd5a324fda73e589a5cf96e52ffd0", + "reference": "c4421fcac1edd5a324fda73e589a5cf96e52ffd0", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-21T13:42:00+00:00" + }, + { + "name": "psr/simple-cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "beb49b96960f0cbf17e7fbcaaddc8eb434e126eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/beb49b96960f0cbf17e7fbcaaddc8eb434e126eb", + "reference": "beb49b96960f0cbf17e7fbcaaddc8eb434e126eb", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2018-12-11T21:53:24+00:00" + }, + { + "name": "rollbar/rollbar", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/rollbar/rollbar-php.git", + "reference": "8997d1e1350547338006b56a09f681cc05a3a226" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rollbar/rollbar-php/zipball/8997d1e1350547338006b56a09f681cc05a3a226", + "reference": "8997d1e1350547338006b56a09f681cc05a3a226", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "psr/log": "^1.0.1" + }, + "require-dev": { + "codeclimate/php-test-reporter": "dev-master", + "mockery/mockery": "0.9.*", + "monolog/monolog": "^1.24", + "packfire/php5.3-compat": "*", + "phpmd/phpmd": "@stable", + "phpunit/phpunit": "4.8.*", + "squizlabs/php_codesniffer": "2.*" + }, + "suggest": { + "fluent/logger": "Needed to use the 'fluent' handler for fluentd support", + "packfire/php5.3-compat": "for backward compatibility with PHP 5.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Rollbar\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rollbar, Inc.", + "email": "support@rollbar.com", + "role": "Developer" + } + ], + "description": "Monitors errors and exceptions and reports them to Rollbar", + "homepage": "http://github.com/rollbar/rollbar-php", + "keywords": [ + "debugging", + "errors", + "exceptions", + "logging", + "monitoring" + ], + "time": "2019-01-17T19:02:58+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", + "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "450f92f5f843983253e2a1dbafc7e4f553ef374d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/450f92f5f843983253e2a1dbafc7e4f553ef374d", + "reference": "450f92f5f843983253e2a1dbafc7e4f553ef374d", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/console": "<3.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "twig/twig": "~1.34|~2.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2019-01-16T21:53:45+00:00" + }, + { + "name": "tightenco/collect", + "version": "v5.7.22", + "source": { + "type": "git", + "url": "https://github.com/tightenco/collect.git", + "reference": "124cb1074cf739fdc2d72d7d299095d7e272dc71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tightenco/collect/zipball/124cb1074cf739fdc2d72d7d299095d7e272dc71", + "reference": "124cb1074cf739fdc2d72d7d299095d7e272dc71", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/var-dumper": ">=3.4 <5" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "nesbot/carbon": "^1.26.3", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Collect/Support/helpers.php", + "src/Collect/Support/alias.php" + ], + "psr-4": { + "Tightenco\\Collect\\": "src/Collect" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "Collect - Illuminate Collections as a separate package.", + "keywords": [ + "collection", + "laravel" + ], + "time": "2019-01-22T17:10:37+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "cfd5dc225767ca154853752abc93aeec040fcf36" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/cfd5dc225767ca154853752abc93aeec040fcf36", + "reference": "cfd5dc225767ca154853752abc93aeec040fcf36", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0", + "phpoption/phpoption": "^1.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "http://www.vancelucas.com" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "time": "2018-10-30T17:29:25+00:00" + } + ], + "packages-dev": [ + { + "name": "swoole/ide-helper", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/swoole/ide-helper.git", + "reference": "cff84462f360a0e281fa8f5fcc91c9420da5b9d9" + }, + "type": "library", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Team Swoole", + "email": "team@swoole.com" + } + ], + "description": "swoole-ide-helper", + "time": "2019-01-15T02:52:04+00:00" + } + ], + "aliases": [ + { + "alias": "0.9.9", + "alias_normalized": "0.9.9.0", + "version": "9999999-dev", + "package": "amphp/dns" + }, + { + "alias": "0.3.3", + "alias_normalized": "0.3.3.0", + "version": "9999999-dev", + "package": "amphp/file" + }, + { + "alias": "0.1.3", + "alias_normalized": "0.1.3.0", + "version": "9999999-dev", + "package": "amphp/uri" + } + ], + "minimum-stability": "dev", + "stability-flags": { + "danog/madelineproto": 20, + "amphp/dns": 20, + "amphp/file": 20, + "amphp/uri": 20, + "jaeger/querylist": 20, + "swoole/ide-helper": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.2.0", + "ext-json": "*", + "ext-swoole": ">=4.0" + }, + "platform-dev": [] +} diff --git a/src/Client.php b/src/Client.php index 07aabf1..33c113e 100644 --- a/src/Client.php +++ b/src/Client.php @@ -59,13 +59,13 @@ class Client { *
      * [
      *     'peer'          => '',
-     *     'offset_id'     => 0,
-     *     'offset_date'   => 0,
-     *     'add_offset'    => 0,
-     *     'limit'         => 0,
-     *     'max_id'        => 0,
-     *     'min_id'        => 0,
-     *     'hash'          => 0
+     *     'offset_id'     => 0, // (optional)
+     *     'offset_date'   => 0, // (optional)
+     *     'add_offset'    => 0, // (optional)
+     *     'limit'         => 0, // (optional)
+     *     'max_id'        => 0, // (optional)
+     *     'min_id'        => 0, // (optional)
+     *     'hash'          => 0, // (optional)
      * ]
      * 
* @return array @@ -86,24 +86,106 @@ class Client { return $this->MadelineProto->messages->getHistory($data); } + /** + * Получает определенные сообщения из канала. + * + * @param array $data + *
+     * [
+     *  'channel' => '',
+     *  'id'      => [], //Id сообщения, или нескольких сообщений
+     * ]
+     * 
+ * @return array + */ + public function getMessages($data):array { + $data = array_merge([ + 'channel' => '', + 'id' => [], + ],$data); + return $this->MadelineProto->channels->getMessages($data); + } + /** * Пересылает сообщения * * @param array $data - * Id сообщения, или нескольких сообщений + *
+     * [
+     *  'from_peer' => '',
+     *  'to_peer'   => '',
+     *  'id'        => [], //Id сообщения, или нескольких сообщений
+     * ]
+     * 
+ * @return array */ - public function forwardMessages($data): void + public function forwardMessages($data): array { $data = array_merge([ 'from_peer' => '', 'to_peer' => '', 'id' => [], ],$data); - $this->MadelineProto->messages->forwardMessages($data); + return $this->MadelineProto->messages->forwardMessages($data); + } + + /** + * Пересылает сообщения без ссылки на оригинал + * + * @param array $data + *
+     * [
+     *  'from_peer' => '',
+     *  'to_peer'   => '',
+     *  'id'        => [], //Id сообщения, или нескольких сообщений
+     * ]
+     * 
+ * @return array + */ + public function copyMessages($data):array { + + $data = array_merge([ + 'from_peer' => '', + 'to_peer' => '', + 'id' => [], + ],$data); + + $response = $this->getMessages([ + 'channel' => $data['from_peer'], + 'id' => $data['id'], + ]); + $result = []; + if (!$response || !is_array($response) || !array_key_exists('messages', $response)){ + return $result; + } + + foreach ($response['messages'] as $message) { + $messageData = [ + 'message' => $message['message'] ?? '', + 'peer' => $data['to_peer'], + ]; + if (array_key_exists('media', $message)) { + $messageData['media'] = $message; //MadelineProto сама достанет все media из сообщения. + $result[] = $this->sendMedia($messageData); + } else { + $result[] = $this->sendMessage($messageData); + } + } + + return $result; + } /** * @param array $data + *
+     * [
+     *  'q'             => '',  //Поисковый запрос
+     *  'offset_id'     => 0,   // (optional)
+     *  'offset_date'   => 0,   // (optional)
+     *  'limit'         => 10,  // (optional)
+     * ]
+     * 
* @return array */ public function searchGlobal(array $data): array @@ -119,18 +201,54 @@ class Client { /** * @param $data + *
+     * [
+     *  'peer'              => '',
+     *  'message'           => '',      // Текст сообщения
+     *  'reply_to_msg_id'   => 0,       // (optional)
+     *  'parse_mode'        => 'HTML',  // (optional)
+     * ]
+     * 
* @return array */ public function sendMessage($data = []): array { - return $this->MadelineProto->messages->sendMessage( - array_merge([ - 'peer' => '', - 'message' => '', - 'reply_to_msg_id' => 0, - 'parse_mode' => 'HTML', - ], $data) - ); + $data = array_merge([ + 'peer' => '', + 'message' => '', + 'reply_to_msg_id' => 0, + 'parse_mode' => 'HTML', + ], $data); + + return $this->MadelineProto->messages->sendMessage($data); } + /** + * @param $data + *
+     * [
+     *  'peer'              => '',
+     *  'message'           => '',      // Текст сообщения,
+     *  'media'             => [],      // MessageMedia, Update, Message or InputMedia
+     *  'reply_to_msg_id'   => 0,       // (optional)
+     *  'parse_mode'        => 'HTML',  // (optional)
+     * ]
+     * 
+ * @return array + */ + public function sendMedia($data = []): array + { + $data = array_merge([ + 'peer' => '', + 'message' => '', + 'media' => [], + 'reply_to_msg_id' => 0, + 'parse_mode' => 'HTML', + ], $data); + + return $this->MadelineProto->messages->sendMedia($data); + } + + + }