@barchart/events-client-js
Advanced tools
Comparing version 1.3.11 to 1.3.12
@@ -50,4 +50,3 @@ const FailureType = require('@barchart/common-js/api/failures/FailureType'); | ||
.then((gateway) => { | ||
return gateway.getReportAvailability('Validate credentials') | ||
.then(ignored => true) | ||
return gateway.getVersion() | ||
.catch((errors) => { | ||
@@ -57,4 +56,3 @@ const valid = !errors.some(error => FailureType.fromCode(FailureType, error.value.code) === FailureType.REQUEST_AUTHORIZATION_FAILURE); | ||
return valid; | ||
}) | ||
.then((valid) => { | ||
}).then((valid) => { | ||
this.connecting = false; | ||
@@ -61,0 +59,0 @@ |
@@ -116,3 +116,3 @@ const gulp = require('gulp'); | ||
return gulp.src(['./example/browser/example.css', './example/browser/example.event.html', './example/browser/example.event.js', './example/browser/example.report.html', './example/browser/example.report.js']) | ||
return gulp.src(['./example/browser/example.event.html', './example/browser/example.event.js', './example/browser/example.event.css', './example/browser/example.report.html', './example/browser/example.report.js', './example/browser/example.report.css',]) | ||
.pipe(rename((path) => { | ||
@@ -119,0 +119,0 @@ path.dirname = 'events-client-js'; |
@@ -88,2 +88,17 @@ const assert = require('@barchart/common-js/lang/assert'), | ||
.endpoint; | ||
this._getVersionEndpoint = EndpointBuilder.for('get-api-version', 'get API version') | ||
.withVerb(VerbType.GET) | ||
.withProtocol(protocolType) | ||
.withHost(host) | ||
.withPort(port) | ||
.withPathBuilder((pb) => { | ||
pb.withLiteralParameter('system', 'system') | ||
.withLiteralParameter('version', 'version'); | ||
}) | ||
.withBasicAuthentication(credentials.username, credentials.password) | ||
.withRequestInterceptor(RequestInterceptor.PLAIN_TEXT_RESPONSE) | ||
.withResponseInterceptor(responseInterceptorForGetReport) | ||
.withErrorInterceptor(ErrorInterceptor.GENERAL) | ||
.endpoint; | ||
} | ||
@@ -179,2 +194,17 @@ | ||
/** | ||
* Returns the server version. | ||
* | ||
* @public | ||
* @return {Promise<String>} | ||
*/ | ||
getVersion() { | ||
return Promise.resolve() | ||
.then(() => { | ||
checkStart.call(this); | ||
return Gateway.invoke(this._getVersionEndpoint, { }); | ||
}); | ||
} | ||
/** | ||
* Creates and starts a new {@link ReportGateway} for use in the staging environment. | ||
@@ -181,0 +211,0 @@ * |
@@ -5,4 +5,4 @@ module.exports = (() => { | ||
return { | ||
version: '1.3.11' | ||
version: '1.3.12' | ||
}; | ||
})(); |
{ | ||
"name": "@barchart/events-client-js", | ||
"version": "1.3.11", | ||
"version": "1.3.12", | ||
"description": "JavaScript library for interfacing with Barchart's Events API", | ||
@@ -14,2 +14,6 @@ "author": { | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://github.com/barchart/events-client-js.git" | ||
}, | ||
"dependencies": { | ||
@@ -16,0 +20,0 @@ "@barchart/common-js": "~3.3.0", |
# @barchart/events-client-js | ||
## JavaScript library for interfacing with Barchart's Events API | ||
## JavaScript SDK for interfacing with Barchart's Event Tracking System | ||
@@ -4,0 +4,0 @@ The Barchart Events System accepts HTTP requests, offering the following functionality: |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1329106
29883
57