@harvest-profit/api
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -9,6 +9,3 @@ 'use strict'; | ||
var _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; }; }(); | ||
// Import Raven from outside webpack | ||
// eslint-disable-next-line | ||
var _axios = require('axios'); | ||
@@ -22,12 +19,6 @@ | ||
var _reactRouterRedux = require('react-router-redux'); | ||
var _apiCore = require('@harvest-profit/api-core'); | ||
var _ravenJs = require('raven-js'); | ||
var _apiCore2 = _interopRequireDefault(_apiCore); | ||
var _ravenJs2 = _interopRequireDefault(_ravenJs); | ||
var _ApiCore = require('./ApiCore'); | ||
var _ApiCore2 = _interopRequireDefault(_ApiCore); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
@@ -80,4 +71,4 @@ | ||
var api = new _ApiCore2['default'](); | ||
return api._get(url, params); | ||
var api = new _apiCore2['default'](this.baseUrl, this.getAuthCookie()); | ||
return api.get(url, params); | ||
} | ||
@@ -102,4 +93,4 @@ | ||
var api = new _ApiCore2['default'](this.baseUrl, this.getAuthCookie); | ||
return api._getAuthenticated(url, params); | ||
var api = new _apiCore2['default'](this.baseUrl, this.getAuthCookie()); | ||
return api.getAuthenticated(url, params); | ||
} | ||
@@ -123,4 +114,4 @@ | ||
var api = new _ApiCore2['default'](); | ||
return api._post(url, data); | ||
var api = new _apiCore2['default'](this.baseUrl, this.getAuthCookie()); | ||
return api.post(url, data); | ||
} | ||
@@ -145,4 +136,4 @@ | ||
var api = new _ApiCore2['default'](this.baseUrl, this.getAuthCookie); | ||
return api._postAuthenticated(url, data); | ||
var api = new _apiCore2['default'](this.baseUrl, this.getAuthCookie()); | ||
return api.postAuthenticated(url, data); | ||
} | ||
@@ -166,4 +157,4 @@ | ||
var api = new _ApiCore2['default'](); | ||
return api._put(url, data); | ||
var api = new _apiCore2['default'](this.baseUrl, this.getAuthCookie()); | ||
return api.put(url, data); | ||
} | ||
@@ -188,4 +179,4 @@ | ||
var api = new _ApiCore2['default'](this.baseUrl, this.getAuthCookie); | ||
return api._putAuthenticated(url, data); | ||
var api = new _apiCore2['default'](this.baseUrl, this.getAuthCookie()); | ||
return api.putAuthenticated(url, data); | ||
} | ||
@@ -209,4 +200,4 @@ | ||
var api = new _ApiCore2['default'](); | ||
return api._delete(url, params); | ||
var api = new _apiCore2['default'](this.baseUrl, this.getAuthCookie()); | ||
return api['delete'](url, params); | ||
} | ||
@@ -231,4 +222,4 @@ | ||
var api = new _ApiCore2['default'](this.baseUrl, this.getAuthCookie); | ||
return api._deleteAuthenticated(url, params); | ||
var api = new _apiCore2['default'](this.baseUrl, this.getAuthCookie()); | ||
return api.deleteAuthenticated(url, params); | ||
} | ||
@@ -235,0 +226,0 @@ |
@@ -7,9 +7,9 @@ 'use strict'; | ||
var _WebApi = require('./WebApi'); | ||
var _Api = require('./Api'); | ||
var _WebApi2 = _interopRequireDefault(_WebApi); | ||
var _Api2 = _interopRequireDefault(_Api); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
exports['default'] = _WebApi2['default']; | ||
exports['default'] = _Api2['default']; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@harvest-profit/api", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Adds authentication to api requests and manages cookie.", | ||
@@ -31,3 +31,3 @@ "main": "dist/index.js", | ||
"build-docs": "jsdoc src/* --configure jsdoc.conf.json --destination docs --readme README.md", | ||
"pre-publish": "yarn run build", | ||
"prepublish": "yarn run build", | ||
"authenticate": "git config --global user.email $GH_EMAIL && git config --global user.name $GH_NAME", | ||
@@ -34,0 +34,0 @@ "publish-docs": "yarn run build-docs && gh-pages -d docs -m '[ci skip] update pages'" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
18447
7
214