This commit is contained in:
Alex
2025-08-07 22:19:10 +03:00
parent ca13096ec2
commit 1b00bae23a
2 changed files with 10 additions and 3 deletions
+9 -2
View File
@@ -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,
+1 -1
View File
@@ -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).