worldnewsapi
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -11,2 +11,3 @@ "use strict"; | ||
var _GetGeoCoordinates200Response = _interopRequireDefault(require("../model/GetGeoCoordinates200Response")); | ||
var _RetrieveNewsArticlesByIds200Response = _interopRequireDefault(require("../model/RetrieveNewsArticlesByIds200Response")); | ||
var _SearchNews200Response = _interopRequireDefault(require("../model/SearchNews200Response")); | ||
@@ -24,3 +25,3 @@ var _TopNews200Response = _interopRequireDefault(require("../model/TopNews200Response")); | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -36,3 +37,3 @@ * | ||
* @module api/NewsApi | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -62,3 +63,3 @@ var NewsApi = exports["default"] = /*#__PURE__*/function () { | ||
* Extract News | ||
* Extract a news article from a website to a well structure JSON object. The API will return the title, text, URL, image, publish date, author, language, source country, and sentiment of the news article. | ||
* Extract a news article from a website to a well structure JSON object. The API will return the title, text, URL, images, videos, publish date, authors, language, source country, and sentiment of the news article. | ||
* @param {String} url The url of the news. | ||
@@ -216,2 +217,38 @@ * @param {Boolean} analyze Whether to analyze the news (extract entities etc.) | ||
/** | ||
* Callback function to receive the result of the retrieveNewsArticlesByIds operation. | ||
* @callback module:api/NewsApi~retrieveNewsArticlesByIdsCallback | ||
* @param {String} error Error message, if any. | ||
* @param {module:model/RetrieveNewsArticlesByIds200Response} data The data returned by the service call. | ||
* @param {String} response The complete HTTP response. | ||
*/ | ||
/** | ||
* Retrieve News Articles by Ids | ||
* Retrieve information about one or more news articles by their ids. The ids can be retrieved from the search news or top news APIs. | ||
* @param {String} ids A comma separated list of news ids. | ||
* @param {module:api/NewsApi~retrieveNewsArticlesByIdsCallback} callback The callback function, accepting three arguments: error, data, response | ||
* data is of type: {@link module:model/RetrieveNewsArticlesByIds200Response} | ||
*/ | ||
}, { | ||
key: "retrieveNewsArticlesByIds", | ||
value: function retrieveNewsArticlesByIds(ids, callback) { | ||
var postBody = null; | ||
// verify the required parameter 'ids' is set | ||
if (ids === undefined || ids === null) { | ||
throw new Error("Missing the required parameter 'ids' when calling retrieveNewsArticlesByIds"); | ||
} | ||
var pathParams = {}; | ||
var queryParams = { | ||
'ids': ids | ||
}; | ||
var headerParams = {}; | ||
var formParams = {}; | ||
var authNames = ['apiKey', 'headerApiKey']; | ||
var contentTypes = []; | ||
var accepts = ['application/json']; | ||
var returnType = _RetrieveNewsArticlesByIds200Response["default"]; | ||
return this.apiClient.callApi('/retrieve-news', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback); | ||
} | ||
/** | ||
* Callback function to receive the result of the searchNews operation. | ||
@@ -228,3 +265,3 @@ * @callback module:api/NewsApi~searchNewsCallback | ||
* @param {Object} opts Optional parameters | ||
* @param {String} [text] The text to match in the news content (at least 3 characters). By default all query terms are expected, you can use an uppercase OR to search for any terms, e.g. tesla OR ford | ||
* @param {String} [text] The text to match in the news content (at least 3 characters, maximum 100 characters). By default all query terms are expected, you can use an uppercase OR to search for any terms, e.g. tesla OR ford | ||
* @param {String} [sourceCountries] A comma-separated list of ISO 3166 country codes from which the news should originate. | ||
@@ -231,0 +268,0 @@ * @param {String} [language] The ISO 6391 language code of the news. |
@@ -19,3 +19,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -30,3 +30,3 @@ * | ||
* @module ApiClient | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -79,3 +79,3 @@ /** | ||
this.defaultHeaders = { | ||
'User-Agent': 'OpenAPI-Generator/1.1.1/Javascript' | ||
'User-Agent': 'OpenAPI-Generator/1.2.0/Javascript' | ||
}; | ||
@@ -82,0 +82,0 @@ |
@@ -18,2 +18,14 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "ExtractNews200ResponseImagesInner", { | ||
enumerable: true, | ||
get: function get() { | ||
return _ExtractNews200ResponseImagesInner["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "ExtractNews200ResponseVideosInner", { | ||
enumerable: true, | ||
get: function get() { | ||
return _ExtractNews200ResponseVideosInner["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "ExtractNewsLinks200Response", { | ||
@@ -37,2 +49,14 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, "RetrieveNewsArticlesByIds200Response", { | ||
enumerable: true, | ||
get: function get() { | ||
return _RetrieveNewsArticlesByIds200Response["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "RetrieveNewsArticlesByIds200ResponseNewsInner", { | ||
enumerable: true, | ||
get: function get() { | ||
return _RetrieveNewsArticlesByIds200ResponseNewsInner["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "SearchNews200Response", { | ||
@@ -70,4 +94,8 @@ enumerable: true, | ||
var _ExtractNews200Response = _interopRequireDefault(require("./model/ExtractNews200Response")); | ||
var _ExtractNews200ResponseImagesInner = _interopRequireDefault(require("./model/ExtractNews200ResponseImagesInner")); | ||
var _ExtractNews200ResponseVideosInner = _interopRequireDefault(require("./model/ExtractNews200ResponseVideosInner")); | ||
var _ExtractNewsLinks200Response = _interopRequireDefault(require("./model/ExtractNewsLinks200Response")); | ||
var _GetGeoCoordinates200Response = _interopRequireDefault(require("./model/GetGeoCoordinates200Response")); | ||
var _RetrieveNewsArticlesByIds200Response = _interopRequireDefault(require("./model/RetrieveNewsArticlesByIds200Response")); | ||
var _RetrieveNewsArticlesByIds200ResponseNewsInner = _interopRequireDefault(require("./model/RetrieveNewsArticlesByIds200ResponseNewsInner")); | ||
var _SearchNews200Response = _interopRequireDefault(require("./model/SearchNews200Response")); | ||
@@ -74,0 +102,0 @@ var _SearchNews200ResponseNewsInner = _interopRequireDefault(require("./model/SearchNews200ResponseNewsInner")); |
@@ -8,4 +8,9 @@ "use strict"; | ||
var _ApiClient = _interopRequireDefault(require("../ApiClient")); | ||
var _ExtractNews200ResponseImagesInner = _interopRequireDefault(require("./ExtractNews200ResponseImagesInner")); | ||
var _ExtractNews200ResponseVideosInner = _interopRequireDefault(require("./ExtractNews200ResponseVideosInner")); | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } | ||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } | ||
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } | ||
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | ||
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | ||
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } | ||
@@ -19,3 +24,3 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -31,3 +36,3 @@ * | ||
* @module model/ExtractNews200Response | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -77,2 +82,11 @@ var ExtractNews200Response = /*#__PURE__*/function () { | ||
} | ||
if (data.hasOwnProperty('images')) { | ||
obj['images'] = _ApiClient["default"].convertToType(data['images'], [_ExtractNews200ResponseImagesInner["default"]]); | ||
} | ||
if (data.hasOwnProperty('video')) { | ||
obj['video'] = _ApiClient["default"].convertToType(data['video'], 'String'); | ||
} | ||
if (data.hasOwnProperty('videos')) { | ||
obj['videos'] = _ApiClient["default"].convertToType(data['videos'], [_ExtractNews200ResponseVideosInner["default"]]); | ||
} | ||
if (data.hasOwnProperty('publish_date')) { | ||
@@ -84,11 +98,8 @@ obj['publish_date'] = _ApiClient["default"].convertToType(data['publish_date'], 'String'); | ||
} | ||
if (data.hasOwnProperty('authors')) { | ||
obj['authors'] = _ApiClient["default"].convertToType(data['authors'], ['String']); | ||
} | ||
if (data.hasOwnProperty('language')) { | ||
obj['language'] = _ApiClient["default"].convertToType(data['language'], 'String'); | ||
} | ||
if (data.hasOwnProperty('source_country')) { | ||
obj['source_country'] = _ApiClient["default"].convertToType(data['source_country'], 'String'); | ||
} | ||
if (data.hasOwnProperty('sentiment')) { | ||
obj['sentiment'] = _ApiClient["default"].convertToType(data['sentiment'], 'Number'); | ||
} | ||
} | ||
@@ -122,3 +133,49 @@ return obj; | ||
} | ||
if (data['images']) { | ||
// data not null | ||
// ensure the json data is an array | ||
if (!Array.isArray(data['images'])) { | ||
throw new Error("Expected the field `images` to be an array in the JSON data but got " + data['images']); | ||
} | ||
// validate the optional field `images` (array) | ||
var _iterator = _createForOfIteratorHelper(data['images']), | ||
_step; | ||
try { | ||
for (_iterator.s(); !(_step = _iterator.n()).done;) { | ||
var item = _step.value; | ||
_ExtractNews200ResponseImagesInner["default"].validateJSON(item); | ||
} | ||
} catch (err) { | ||
_iterator.e(err); | ||
} finally { | ||
_iterator.f(); | ||
} | ||
; | ||
} | ||
// ensure the json data is a string | ||
if (data['video'] && !(typeof data['video'] === 'string' || data['video'] instanceof String)) { | ||
throw new Error("Expected the field `video` to be a primitive type in the JSON string but got " + data['video']); | ||
} | ||
if (data['videos']) { | ||
// data not null | ||
// ensure the json data is an array | ||
if (!Array.isArray(data['videos'])) { | ||
throw new Error("Expected the field `videos` to be an array in the JSON data but got " + data['videos']); | ||
} | ||
// validate the optional field `videos` (array) | ||
var _iterator2 = _createForOfIteratorHelper(data['videos']), | ||
_step2; | ||
try { | ||
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { | ||
var _item = _step2.value; | ||
_ExtractNews200ResponseVideosInner["default"].validateJSON(_item); | ||
} | ||
} catch (err) { | ||
_iterator2.e(err); | ||
} finally { | ||
_iterator2.f(); | ||
} | ||
; | ||
} | ||
// ensure the json data is a string | ||
if (data['publish_date'] && !(typeof data['publish_date'] === 'string' || data['publish_date'] instanceof String)) { | ||
@@ -131,2 +188,6 @@ throw new Error("Expected the field `publish_date` to be a primitive type in the JSON string but got " + data['publish_date']); | ||
} | ||
// ensure the json data is an array | ||
if (!Array.isArray(data['authors'])) { | ||
throw new Error("Expected the field `authors` to be an array in the JSON data but got " + data['authors']); | ||
} | ||
// ensure the json data is a string | ||
@@ -136,6 +197,2 @@ if (data['language'] && !(typeof data['language'] === 'string' || data['language'] instanceof String)) { | ||
} | ||
// ensure the json data is a string | ||
if (data['source_country'] && !(typeof data['source_country'] === 'string' || data['source_country'] instanceof String)) { | ||
throw new Error("Expected the field `source_country` to be a primitive type in the JSON string but got " + data['source_country']); | ||
} | ||
return true; | ||
@@ -166,2 +223,17 @@ } | ||
/** | ||
* @member {Array.<module:model/ExtractNews200ResponseImagesInner>} images | ||
*/ | ||
ExtractNews200Response.prototype['images'] = undefined; | ||
/** | ||
* @member {String} video | ||
*/ | ||
ExtractNews200Response.prototype['video'] = undefined; | ||
/** | ||
* @member {Array.<module:model/ExtractNews200ResponseVideosInner>} videos | ||
*/ | ||
ExtractNews200Response.prototype['videos'] = undefined; | ||
/** | ||
* @member {String} publish_date | ||
@@ -177,15 +249,10 @@ */ | ||
/** | ||
* @member {String} language | ||
* @member {Array.<String>} authors | ||
*/ | ||
ExtractNews200Response.prototype['language'] = undefined; | ||
ExtractNews200Response.prototype['authors'] = undefined; | ||
/** | ||
* @member {String} source_country | ||
* @member {String} language | ||
*/ | ||
ExtractNews200Response.prototype['source_country'] = undefined; | ||
/** | ||
* @member {Number} sentiment | ||
*/ | ||
ExtractNews200Response.prototype['sentiment'] = undefined; | ||
ExtractNews200Response.prototype['language'] = undefined; | ||
var _default = exports["default"] = ExtractNews200Response; |
@@ -18,3 +18,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -30,3 +30,3 @@ * | ||
* @module model/ExtractNewsLinks200Response | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -33,0 +33,0 @@ var ExtractNewsLinks200Response = /*#__PURE__*/function () { |
@@ -18,3 +18,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -30,3 +30,3 @@ * | ||
* @module model/GetGeoCoordinates200Response | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -33,0 +33,0 @@ var GetGeoCoordinates200Response = /*#__PURE__*/function () { |
@@ -22,3 +22,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -34,3 +34,3 @@ * | ||
* @module model/SearchNews200Response | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -37,0 +37,0 @@ var SearchNews200Response = /*#__PURE__*/function () { |
@@ -18,3 +18,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -30,3 +30,3 @@ * | ||
* @module model/SearchNews200ResponseNewsInner | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -73,4 +73,4 @@ var SearchNews200ResponseNewsInner = /*#__PURE__*/function () { | ||
} | ||
if (data.hasOwnProperty('source_country')) { | ||
obj['source_country'] = _ApiClient["default"].convertToType(data['source_country'], 'String'); | ||
if (data.hasOwnProperty('author')) { | ||
obj['author'] = _ApiClient["default"].convertToType(data['author'], 'String'); | ||
} | ||
@@ -80,2 +80,14 @@ if (data.hasOwnProperty('language')) { | ||
} | ||
if (data.hasOwnProperty('video')) { | ||
obj['video'] = _ApiClient["default"].convertToType(data['video'], 'String'); | ||
} | ||
if (data.hasOwnProperty('title')) { | ||
obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String'); | ||
} | ||
if (data.hasOwnProperty('url')) { | ||
obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String'); | ||
} | ||
if (data.hasOwnProperty('source_country')) { | ||
obj['source_country'] = _ApiClient["default"].convertToType(data['source_country'], 'String'); | ||
} | ||
if (data.hasOwnProperty('id')) { | ||
@@ -87,11 +99,5 @@ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number'); | ||
} | ||
if (data.hasOwnProperty('title')) { | ||
obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String'); | ||
} | ||
if (data.hasOwnProperty('publish_date')) { | ||
obj['publish_date'] = _ApiClient["default"].convertToType(data['publish_date'], 'String'); | ||
} | ||
if (data.hasOwnProperty('url')) { | ||
obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String'); | ||
} | ||
if (data.hasOwnProperty('authors')) { | ||
@@ -121,4 +127,4 @@ obj['authors'] = _ApiClient["default"].convertToType(data['authors'], ['String']); | ||
// ensure the json data is a string | ||
if (data['source_country'] && !(typeof data['source_country'] === 'string' || data['source_country'] instanceof String)) { | ||
throw new Error("Expected the field `source_country` to be a primitive type in the JSON string but got " + data['source_country']); | ||
if (data['author'] && !(typeof data['author'] === 'string' || data['author'] instanceof String)) { | ||
throw new Error("Expected the field `author` to be a primitive type in the JSON string but got " + data['author']); | ||
} | ||
@@ -130,4 +136,4 @@ // ensure the json data is a string | ||
// ensure the json data is a string | ||
if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { | ||
throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); | ||
if (data['video'] && !(typeof data['video'] === 'string' || data['video'] instanceof String)) { | ||
throw new Error("Expected the field `video` to be a primitive type in the JSON string but got " + data['video']); | ||
} | ||
@@ -139,9 +145,17 @@ // ensure the json data is a string | ||
// ensure the json data is a string | ||
if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { | ||
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); | ||
} | ||
// ensure the json data is a string | ||
if (data['source_country'] && !(typeof data['source_country'] === 'string' || data['source_country'] instanceof String)) { | ||
throw new Error("Expected the field `source_country` to be a primitive type in the JSON string but got " + data['source_country']); | ||
} | ||
// ensure the json data is a string | ||
if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { | ||
throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); | ||
} | ||
// ensure the json data is a string | ||
if (data['publish_date'] && !(typeof data['publish_date'] === 'string' || data['publish_date'] instanceof String)) { | ||
throw new Error("Expected the field `publish_date` to be a primitive type in the JSON string but got " + data['publish_date']); | ||
} | ||
// ensure the json data is a string | ||
if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { | ||
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); | ||
} | ||
// ensure the json data is an array | ||
@@ -171,5 +185,5 @@ if (!Array.isArray(data['authors'])) { | ||
/** | ||
* @member {String} source_country | ||
* @member {String} author | ||
*/ | ||
SearchNews200ResponseNewsInner.prototype['source_country'] = undefined; | ||
SearchNews200ResponseNewsInner.prototype['author'] = undefined; | ||
@@ -182,2 +196,22 @@ /** | ||
/** | ||
* @member {String} video | ||
*/ | ||
SearchNews200ResponseNewsInner.prototype['video'] = undefined; | ||
/** | ||
* @member {String} title | ||
*/ | ||
SearchNews200ResponseNewsInner.prototype['title'] = undefined; | ||
/** | ||
* @member {String} url | ||
*/ | ||
SearchNews200ResponseNewsInner.prototype['url'] = undefined; | ||
/** | ||
* @member {String} source_country | ||
*/ | ||
SearchNews200ResponseNewsInner.prototype['source_country'] = undefined; | ||
/** | ||
* @member {Number} id | ||
@@ -193,7 +227,2 @@ */ | ||
/** | ||
* @member {String} title | ||
*/ | ||
SearchNews200ResponseNewsInner.prototype['title'] = undefined; | ||
/** | ||
* @member {String} publish_date | ||
@@ -204,7 +233,2 @@ */ | ||
/** | ||
* @member {String} url | ||
*/ | ||
SearchNews200ResponseNewsInner.prototype['url'] = undefined; | ||
/** | ||
* @member {Array.<String>} authors | ||
@@ -211,0 +235,0 @@ */ |
@@ -22,3 +22,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -34,3 +34,3 @@ * | ||
* @module model/TopNews200Response | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -37,0 +37,0 @@ var TopNews200Response = /*#__PURE__*/function () { |
@@ -22,3 +22,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -34,3 +34,3 @@ * | ||
* @module model/TopNews200ResponseTopNewsInner | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -37,0 +37,0 @@ var TopNews200ResponseTopNewsInner = /*#__PURE__*/function () { |
@@ -18,3 +18,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.1.1 | ||
* The version of the OpenAPI document: 1.2.0 | ||
* Contact: mail@worldnewsapi.com | ||
@@ -30,3 +30,3 @@ * | ||
* @module model/TopNews200ResponseTopNewsInnerNewsInner | ||
* @version 1.1.1 | ||
* @version 1.2.0 | ||
*/ | ||
@@ -70,2 +70,5 @@ var TopNews200ResponseTopNewsInnerNewsInner = /*#__PURE__*/function () { | ||
} | ||
if (data.hasOwnProperty('author')) { | ||
obj['author'] = _ApiClient["default"].convertToType(data['author'], 'String'); | ||
} | ||
if (data.hasOwnProperty('id')) { | ||
@@ -110,2 +113,6 @@ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number'); | ||
// ensure the json data is a string | ||
if (data['author'] && !(typeof data['author'] === 'string' || data['author'] instanceof String)) { | ||
throw new Error("Expected the field `author` to be a primitive type in the JSON string but got " + data['author']); | ||
} | ||
// ensure the json data is a string | ||
if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { | ||
@@ -145,2 +152,7 @@ throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); | ||
/** | ||
* @member {String} author | ||
*/ | ||
TopNews200ResponseTopNewsInnerNewsInner.prototype['author'] = undefined; | ||
/** | ||
* @member {Number} id | ||
@@ -147,0 +159,0 @@ */ |
{ | ||
"name": "worldnewsapi", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "The world's news wrapped into a single API.", | ||
@@ -5,0 +5,0 @@ "license": "Unlicense", |
@@ -7,4 +7,4 @@ # worldnewsapi | ||
- API version: 1.1.1 | ||
- Package version: 1.1.1 | ||
- API version: 1.2.0 | ||
- Package version: 1.2.0 | ||
- Generator version: 7.5.0 | ||
@@ -141,2 +141,3 @@ - Build package: org.openapitools.codegen.languages.JavascriptClientCodegen | ||
*Worldnewsapi.NewsApi* | [**newsWebsiteToRSSFeed**](docs/NewsApi.md#newsWebsiteToRSSFeed) | **GET** /feed.rss | News Website to RSS Feed | ||
*Worldnewsapi.NewsApi* | [**retrieveNewsArticlesByIds**](docs/NewsApi.md#retrieveNewsArticlesByIds) | **GET** /retrieve-news | Retrieve News Articles by Ids | ||
*Worldnewsapi.NewsApi* | [**searchNews**](docs/NewsApi.md#searchNews) | **GET** /search-news | Search News | ||
@@ -149,4 +150,8 @@ *Worldnewsapi.NewsApi* | [**topNews**](docs/NewsApi.md#topNews) | **GET** /top-news | Top News | ||
- [Worldnewsapi.ExtractNews200Response](docs/ExtractNews200Response.md) | ||
- [Worldnewsapi.ExtractNews200ResponseImagesInner](docs/ExtractNews200ResponseImagesInner.md) | ||
- [Worldnewsapi.ExtractNews200ResponseVideosInner](docs/ExtractNews200ResponseVideosInner.md) | ||
- [Worldnewsapi.ExtractNewsLinks200Response](docs/ExtractNewsLinks200Response.md) | ||
- [Worldnewsapi.GetGeoCoordinates200Response](docs/GetGeoCoordinates200Response.md) | ||
- [Worldnewsapi.RetrieveNewsArticlesByIds200Response](docs/RetrieveNewsArticlesByIds200Response.md) | ||
- [Worldnewsapi.RetrieveNewsArticlesByIds200ResponseNewsInner](docs/RetrieveNewsArticlesByIds200ResponseNewsInner.md) | ||
- [Worldnewsapi.SearchNews200Response](docs/SearchNews200Response.md) | ||
@@ -153,0 +158,0 @@ - [Worldnewsapi.SearchNews200ResponseNewsInner](docs/SearchNews200ResponseNewsInner.md) |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
145967
17
2839
179
0