UNPKG

33.8 kBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///fcp-client.min.js","webpack:///webpack/bootstrap 1b0102bead980acd091e","webpack:///./src/client.js","webpack:///./src/index.js","webpack:///./src/content-insights-client.js","webpack:///./src/influencers-client.js","webpack:///external \"node-tokens\"","webpack:///external \"request-promise-native\""],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_4__","__WEBPACK_EXTERNAL_MODULE_5__","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","_nodeTokens","_nodeTokens2","_contentInsightsClient","_contentInsightsClient2","_influencersClient","_influencersClient2","InfluencersClient","opts","ContentInsightsClient","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","setPrototypeOf","__proto__","_client","_client2","safe","encodeURIComponent","undefined","_FCPClient","getPrototypeOf","apply","arguments","query","start","end","_ref$limit","limit","_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,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AAiBC,EAAQC,GAAS,IAAK,GAAIlC,GAAI,EAAGA,EAAIkC,EAAMC,OAAQnC,IAAK,CAAE,GAAIoC,GAAaF,EAAMlC,EAAIoC,GAAWvB,WAAauB,EAAWvB,aAAc,EAAOuB,EAAWxB,cAAe,EAAU,SAAWwB,KAAYA,EAAWV,UAAW,GAAMhB,OAAOC,eAAesB,EAAQG,EAAWX,IAAKW,IAAiB,MAAO,UAAUP,EAAaQ,EAAYC,GAAiJ,MAA9HD,IAAYL,EAAiBH,EAAYV,UAAWkB,GAAiBC,GAAaN,EAAiBH,EAAaS,GAAqBT,MK9WhiB6D,EAAA7F,EAAA,GLkXI8F,EAEJ,SAAgCnE,GAAO,MAAOA,IAAOA,EAAIR,WAAaQ,GAAQiB,QAASjB,IAFjDkE,GKhXhCb,EL0XkB,SAAUkB,GAGhC,QAASlB,KAGP,MAFAlD,GAAgBlC,KAAMoF,GAEfG,EAA2BvF,MAAOoF,EAAkBY,WAAa/E,OAAOsF,eAAenB,IAAoBoB,MAAMxG,KAAMyG,YAYhI,MAjBAf,GAAUN,EAAmBkB,GAQ7BhE,EAAa8C,IACXpD,IAAK,SACLpB,MAAO,SAAgBuC,GKpYP,GAATuD,GAASvD,EAATuD,KACP,OAAO1G,MAAKuI,KAAK,sBAAuB7B,OL0YnCtB,GACPc,EAASlD,QAEXrD,GAAQqD,QKzYOoC,EL0YfxF,EAAOD,QAAUA,EAAiB,SAI5B,SAAUC,EAAQD,GMtZxBC,EAAAD,QAAAM,GN4ZM,SAAUL,EAAQD,GO5ZxBC,EAAAD,QAAAO,GPkaM,SAAUN,EAAQD,EAASS,GAEjCR,EAAOD,QAAUS,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(\"node-tokens\"), require(\"request-promise-native\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"fcp-client\", [\"node-tokens\", \"request-promise-native\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"fcp-client\"] = factory(require(\"node-tokens\"), require(\"request-promise-native\"));\n\telse\n\t\troot[\"fcp-client\"] = factory(root[\"node-tokens\"], root[\"request-promise-native\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__) {\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(\"node-tokens\"), require(\"request-promise-native\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"fcp-client\", [\"node-tokens\", \"request-promise-native\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"fcp-client\"] = factory(require(\"node-tokens\"), require(\"request-promise-native\"));\n\telse\n\t\troot[\"fcp-client\"] = factory(root[\"node-tokens\"], root[\"request-promise-native\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__) {\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 = 6);\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__(5);\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 _nodeTokens = __webpack_require__(4);\n\nvar _nodeTokens2 = _interopRequireDefault(_nodeTokens);\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: function InfluencersClient(opts) {\n return new _influencersClient2.default(_nodeTokens2.default, opts);\n },\n ContentInsightsClient: function ContentInsightsClient(opts) {\n return new _contentInsightsClient2.default(_nodeTokens2.default, opts);\n }\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;\nvar safe = function safe(value) {\n return value ? encodeURIComponent(value) : undefined;\n};\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: safe(query),\n start: start,\n end: end,\n limit: limit,\n offset: offset,\n domain: safe(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: safe(query),\n start: start,\n end: end,\n limit: limit,\n offset: offset,\n domain: safe(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: safe(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) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n/***/ }),\n/* 6 */\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 = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1b0102bead980acd091e","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 manageTokens from 'node-tokens';\nimport ContentInsightsClient from './content-insights-client';\nimport InfluencersClient from './influencers-client';\n\nexport default {\n InfluencersClient: (opts) => new InfluencersClient(manageTokens, opts),\n ContentInsightsClient: (opts) => new ContentInsightsClient(manageTokens, opts)\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import FCPClient from './client';\n\nconst DEFAULT_LIMIT = 100;\nconst DEFAULT_OFFSET = 0;\nconst safe = (value) => (value ? encodeURIComponent(value) : undefined);\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: safe(query),\n start,\n end,\n limit,\n offset,\n domain: safe(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: safe(query),\n start,\n end,\n limit,\n offset,\n domain: safe(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: safe(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 \"node-tokens\"\n// module id = 4\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"request-promise-native\"\n// module id = 5\n// module chunks = 0"],"sourceRoot":""}
\No newline at end of file