Skip to content

Commit

Permalink
Merge pull request #70 from campaignmonitor/CMINT-44
Browse files Browse the repository at this point in the history
Version 5.1.3 - Extend API Call timeout from 10 to 20 sec
  • Loading branch information
catcher23 authored Apr 20, 2018
2 parents 490df68 + bf07098 commit e4e0c4b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# createsend-php history

## v5.1.3 - 15th May, 2017

* Changed local API timeout from 10 sec to 20 sec

## v5.1.2 - 15th May, 2017

* Added support for Behavioral Event data
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ $wrap = new CS_REST_General($auth);
$result = $wrap->get_clients();
var_dump($result->response);
```
## API Call Timeout
You can set your local API call timeout time in createsend-php\class\transport.php line 11, in the CS_REST_CALL_TIMEOUT variable. Currently the default is 20 secs.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion class/base_classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require_once dirname(__FILE__).'/transport.php';
require_once dirname(__FILE__).'/log.php';

defined('CS_REST_WRAPPER_VERSION') or define('CS_REST_WRAPPER_VERSION', '5.1.2');
defined('CS_REST_WRAPPER_VERSION') or define('CS_REST_WRAPPER_VERSION', '5.1.3');
defined('CS_HOST') or define('CS_HOST', 'api.createsend.com');
defined('CS_OAUTH_BASE_URI') or define('CS_OAUTH_BASE_URI', 'https://'.CS_HOST.'/oauth');
defined('CS_OAUTH_TOKEN_URI') or define('CS_OAUTH_TOKEN_URI', CS_OAUTH_BASE_URI.'/token');
Expand Down
4 changes: 2 additions & 2 deletions class/transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
defined('CS_REST_PUT') or define('CS_REST_PUT', 'PUT');
defined('CS_REST_DELETE') or define('CS_REST_DELETE', 'DELETE');
if (false === defined('CS_REST_SOCKET_TIMEOUT')) {
define('CS_REST_SOCKET_TIMEOUT', 10);
define('CS_REST_SOCKET_TIMEOUT', 20);
}
if (false === defined('CS_REST_CALL_TIMEOUT')) {
define('CS_REST_CALL_TIMEOUT', 10);
define('CS_REST_CALL_TIMEOUT', 20);
}

if(!function_exists("CS_REST_TRANSPORT_get_available")) {
Expand Down

0 comments on commit e4e0c4b

Please sign in to comment.