UNPKG

32.1 kBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///fcp-client.min.js","webpack:///webpack/bootstrap 43f7030146125a00556b","webpack:///./src/client.js","webpack:///./src/index.js","webpack:///./src/content-insights-client.js","webpack:///./src/influencers-client.js","webpack:///external \"request-promise-native\""],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_4__","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_defineProperty","obj","key","writable","_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","length","descriptor","protoProps","staticProps","_requestPromiseNative","_requestPromiseNative2","default","FCPClient","manageTokens","_ref","host","tenantID","tokenName","tokenConfig","agentConfig","_name","tokens","kio","scope","path","parameters","uri","qs","headers","getAuthHeaders","agentOptions","resolveWithFullResponse","simple","body","json","token","Error","Authorization","X-Tenant-ID","Content-Type","_interopRequireDefault","_contentInsightsClient","_contentInsightsClient2","_influencersClient","_influencersClient2","InfluencersClient","ContentInsightsClient","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","setPrototypeOf","__proto__","_client","_client2","_FCPClient","getPrototypeOf","apply","arguments","query","start","end","_ref$limit","limit","undefined","_ref$offset","offset","domain","sort","_ref$normalizeEntitie","normalizeEntities","q","_ref2","_ref2$limit","_ref2$offset","window","_ref2$normalizeEntiti","_ref3","_parameters3","_ref3$normalizeEntiti","_ref3$includeTimeseri","includeTimeseries","_ref4","_ref4$limit","_ref4$offset","_ref4$normalizeEntiti","id","_ref5","_ref5$normalizeEntiti","post"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,2BACA,kBAAAC,gBAAAC,IACAD,OAAA,wCAAAJ,GACA,gBAAAC,SACAA,QAAA,cAAAD,EAAAG,QAA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AOA,EAAIR,WAAaQ,GAAQiB,QAASjB,IAFjD+D,GKrWhCZ,EL+WkB,SAAUc,GAGhC,QAASd,KAGP,MAFAhD,GAAgBjC,KAAMiF,GAEfE,EAA2BnF,MAAOiF,EAAkBW,WAAa5E,OAAOgF,eAAef,IAAoBgB,MAAMjG,KAAMkG,YAYhI,MAjBAZ,GAAUL,EAAmBc,GAQ7B1D,EAAa4C,IACXlD,IAAK,SACLpB,MAAO,SAAgBuC,GKzXP,GAATiD,GAASjD,EAATiD,KACP,OAAOnG,MAAKiI,KAAK,sBAAuB9B,OL+XnClB,GACPa,EAAS/C,QAEXpD,GAAQoD,QK9XOkC,EL+XfrF,EAAOD,QAAUA,EAAiB,SAI5B,SAAUC,EAAQD,GM3YxBC,EAAAD,QAAAM,GNiZM,SAAUL,EAAQD,EAASQ,GAEjCP,EAAOD,QAAUQ,EAAoB","file":"fcp-client.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"request-promise-native\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"fcp-client\", [\"request-promise-native\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"fcp-client\"] = factory(require(\"request-promise-native\"));\n\telse\n\t\troot[\"fcp-client\"] = factory(root[\"request-promise-native\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_4__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"request-promise-native\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"fcp-client\", [\"request-promise-native\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"fcp-client\"] = factory(require(\"request-promise-native\"));\n\telse\n\t\troot[\"fcp-client\"] = factory(root[\"request-promise-native\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_4__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _requestPromiseNative = __webpack_require__(4);\n\nvar _requestPromiseNative2 = _interopRequireDefault(_requestPromiseNative);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar FCPClient = function () {\n function FCPClient(manageTokens, _ref) {\n var host = _ref.host,\n tenantID = _ref.tenantID,\n tokenName = _ref.tokenName,\n tokenConfig = _ref.tokenConfig,\n agentConfig = _ref.agentConfig;\n\n _classCallCheck(this, FCPClient);\n\n this._name = 'FCP_SDK';\n this.host = host;\n this.tenantID = tenantID;\n this.tokenName = tokenName || 'mint';\n this.agentConfig = agentConfig || {};\n this.tokens = manageTokens(_defineProperty({\n 'kio': { scope: ['uid'] }\n }, tokenName, { scope: ['uid'] }), tokenConfig);\n }\n\n _createClass(FCPClient, [{\n key: 'get',\n value: function get(path, parameters) {\n return (0, _requestPromiseNative2.default)({\n uri: this.host + path,\n qs: parameters,\n headers: this.getAuthHeaders(this.tokenName),\n agentOptions: this.agentConfig,\n resolveWithFullResponse: true,\n simple: false\n });\n }\n }, {\n key: 'post',\n value: function post(path, body) {\n return (0, _requestPromiseNative2.default)({\n uri: this.host + path,\n headers: this.getAuthHeaders(this.tokenName),\n agentOptions: this.agentConfig,\n resolveWithFullResponse: true,\n body: body,\n json: true,\n simple: false\n });\n }\n }, {\n key: 'getAuthHeaders',\n value: function getAuthHeaders() {\n var token = this.tokens.get(this.tokenName);\n\n if (!token) {\n throw Error('Could not get a token for: ' + this.tokenName);\n }\n\n return {\n 'Authorization': 'Bearer ' + token,\n 'X-Tenant-ID': this.tenantID,\n 'Content-Type': 'application/json'\n };\n }\n }]);\n\n return FCPClient;\n}();\n\nexports.default = FCPClient;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _contentInsightsClient = __webpack_require__(2);\n\nvar _contentInsightsClient2 = _interopRequireDefault(_contentInsightsClient);\n\nvar _influencersClient = __webpack_require__(3);\n\nvar _influencersClient2 = _interopRequireDefault(_influencersClient);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n InfluencersClient: _influencersClient2.default,\n ContentInsightsClient: _contentInsightsClient2.default\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _client = __webpack_require__(0);\n\nvar _client2 = _interopRequireDefault(_client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DEFAULT_LIMIT = 100;\nvar DEFAULT_OFFSET = 0;\n\nvar ContentInsightsClient = function (_FCPClient) {\n _inherits(ContentInsightsClient, _FCPClient);\n\n function ContentInsightsClient() {\n _classCallCheck(this, ContentInsightsClient);\n\n return _possibleConstructorReturn(this, (ContentInsightsClient.__proto__ || Object.getPrototypeOf(ContentInsightsClient)).apply(this, arguments));\n }\n\n _createClass(ContentInsightsClient, [{\n key: 'search',\n value: function search(_ref) {\n var query = _ref.query,\n start = _ref.start,\n end = _ref.end,\n _ref$limit = _ref.limit,\n limit = _ref$limit === undefined ? DEFAULT_LIMIT : _ref$limit,\n _ref$offset = _ref.offset,\n offset = _ref$offset === undefined ? DEFAULT_OFFSET : _ref$offset,\n domain = _ref.domain,\n sort = _ref.sort,\n _ref$normalizeEntitie = _ref.normalizeEntities,\n normalizeEntities = _ref$normalizeEntitie === undefined ? true : _ref$normalizeEntitie;\n\n\n var parameters = _defineProperty({\n q: query,\n start: start,\n end: end,\n limit: limit,\n offset: offset,\n domain: domain,\n sort: sort\n }, 'normalize_entities', normalizeEntities);\n\n return this.get('/content/search', parameters);\n }\n }, {\n key: 'timeseries',\n value: function timeseries(_ref2) {\n var query = _ref2.query,\n start = _ref2.start,\n end = _ref2.end,\n _ref2$limit = _ref2.limit,\n limit = _ref2$limit === undefined ? DEFAULT_LIMIT : _ref2$limit,\n _ref2$offset = _ref2.offset,\n offset = _ref2$offset === undefined ? DEFAULT_OFFSET : _ref2$offset,\n domain = _ref2.domain,\n sort = _ref2.sort,\n window = _ref2.window,\n _ref2$normalizeEntiti = _ref2.normalizeEntities,\n normalizeEntities = _ref2$normalizeEntiti === undefined ? true : _ref2$normalizeEntiti;\n\n\n var parameters = _defineProperty({\n q: query,\n start: start,\n end: end,\n limit: limit,\n offset: offset,\n domain: domain,\n sort: sort,\n window: window\n }, 'normalize_entities', normalizeEntities);\n\n return this.get('/content/timeseries', parameters);\n }\n }, {\n key: 'trends',\n value: function trends(_ref3) {\n var _parameters3;\n\n var _ref3$normalizeEntiti = _ref3.normalizeEntities,\n normalizeEntities = _ref3$normalizeEntiti === undefined ? true : _ref3$normalizeEntiti,\n _ref3$includeTimeseri = _ref3.includeTimeseries,\n includeTimeseries = _ref3$includeTimeseri === undefined ? false : _ref3$includeTimeseri;\n\n var parameters = (_parameters3 = {}, _defineProperty(_parameters3, 'normalize_entities', normalizeEntities), _defineProperty(_parameters3, 'include_timeseries', includeTimeseries), _parameters3);\n\n return this.get('/content/trends', parameters);\n }\n }, {\n key: 'latest',\n value: function latest(_ref4) {\n var _ref4$limit = _ref4.limit,\n limit = _ref4$limit === undefined ? DEFAULT_LIMIT : _ref4$limit,\n _ref4$offset = _ref4.offset,\n offset = _ref4$offset === undefined ? DEFAULT_OFFSET : _ref4$offset,\n domain = _ref4.domain,\n _ref4$normalizeEntiti = _ref4.normalizeEntities,\n normalizeEntities = _ref4$normalizeEntiti === undefined ? true : _ref4$normalizeEntiti;\n\n var parameters = _defineProperty({\n limit: limit,\n offset: offset,\n domain: domain\n }, 'normalize_entities', normalizeEntities);\n\n return this.get('/content/latest', parameters);\n }\n }, {\n key: 'article',\n value: function article(id, _ref5) {\n var _ref5$normalizeEntiti = _ref5.normalizeEntities,\n normalizeEntities = _ref5$normalizeEntiti === undefined ? true : _ref5$normalizeEntiti;\n\n var parameters = _defineProperty({}, 'normalize_entities', normalizeEntities);\n\n return this.get('/content/' + id, parameters);\n }\n }]);\n\n return ContentInsightsClient;\n}(_client2.default);\n\nexports.default = ContentInsightsClient;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _client = __webpack_require__(0);\n\nvar _client2 = _interopRequireDefault(_client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar InfluencersClient = function (_FCPClient) {\n _inherits(InfluencersClient, _FCPClient);\n\n function InfluencersClient() {\n _classCallCheck(this, InfluencersClient);\n\n return _possibleConstructorReturn(this, (InfluencersClient.__proto__ || Object.getPrototypeOf(InfluencersClient)).apply(this, arguments));\n }\n\n _createClass(InfluencersClient, [{\n key: 'search',\n value: function search(_ref) {\n var query = _ref.query;\n\n return this.post('/influencers/search', query);\n }\n }]);\n\n return InfluencersClient;\n}(_client2.default);\n\nexports.default = InfluencersClient;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// fcp-client.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 43f7030146125a00556b","import request from 'request-promise-native';\n\nclass FCPClient {\n constructor(manageTokens, { host, tenantID, tokenName, tokenConfig, agentConfig }) {\n this._name = 'FCP_SDK';\n this.host = host;\n this.tenantID = tenantID;\n this.tokenName = tokenName || 'mint';\n this.agentConfig = agentConfig || {};\n this.tokens = manageTokens({\n 'kio': { scope: ['uid'] },\n [tokenName]: { scope: ['uid'] }\n }, tokenConfig);\n }\n\n get(path, parameters) {\n return request({\n uri: this.host + path,\n qs: parameters,\n headers: this.getAuthHeaders(this.tokenName),\n agentOptions: this.agentConfig,\n resolveWithFullResponse: true,\n simple: false\n });\n }\n\n post(path, body) {\n return request({\n uri: this.host + path,\n headers: this.getAuthHeaders(this.tokenName),\n agentOptions: this.agentConfig,\n resolveWithFullResponse: true,\n body: body,\n json: true,\n simple: false\n });\n }\n\n getAuthHeaders() {\n const token = this.tokens.get(this.tokenName);\n\n if (!token) {\n throw Error('Could not get a token for: ' + this.tokenName);\n }\n\n return {\n 'Authorization': 'Bearer ' + token,\n 'X-Tenant-ID': this.tenantID,\n 'Content-Type': 'application/json'\n };\n }\n\n}\n\nexport default FCPClient;\n\n\n\n// WEBPACK FOOTER //\n// ./src/client.js","import ContentInsightsClient from './content-insights-client';\nimport InfluencersClient from './influencers-client';\n\nexport default {\n InfluencersClient,\n ContentInsightsClient\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import FCPClient from './client';\n\nconst DEFAULT_LIMIT = 100;\nconst DEFAULT_OFFSET = 0;\n\nclass ContentInsightsClient extends FCPClient {\n\n search({\n query,\n start,\n end,\n limit = DEFAULT_LIMIT,\n offset = DEFAULT_OFFSET,\n domain,\n sort,\n normalizeEntities = true\n }) {\n\n const parameters = {\n q: query,\n start,\n end,\n limit,\n offset,\n domain,\n sort,\n ['normalize_entities']: normalizeEntities\n };\n\n return this.get('/content/search', parameters);\n }\n\n timeseries({\n query,\n start,\n end,\n limit = DEFAULT_LIMIT,\n offset = DEFAULT_OFFSET,\n domain,\n sort,\n window,\n normalizeEntities = true\n }) {\n\n const parameters = {\n q: query,\n start,\n end,\n limit,\n offset,\n domain,\n sort,\n window,\n ['normalize_entities']: normalizeEntities\n };\n\n return this.get('/content/timeseries', parameters);\n }\n\n trends({ normalizeEntities = true, includeTimeseries = false }) {\n const parameters = {\n ['normalize_entities']: normalizeEntities,\n ['include_timeseries']: includeTimeseries\n };\n\n return this.get('/content/trends', parameters);\n }\n\n latest({ limit = DEFAULT_LIMIT, offset = DEFAULT_OFFSET, domain, normalizeEntities = true }) {\n const parameters = {\n limit,\n offset,\n domain,\n ['normalize_entities']: normalizeEntities\n };\n\n return this.get('/content/latest', parameters);\n }\n\n article(id, { normalizeEntities = true }) {\n const parameters = {\n ['normalize_entities']: normalizeEntities\n };\n\n return this.get(`/content/${id}`, parameters);\n }\n\n}\n\nexport default ContentInsightsClient;\n\n\n\n// WEBPACK FOOTER //\n// ./src/content-insights-client.js","import FCPClient from './client';\n\nclass InfluencersClient extends FCPClient {\n search({ query }) {\n return this.post('/influencers/search', query);\n }\n}\n\nexport default InfluencersClient;\n\n\n\n// WEBPACK FOOTER //\n// ./src/influencers-client.js","module.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"request-promise-native\"\n// module id = 4\n// module chunks = 0"],"sourceRoot":""}
\No newline at end of file