From 96346f0e9843bc7a8c5f576b70ce888139976182 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 15 Aug 2018 20:58:25 +0100 Subject: [PATCH] add blob_delete and blob_list daemon calls --- dist/bundle.js | 75 +++++++++++++++++++++++--------------------------- src/lbry.js | 4 +++ 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 43e1ad8..6a01c86 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -46,34 +46,19 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -2136,6 +2121,16 @@ var daemonCallWithResult = function daemonCallWithResult(name) { }); }; +// blobs +Lbry.blob_delete = function () { + var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return daemonCallWithResult('blob_delete', params); +}; +Lbry.blob_list = function () { + var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return daemonCallWithResult('blob_list', params); +}; + // core Lbry.status = function () { var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; @@ -2493,26 +2488,26 @@ exports.default = lbryProxy; /* 8 */ /***/ (function(module, exports) { -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1, eval)("this"); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1, eval)("this"); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; /***/ }), diff --git a/src/lbry.js b/src/lbry.js index 6276a4e..2f7f340 100644 --- a/src/lbry.js +++ b/src/lbry.js @@ -61,6 +61,10 @@ const daemonCallWithResult = (name, params = {}) => ); }); +// blobs +Lbry.blob_delete = (params = {}) => daemonCallWithResult('blob_delete', params); +Lbry.blob_list = (params = {}) => daemonCallWithResult('blob_list', params); + // core Lbry.status = (params = {}) => daemonCallWithResult('status', params); Lbry.version = () => daemonCallWithResult('version', {});