support3w / json-api-transport-service
There is no license information available for the latest version (0.0.1) of this package.
0.0.1
2016-04-07 19:23 UTC
Requires
- guzzlehttp/guzzle: ~5
- phpunit/phpunit: ~4.6
- predis/predis: 1.0.3
This package is not auto-updated.
Last update: 2025-01-02 01:40:10 UTC
README
$redisClient = new Predis\Client([
'scheme' => 'tcp',
'host' => REDIS_IP,
'port' => REDIS_PORT,
]);
// 1 day
$cacheKeyTTL = 86400;
$forceUpdateCache = false;
if(isset($_GET['force'])) {
$forceUpdateCache = true;
}
$app['json-api-transport.service'] = new GuzzleJsonApiTransportService($redisClient, $cacheKeyTTL, $forceUpdateCache);
$response = $app['json-api-transport.service']->get($this->apiUrl . '?deleted=1');
$response = $app['json-api-transport.service']->post($this->apiUrl, $params);
$response = $app['json-api-transport.service']->put($this->apiUrl . "/" . $id, $params);