Commit 301212f3 authored by Evgeniy Zaitsev's avatar Evgeniy Zaitsev
Browse files

v0.0.14

parent 11d873ad
...@@ -53,45 +53,45 @@ class SDK { ...@@ -53,45 +53,45 @@ class SDK {
} }
fetchPrivateListings(feedEndpoint, projectFeedUUID) { fetchPrivateListings(feedEndpoint, projectFeedUUID) {
this.logger.log('fetch private listings', feedEndpoint, projectFeedUUID); this.logger.log(__filename, 'fetch private listings', feedEndpoint, projectFeedUUID);
return this._fetchPrivateFeed('privateListings', feedEndpoint, projectFeedUUID); return this._fetchPrivateFeed('privateListings', feedEndpoint, projectFeedUUID);
} }
fetchPrivateLatestResultsByEventFeedUUID(feedEndpoint, eventFeedUUID) { fetchPrivateLatestResultsByEventFeedUUID(feedEndpoint, eventFeedUUID) {
this.logger.log('fetch private latest result by event feed uuid', feedEndpoint, eventFeedUUID); this.logger.log(__filename, 'fetch private latest result by event feed uuid', feedEndpoint, eventFeedUUID);
return this._fetchPrivateFeed('privateLatestResults', feedEndpoint, eventFeedUUID); return this._fetchPrivateFeed('privateLatestResults', feedEndpoint, eventFeedUUID);
} }
fetchPrivateAllPublishedElementsByEventFeedUUID(feedEndpoint, eventFeedUUID) { fetchPrivateAllPublishedElementsByEventFeedUUID(feedEndpoint, eventFeedUUID) {
this.logger.log('fetch private all publish elements by event feed uuid', feedEndpoint, eventFeedUUID); this.logger.log(__filename, 'fetch private all publish elements by event feed uuid', feedEndpoint, eventFeedUUID);
return this._fetchPrivateFeed('privateAllPublishedElements', feedEndpoint, eventFeedUUID); return this._fetchPrivateFeed('privateAllPublishedElements', feedEndpoint, eventFeedUUID);
} }
fetchPrivateAllElementsByEventFeedUUID(feedEndpoint, eventFeedUUID) { fetchPrivateAllElementsByEventFeedUUID(feedEndpoint, eventFeedUUID) {
this.logger.log('fetch private all elements by event feed uuid', feedEndpoint, eventFeedUUID); this.logger.log(__filename, 'fetch private all elements by event feed uuid', feedEndpoint, eventFeedUUID);
return this._fetchPrivateFeed('privateAllElements', feedEndpoint, eventFeedUUID); return this._fetchPrivateFeed('privateAllElements', feedEndpoint, eventFeedUUID);
} }
fetchPrivateLatestResultsByEventId(feedEndpoint, projectFeedUUID, eventId) { fetchPrivateLatestResultsByEventId(feedEndpoint, projectFeedUUID, eventId) {
this.logger.log('fetch private latest result by event uuid', feedEndpoint, eventId); this.logger.log(__filename, 'fetch private latest result by event uuid', feedEndpoint, eventId);
return this._fetchPrivateListingsAndGetEventFeedUUID(feedEndpoint, projectFeedUUID, eventId) return this._fetchPrivateListingsAndGetEventFeedUUID(feedEndpoint, projectFeedUUID, eventId)
.then(eventFeedUUID => this.fetchPrivateLatestResultsByEventFeedUUID(feedEndpoint, eventFeedUUID)); .then(eventFeedUUID => this.fetchPrivateLatestResultsByEventFeedUUID(feedEndpoint, eventFeedUUID));
} }
fetchPrivateAllPublishedElementsByEventId(feedEndpoint, projectFeedUUID, eventId) { fetchPrivateAllPublishedElementsByEventId(feedEndpoint, projectFeedUUID, eventId) {
this.logger.log('fetch private all publish elements by event uuid', feedEndpoint, eventId); this.logger.log(__filename, 'fetch private all publish elements by event uuid', feedEndpoint, eventId);
return this._fetchPrivateListingsAndGetEventFeedUUID(feedEndpoint, projectFeedUUID, eventId) return this._fetchPrivateListingsAndGetEventFeedUUID(feedEndpoint, projectFeedUUID, eventId)
.then(eventFeedUUID => this.fetchPrivateAllPublishedElementsByEventFeedUUID(feedEndpoint, eventFeedUUID)); .then(eventFeedUUID => this.fetchPrivateAllPublishedElementsByEventFeedUUID(feedEndpoint, eventFeedUUID));
} }
fetchPrivateAllElementsByEventId(feedEndpoint, projectFeedUUID, eventId) { fetchPrivateAllElementsByEventId(feedEndpoint, projectFeedUUID, eventId) {
this.logger.log('fetch private all elements by event uuid', feedEndpoint, eventId); this.logger.log(__filename, 'fetch private all elements by event uuid', feedEndpoint, eventId);
return this._fetchPrivateListingsAndGetEventFeedUUID(feedEndpoint, projectFeedUUID, eventId) return this._fetchPrivateListingsAndGetEventFeedUUID(feedEndpoint, projectFeedUUID, eventId)
.then(eventFeedUUID => this.fetchPrivateAllElementsByEventFeedUUID(feedEndpoint, eventFeedUUID)); .then(eventFeedUUID => this.fetchPrivateAllElementsByEventFeedUUID(feedEndpoint, eventFeedUUID));
...@@ -129,7 +129,7 @@ class SDK { ...@@ -129,7 +129,7 @@ class SDK {
_fetchPrivateFeed(feedName, feedEndpoint, feedUUID) { _fetchPrivateFeed(feedName, feedEndpoint, feedUUID) {
const url = lvisEndpoints[feedName](feedEndpoint, this.config.feedVersion, feedUUID); const url = lvisEndpoints[feedName](feedEndpoint, this.config.feedVersion, feedUUID);
this.logger.log('fetch private feed', url); this.logger.log(__filename, 'fetch private feed', url);
return fetch(url).then(res => res.json()); return fetch(url).then(res => res.json());
} }
......
...@@ -2,7 +2,7 @@ const parse = require('co-body'); ...@@ -2,7 +2,7 @@ const parse = require('co-body');
function * bodyParser(next) { function * bodyParser(next) {
this.request.bodyRow = yield parse.text(this.request); this.request.bodyRow = yield parse.text(this.request);
try { try {
this.request.body = JSON.parse(this.request.bodyRow); this.request.body = JSON.parse(this.request.bodyRow);
} catch (e) { } catch (e) {
...@@ -13,3 +13,4 @@ function * bodyParser(next) { ...@@ -13,3 +13,4 @@ function * bodyParser(next) {
} }
module.exports = bodyParser; module.exports = bodyParser;
{ {
"name": "service-sdk", "name": "service-sdk",
"version": "0.0.13", "version": "0.0.14",
"private": true, "private": true,
"description": "Service SDK for LViS", "description": "Service SDK for LViS",
"keywords": [], "keywords": [],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment