Skip to content

Commit

Permalink
* removes some unnecessary legacy stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinx committed Oct 2, 2022
1 parent 46ae33d commit 13d34ac
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,39 @@ function Client(transferServer) {
*
* @param endpoint (string), e.g. /deposit
* @param params (object), a list of GET parameters to be included in the request
* @param callback (function), processes the response
*/
this.get = async function(endpoint, params, callback) {
return await sendRequest('get', endpoint, params, callback);
this.get = async function(endpoint, params) {
return await sendRequest('get', endpoint, params);
};

/**
* Use this method to communicate with POST endpoints
*
* @param endpoint (string)
* @param params (object), a list of POST parameters to be included in the request
* @param callback (function), processes the response
*/
this.post = async function(endpoint, params, callback) {
return await sendRequest('post', endpoint, params, callback);
this.post = async function(endpoint, params) {
return await sendRequest('post', endpoint, params);
};

/**
* Use this method to communicate with PUT endpoints
*
* @param endpoint (string)
* @param params (object), a list of PUT parameters to be included in the request
* @param callback (function), processes the response
*/
this.put = async function(endpoint, params, callback) {
return await sendRequest('put', endpoint, params, callback);
this.put = async function(endpoint, params) {
return await sendRequest('put', endpoint, params);
};

/**
* Use this method to communicate with DELETE endpoints
*
* @param endpoint (string)
* @param params (object), a list of DELETE parameters to be included in the request
* @param callback (function), processes the response
*/
this.delete = async function(endpoint, params, callback) {
return await sendRequest('delete', endpoint, params, callback);
this.delete = async function(endpoint, params) {
return await sendRequest('delete', endpoint, params);
};

// private validator function
Expand Down

0 comments on commit 13d34ac

Please sign in to comment.