Releases: ufee/amoapi
Releases · ufee/amoapi
Fixes
Custom User-agent
0.9.4.0 Fix
Curl interfaces
0.9.3.8 Added curl interface support
Fixes php 8.2
0.9.3.7 Php 8.2 fixes
BugFix
Salesbot service added
$bots = $amo->salesbots()->get($page = 1, $limit = 250);
$bots = $amo->salesbots;
$start = $amo->salesbots()->start($bot_id, $entity_id, $entity_type = 2);
$stop = $amo->salesbots()->stop($bot_id, $entity_id, $entity_type = 2);
Optimized search methods
searchByCustomField
searchByPhone
searchByEmail
searchByName
Small fixes
- Create task without entity
- Custom field value property check
Added Redis cache, added new CFields
Вместе с обновлением на новую версию, необходимо заменить (если используется):
\Ufee\Amo\Collections\QueryCollection::setCachePath('path_to/cache');
На новый формат:
$apiClient->queries->setCacheStorage(
new \Ufee\Amo\Base\Storage\Query\FileStorage($apiClient, ['path' => 'path_to/cache'])
);
Или:
$redis = new \Redis();
$redis->connect('/var/run/redis/redis.sock');
$redis->setOption(\Redis::OPT_SERIALIZER, \Redis::SERIALIZER_PHP); // \Redis::SERIALIZER_IGBINARY recommended
$redis->select(5); // switch to specific db
$apiClient->queries->setCacheStorage(
new \Ufee\Amo\Base\Storage\Query\RedisStorage($apiClient, ['connection' => $redis])
);
Added onResponseCode method
$amo->queries->onResponseCode(429, function($query) {
echo 'Resp code 429, retry '.$query->retries."\n";
});