Skip to content

Commit

Permalink
📦 NEW: Update builds
Browse files Browse the repository at this point in the history
  • Loading branch information
warengonzaga committed Jan 9, 2021
1 parent 7006726 commit 661d7f5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions dist/config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*!
* BuyMeACoffeeJS - https://github.com/WarenGonzaga/buymeacoffee.js#readme
* A simple and lightweight but powerful Node.js client for Buy Me A Coffee API
* Version: 1.0.8-beta.1
* Version: 1.2.0
* Github: https://github.com/WarenGonzaga/buymeacoffee.js
* Licensed Under The MIT License: http://opensource.org/licenses/MIT
* Copyright (c) 2020 Waren Gonzaga
* Copyright (c) 2021 Waren Gonzaga
*
* Facebook: @warengonzagaofficial
* Twitter: @warengonzaga
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*!
* BuyMeACoffeeJS - https://github.com/WarenGonzaga/buymeacoffee.js#readme
* A simple and lightweight but powerful Node.js client for Buy Me A Coffee API
* Version: 1.0.8-beta.1
* Version: 1.2.0
* Github: https://github.com/WarenGonzaga/buymeacoffee.js
* Licensed Under The MIT License: http://opensource.org/licenses/MIT
* Copyright (c) 2020 Waren Gonzaga
* Copyright (c) 2021 Waren Gonzaga
*
* Facebook: @warengonzagaofficial
* Twitter: @warengonzaga
* Github: @warengonzaga
* Website: warengonzaga.com
*/

const requester=require("./requester");class BMC{constructor(e){this.access_token=e}Supporters(e){this._sendRequest("supporters",e)}Subscriptions(e){this._sendRequest("subscriptions",e)}Extras(e){this._sendRequest("extras",e)}async _sendRequest(e,s){s((await requester.get(e,{headers:{Authorization:"Bearer "+this.access_token}})).data)}}module.exports=BMC;
const requester=require("./requester");class BMC{constructor(e){this.access_token=e}Supporters(){return this._sendRequest("supporters")}Subscriptions(){return this._sendRequest("subscriptions")}Extras(){return this._sendRequest("extras")}async _sendRequest(e){return(await requester.get(e,{headers:{Authorization:"Bearer "+this.access_token},validateStatus:function(e){return e>=200&&e<300}})).data}}module.exports=BMC;
4 changes: 2 additions & 2 deletions dist/requester.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*!
* BuyMeACoffeeJS - https://github.com/WarenGonzaga/buymeacoffee.js#readme
* A simple and lightweight but powerful Node.js client for Buy Me A Coffee API
* Version: 1.0.8-beta.1
* Version: 1.2.0
* Github: https://github.com/WarenGonzaga/buymeacoffee.js
* Licensed Under The MIT License: http://opensource.org/licenses/MIT
* Copyright (c) 2020 Waren Gonzaga
* Copyright (c) 2021 Waren Gonzaga
*
* Facebook: @warengonzagaofficial
* Twitter: @warengonzaga
Expand Down
2 changes: 1 addition & 1 deletion source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BMC {
},
validateStatus: function (status) {
return status >= 200 && status < 300; // default
}
}
});
return response.data;
}
Expand Down
2 changes: 1 addition & 1 deletion source/requester.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const requester = axios.create({
validateStatus: (status) => status === 200
});

module.exports = requester;
module.exports = requester;
4 changes: 2 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const requester = require('../src/requester');
const requester = require('../source/requester');
const moxios = require('moxios');

const {
Expand All @@ -10,7 +10,7 @@ const {
} = require('./api-templates');

const token = 'let-me-pass';
const BMC = require('../src/index');
const BMC = require('../source/index');

beforeEach(() => moxios.install(requester));
afterEach(() => moxios.uninstall(requester));
Expand Down

0 comments on commit 661d7f5

Please sign in to comment.