- updated Gulp build dependencies

- increased CREST timeout from 3s -> 4s
- added "Accept" Headers for some CREST endpoints
This commit is contained in:
Exodus4D
2016-05-17 18:40:52 +02:00
parent 52fd8cb8b7
commit 99602de732
2 changed files with 20 additions and 18 deletions

View File

@@ -23,7 +23,7 @@ class Sso extends Api\User{
/**
* @var int timeout (seconds) for API calls
*/
const CREST_TIMEOUT = 3;
const CREST_TIMEOUT = 4;
/**
* @var int expire time (seconds) for an valid "accessToken"
@@ -478,7 +478,7 @@ class Sso extends Api\User{
*/
protected function getEndpoints($accessToken = '', $additionalOptions = []){
$crestUrl = self::getCrestEndpoint();
$additionalOptions['contentType'] = 'application/vnd.ccp.eve.Api-v3+json';
$additionalOptions['accept'] = 'application/vnd.ccp.eve.Api-v3+json';
$endpoint = $this->getEndpoint($crestUrl, $accessToken, $additionalOptions);
return $endpoint;
@@ -513,8 +513,8 @@ class Sso extends Api\User{
// if specific contentType is required -> add it to request header
// CREST versioning can be done by calling different "Accept:" Headers
if( isset($additionalOptions['contentType']) ){
$requestOptions['header'][] = 'Accept: ' . $additionalOptions['contentType'];
if( isset($additionalOptions['accept']) ){
$requestOptions['header'][] = 'Accept: ' . $additionalOptions['accept'];
}
$apiResponse = Lib\Web::instance()->request($resourceUrl, $requestOptions, $additionalOptions);
@@ -622,6 +622,7 @@ class Sso extends Api\User{
if( !$this->getF3()->exists($cacheKey) ){
$endpoints = $this->getEndpoints($accessToken, $additionalOptions);
$additionalOptions['accept'] = 'application/vnd.ccp.eve.CharacterLocation-v1+json';
$endpoint = $this->walkEndpoint($endpoints, $accessToken, [
'decode',
'character',

View File

@@ -7,24 +7,25 @@
"description": "Pathfinder is a system mapping tool for EVE ONLINE",
"main": "index.php",
"dependencies": {
"requirejs": "^2.1.20"
},
"devDependencies": {
"critical": "^0.7.0",
"gulp": "^3.9.0",
"gulp-clean": "^0.3.1",
"gulp-gzip": "^1.2.0",
"gulp-if": "^2.0.0",
"gulp-jshint": "^1.11.2",
"gulp-notify": "^2.2.0",
"gulp-param": "^0.6.3",
"gulp-plumber": "^1.0.1",
"jshint": "^2.9.1-rc1",
"jshint-stylish": "^2.0.1",
"run-sequence": "^1.1.2"
"critical": "^0.x",
"gulp": "^3.9.x",
"gulp-clean": "^0.3.x",
"gulp-gzip": "^1.x.x",
"gulp-if": "^2.0.x",
"gulp-jshint": "^2.0.x",
"gulp-notify": "^2.2.x",
"gulp-param": "^1.0.x",
"gulp-plumber": "^1.x.x",
"jshint": "^2.9.x",
"jshint-stylish": "^2.x.x",
"requirejs": "^2.x.x",
"run-sequence": "^1.1.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"gulp": "gulp"
},
"repository": {
"type": "git",