mirror of
https://github.com/BushlanovDev/max-bot-api-client-php.git
synced 2026-08-18 13:53:01 +00:00
Some fix
This commit is contained in:
+9
-2
@@ -50,9 +50,11 @@ use RuntimeException;
|
||||
*/
|
||||
class Api
|
||||
{
|
||||
public const string LIBRARY_VERSION = '0.9.0';
|
||||
|
||||
public const string API_VERSION = '0.0.6';
|
||||
|
||||
private const string API_BASE_URL = 'http://127.0.0.1:5001';
|
||||
private const string API_BASE_URL = 'https://botapi.max.ru';
|
||||
|
||||
private const string METHOD_GET = 'GET';
|
||||
private const string METHOD_POST = 'POST';
|
||||
@@ -107,7 +109,12 @@ class Api
|
||||
);
|
||||
}
|
||||
|
||||
$guzzle = new \GuzzleHttp\Client();
|
||||
$guzzle = new \GuzzleHttp\Client([
|
||||
'timeout' => 10,
|
||||
'connect_timeout' => 5,
|
||||
'read_timeout' => 10,
|
||||
'headers' => ['User-Agent' => 'max-bot-api-client-php/' . self::LIBRARY_VERSION . ' PHP/' . PHP_VERSION],
|
||||
]);
|
||||
$httpFactory = new \GuzzleHttp\Psr7\HttpFactory();
|
||||
$client = new Client(
|
||||
$accessToken,
|
||||
|
||||
@@ -26,7 +26,7 @@ interface ClientApiInterface
|
||||
public function request(string $method, string $uri, array $queryParams = [], array $body = []): array;
|
||||
|
||||
/**
|
||||
* Performs a file download at the specified URL.
|
||||
* Performs a file upload at the specified URL.
|
||||
*
|
||||
* @param string $uri URL received from the download API.
|
||||
* @param resource|string $fileContents File content (stream resource or string).
|
||||
|
||||
Reference in New Issue
Block a user