Exchange API Born
This commit is contained in:
1 parent
27768a6d90
commit
e77c84b1c1
5 files changed
+29
-21
No files matched your search
Binary file not shown.
@@ -23,6 +23,9 @@
|
||||
<Compile Include="Azure File Storage.js" />
|
||||
<Compile Include="Azure Web Job Shutdown.js" />
|
||||
<Compile Include="Debug Log.js" />
|
||||
<Compile Include="ExchangeAPI.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interval Executor.js" />
|
||||
<Compile Include="Markets.js" />
|
||||
<Compile Include="Poloniex API Client.js" />
|
||||
|
||||
+8
-17
@@ -1,8 +1,4 @@
|
||||
|
||||
|
||||
|
||||
exports.newDebugLog = function newDebugLog() {
|
||||
|
||||
exports.newDebugLog = function newDebugLog() {
|
||||
|
||||
const MODULE_NAME = "Debug Log";
|
||||
const fileSystem = require('fs');
|
||||
@@ -16,38 +12,35 @@ exports.newDebugLog = function newDebugLog() {
|
||||
let firstCall = true;
|
||||
let folderPath;
|
||||
|
||||
debugLog = {
|
||||
thisObject = {
|
||||
bot: undefined,
|
||||
fileName: undefined,
|
||||
write: write
|
||||
};
|
||||
|
||||
|
||||
|
||||
return debugLog;
|
||||
|
||||
return thisObject;
|
||||
|
||||
function createFolders() {
|
||||
|
||||
try {
|
||||
|
||||
folderPath = debugLog.bot.devTeam;
|
||||
folderPath = thisObject.bot.devTeam;
|
||||
|
||||
createFolderSync(folderPath);
|
||||
|
||||
folderPath = debugLog.bot.devTeam + "/" + debugLog.bot.type;
|
||||
folderPath = thisObject.bot.devTeam + "/" + thisObject.bot.type;
|
||||
|
||||
createFolderSync(folderPath);
|
||||
|
||||
folderPath = debugLog.bot.devTeam + "/" + debugLog.bot.type + "/" + debugLog.bot.name;
|
||||
folderPath = thisObject.bot.devTeam + "/" + thisObject.bot.type + "/" + thisObject.bot.name;
|
||||
|
||||
createFolderSync(folderPath);
|
||||
|
||||
folderPath = debugLog.bot.devTeam + "/" + debugLog.bot.type + "/" + debugLog.bot.name + "/" + debugLog.bot.version;
|
||||
folderPath = thisObject.bot.devTeam + "/" + thisObject.bot.type + "/" + thisObject.bot.name + "/" + thisObject.bot.version;
|
||||
|
||||
createFolderSync(folderPath);
|
||||
|
||||
folderPath = debugLog.bot.devTeam + "/" + debugLog.bot.type + "/" + debugLog.bot.name + "/" + debugLog.bot.version + "/" + debugLog.bot.process;
|
||||
folderPath = thisObject.bot.devTeam + "/" + thisObject.bot.type + "/" + thisObject.bot.name + "/" + thisObject.bot.version + "/" + thisObject.bot.process;
|
||||
|
||||
createFolderSync(folderPath);
|
||||
|
||||
@@ -61,7 +54,6 @@ exports.newDebugLog = function newDebugLog() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
function write(Message) {
|
||||
|
||||
if (firstCall === true) {
|
||||
@@ -87,7 +79,6 @@ exports.newDebugLog = function newDebugLog() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function createFolderSync(name) {
|
||||
try {
|
||||
fileSystem.mkdirSync( './logs/' + name)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
exports.newExchangeAPI = function newExchangeAPI() {
|
||||
|
||||
const MODULE_NAME = "Exchange API";
|
||||
|
||||
thisObject = {
|
||||
bot: undefined,
|
||||
fileName: undefined,
|
||||
write: write
|
||||
};
|
||||
|
||||
return thisObject;
|
||||
|
||||
|
||||
};
|
||||
@@ -32,10 +32,10 @@ catch (err) {
|
||||
}
|
||||
|
||||
let bot = {
|
||||
"name": botConfig.bot.displayName,
|
||||
"type": botConfig.bot.type,
|
||||
"version": botConfig.bot.version,
|
||||
"devTeam": botConfig.bot.devTeam
|
||||
"name": botConfig.displayName,
|
||||
"type": botConfig.type,
|
||||
"version": botConfig.version,
|
||||
"devTeam": botConfig.devTeam
|
||||
};
|
||||
|
||||
botConfig.bot;
|
||||
|
||||
Reference in new issue
Block a user