Skip to content

Commit

Permalink
v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoFernandesTE committed Jul 5, 2024
1 parent 56bf292 commit aa3560a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
31 changes: 24 additions & 7 deletions tradingeconomics/marketSnap.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,33 @@ function getMarketSnap(){

}

module.exports.getMarketSnap = getMarketSnap;






function getMarketsByCountry(){

try {
var Data = '';
var url = '';

if(country != null){
url = '/markets/stocks/country/' + country;
} else {
throw new ParameterError('Missing country parameters.');
}

Data = url_base + url + '?c=' + apikey.replace (' ','%20');

return func.makeTheRequest(Data)
// return fetch(Data)
// .then(func.handleErrors)
// .then(function(response) {
// return response.json(); // process it inside the `then` when calling the function
// }).catch(function (err) {
// return err.message;
// });
} catch (error) {
throw error
}

}

module.exports.getMarketSnap = getMarketSnap;
module.exports.getMarketsByCountry = getMarketsByCountry;
4 changes: 2 additions & 2 deletions tradingeconomics/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tradingeconomics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
"start": "./index.js",
"test": "jest --verbose --rootDir=../tests"
},
"version": "2.4.0"
"version": "2.4.1"
}

0 comments on commit aa3560a

Please sign in to comment.