mirror of
https://github.com/ovh/php-ovh.git
synced 2023-11-05 03:20:26 +01:00
Fix timeout and guzzle 6
Fix copyrights Signed-off-by: Vincent Casse <vincent.casse@corp.ovh.com>
This commit is contained in:
parent
cdd9a916f8
commit
9aa7df73bf
@ -5,11 +5,6 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"guzzlehttp/guzzle": "^6.0"
|
"guzzlehttp/guzzle": "^6.0"
|
||||||
},
|
},
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Vincent Cassé"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {"Ovh\\": "src/"}
|
"psr-4": {"Ovh\\": "src/"}
|
||||||
},
|
},
|
||||||
|
11
src/Api.php
11
src/Api.php
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
# Copyright (c) 2013-2014, OVH SAS.
|
# Copyright (c) 2013-2016, OVH SAS.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -44,8 +44,6 @@ use GuzzleHttp\Psr7\Response;
|
|||||||
*
|
*
|
||||||
* @package Ovh
|
* @package Ovh
|
||||||
* @category Ovh
|
* @category Ovh
|
||||||
* @author Vincent Cassé <vincent.casse@ovh.net>
|
|
||||||
* @author Thierry Goettelmann <thierry@byscripts.info>
|
|
||||||
*/
|
*/
|
||||||
class Api
|
class Api
|
||||||
{
|
{
|
||||||
@ -144,9 +142,10 @@ class Api
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($http_client)) {
|
if (!isset($http_client)) {
|
||||||
$http_client = new Client();
|
$http_client = new Client([
|
||||||
$http_client->setDefaultOption('timeout', 30);
|
'timeout' => 30,
|
||||||
$http_client->setDefaultOption('connect_timeout', 5);
|
'connect_timeout' => 5,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->application_key = $application_key;
|
$this->application_key = $application_key;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
# Copyright (c) 2013-2014, OVH SAS.
|
# Copyright (c) 2013-2016, OVH SAS.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -40,7 +40,6 @@ use Exception;
|
|||||||
*
|
*
|
||||||
* @package Ovh
|
* @package Ovh
|
||||||
* @category Exceptions
|
* @category Exceptions
|
||||||
* @author Vincent Cassé <vincent.casse@ovh.net>
|
|
||||||
*/
|
*/
|
||||||
class ApiException extends Exception
|
class ApiException extends Exception
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
# Copyright (c) 2013-2014, OVH SAS.
|
# Copyright (c) 2013-2016, OVH SAS.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -40,7 +40,6 @@ use Exception;
|
|||||||
*
|
*
|
||||||
* @package Ovh
|
* @package Ovh
|
||||||
* @category Exceptions
|
* @category Exceptions
|
||||||
* @author Vincent Cassé <vincent.casse@ovh.net>
|
|
||||||
*/
|
*/
|
||||||
class InvalidParameterException extends Exception
|
class InvalidParameterException extends Exception
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
# Copyright (c) 2013-2014, OVH SAS.
|
# Copyright (c) 2013-2016, OVH SAS.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -39,7 +39,6 @@ use Exception;
|
|||||||
*
|
*
|
||||||
* @package Ovh
|
* @package Ovh
|
||||||
* @category Exceptions
|
* @category Exceptions
|
||||||
* @author Vincent Cassé <vincent.casse@ovh.net>
|
|
||||||
*/
|
*/
|
||||||
class NotLoggedException extends Exception
|
class NotLoggedException extends Exception
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
# Copyright (c) 2013-2014, OVH SAS.
|
# Copyright (c) 2013-2016, OVH SAS.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -35,8 +35,6 @@ use Ovh\Api;
|
|||||||
*
|
*
|
||||||
* @package Ovh
|
* @package Ovh
|
||||||
* @category Ovh
|
* @category Ovh
|
||||||
* @author Vincent Cassé <vincent.casse@ovh.net>
|
|
||||||
* @author Thierry Goettelmann <thierry@byscripts.info>
|
|
||||||
*/
|
*/
|
||||||
class ApiFunctionalTest extends \PHPUnit_Framework_TestCase
|
class ApiFunctionalTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
# Copyright (c) 2013-2014, OVH SAS.
|
# Copyright (c) 2013-2016, OVH SAS.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -37,8 +37,6 @@ use Ovh\Api;
|
|||||||
*
|
*
|
||||||
* @package Ovh
|
* @package Ovh
|
||||||
* @category Ovh
|
* @category Ovh
|
||||||
* @author Vincent Cassé <vincent.casse@ovh.net>
|
|
||||||
* @author Thierry Goettelmann <thierry@byscripts.info>
|
|
||||||
*/
|
*/
|
||||||
class ApiTest extends \PHPUnit_Framework_TestCase
|
class ApiTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user