diff --git a/Projects/Superalgos/Schemas/App-Schema/api-response-schema.json b/Projects/Superalgos/Schemas/App-Schema/api-response-schema.json index 9325f7150..287c530b7 100644 --- a/Projects/Superalgos/Schemas/App-Schema/api-response-schema.json +++ b/Projects/Superalgos/Schemas/App-Schema/api-response-schema.json @@ -30,7 +30,7 @@ "config": true }, "initialValues": { - "config": "{\"nodePath\": \"apiDataObject.data\"}" + "config": "{\"nodePath\": \"apiResponseReceivedObject.data\"}" }, "addLeftIcons": true, "level": 4, diff --git a/Projects/Superalgos/Schemas/App-Schema/plugin-file.json b/Projects/Superalgos/Schemas/App-Schema/plugin-file.json index 6a81231e0..509c738f4 100644 --- a/Projects/Superalgos/Schemas/App-Schema/plugin-file.json +++ b/Projects/Superalgos/Schemas/App-Schema/plugin-file.json @@ -30,7 +30,7 @@ "name": "pluginFilePosition", "type": "node", "childType": "Plugin File Position", - "autoAdd": false + "autoAdd": true } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/replaceby-config-property.json b/Projects/Superalgos/Schemas/Docs-Concepts/replaceby-config-property.json new file mode 100644 index 000000000..fd8e568e3 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Concepts/replaceby-config-property.json @@ -0,0 +1,78 @@ +{ + "type": "replaceBy Config Property", + "definition": { + "text": "This property allows you to instruct the API Fetcher Bot to set a value to this parameter based on contextual information that can not be defined at the Data Mine or the API Map. This contextual information can be for example the current Base Asset or the current time.", + "updated": 1622476480596 + }, + "paragraphs": [ + { + "style": "Block", + "text": "How To Use It", + "updated": 1622477226772 + }, + { + "style": "Subtitle", + "text": "replaceBy Config Property Usage" + }, + { + "style": "Text", + "text": "This property is optional, meaning that the Bot will use the default value when it is not present. The default value for an API Query Parameter is the value configu property, while the default for an API Path Parameter is the codeName config property." + }, + { + "style": "Text", + "text": "The possible values for this property are:" + }, + { + "style": "List", + "text": "@BaseAsset: This will force the Bot to use the current Base Asset." + }, + { + "style": "Javascript", + "text": "parameterValue = TS.projects.superalgos.globals.taskConstants.TASK_NODE\n.parentNode.parentNode.parentNode.referenceParent.baseAsset.referenceParent.config.codeName", + "updated": 1622476773559 + }, + { + "style": "List", + "text": "@QuotedAsset: This will force the Bot to use the current Quoted Asset.", + "updated": 1622476819686 + }, + { + "style": "Javascript", + "text": "parameterValue = TS.projects.superalgos.globals.taskConstants.TASK_NODE\n.parentNode.parentNode.parentNode.referenceParent.quotedAsset.referenceParent.config.codeName", + "updated": 1622476849667 + }, + { + "style": "List", + "text": "@BeginCurrentMinute: This will instruct the Bot to use a timestamp at the begining of the current minute.", + "updated": 1622476907142 + }, + { + "style": "Javascript", + "text": "parameterValue = \nMath.trunc((new Date()).valueOf() / \nTS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS) * \nTS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS", + "updated": 1622477009814 + }, + { + "style": "List", + "text": "@EndCurrentMinute: This will instruct the Bot to use a timestamp at the ending of the current minute.", + "updated": 1622476926765 + }, + { + "style": "Javascript", + "text": "parameterValue = Math.trunc((new Date()).valueOf() / \nTS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS) * \nTS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS + \nTS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS - 1", + "updated": 1622477088684 + }, + { + "style": "Note", + "text": "If users assing a value that is not listed above, the property will be ingnored and the default value will be used.", + "updated": 1622477178155 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Text", + "text": "" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-map-reference.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-map-reference.json index 559bd9d3c..1605f663c 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-map-reference.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-map-reference.json @@ -6,8 +6,9 @@ }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Important", + "text": "For this node to be correctly installed and a reference stablished to the API Data Mine by the Install New Market procedure, both the Data Mine and the API Data Map needs to have exactly the same config property codeName, otherwise, this node will be created but you will have to stablish the reference manually.", + "updated": 1622472653778 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-map.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-map.json index eddad6330..661de1b73 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-map.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-map.json @@ -36,6 +36,11 @@ "style": "Title", "text": "Configuration" }, + { + "style": "List", + "text": "codeName: this must be the same codeName as the Data Mine codeName in order for the Install New Market procedure to link them properly at the API Map Reference node.", + "updated": 1622472871204 + }, { "style": "List", "text": "protocol: the protocol to be used to access the API. For now either http or https." diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-path-parameter.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-path-parameter.json index fabb2abb1..771a99ae5 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-path-parameter.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-path-parameter.json @@ -21,11 +21,13 @@ }, { "style": "List", - "text": "replaceBy: this property allows you to instruct the API Fetcher Bot to set a value to this parameter. The possible values are: @BaseAsset and @QuotedAsset" + "text": "replaceBy: this property allows you to instruct the API Fetcher Bot to set a value to this parameter replacing the current default and using contextual information available only at runtime. ", + "updated": 1622477486319 }, { - "style": "Important", - "text": "The replacedBy property is the way users have to send some contextual values to the API Server like for example the Base Asset or Quoted Asset of the Defautl Market." + "style": "Include", + "text": "Superalgos->Concept->replaceBy Config Property->How To Use It", + "updated": 1622477440806 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-path-parameters.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-path-parameters.json index 7b55f1979..17cc5188f 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-path-parameters.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-path-parameters.json @@ -1,8 +1,8 @@ { "type": "API Path Parameters", "definition": { - "text": "Path parameters are the type of parameters that are embedded as part of an URL path. They could be fixed string of texts or they could be a parameter that is replaced by the API Fetcher Bot for some value at runtime.", - "updated": 1621018106262 + "text": "Path parameters are the type of parameters that are embedded as part of an URL path. They could be a fixed string of texts or they could be a parameter that is replaced by the API Fetcher Bot for some value at runtime.", + "updated": 1622336383876 }, "paragraphs": [ { diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-query-parameter.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-query-parameter.json index ac68b8246..863b6d9f5 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-query-parameter.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-query-parameter.json @@ -18,6 +18,15 @@ "style": "List", "text": "value: It is the value to be used at this parameter. The API Map can define the value, that would be considered a default value. The same parameter defined at the Data Mine will have the actual value to be used replacing the default. If you are defining a API Map to be shared as a Plugin, you can avoid setting this property at the API Map level, and let the users set it at their Data Mine when they use your API Map. For completness, this parameter should be included at the the API Map even if the value property is not there.", "updated": 1622160191941 + }, + { + "style": "List", + "text": "replaceBy: this property allows you to instruct the API Fetcher Bot to set a value to this parameter replacing the current default and using contextual information available only at runtime. ", + "updated": 1622477507235 + }, + { + "style": "Include", + "text": "Superalgos->Concept->replaceBy Config Property->How To Use It" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-query-responses.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-query-responses.json index 3d297c6fc..c4758889d 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-query-responses.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-query-responses.json @@ -1,8 +1,8 @@ { "type": "API Query Responses", "definition": { - "text": "API calls producee responses. Under this section they are defined.", - "updated": 1621020920908 + "text": "API calls produce responses. Under this section they are defined.", + "updated": 1622295146024 }, "paragraphs": [ { diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-response-field-reference.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-response-field-reference.json index 96103acc6..c3af8800c 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-response-field-reference.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-response-field-reference.json @@ -33,8 +33,8 @@ }, { "style": "Text", - "text": "In order to extract individual values for each Record Property, the API Data Fetcher Bot needs to dynamically discover the nodePath for each Record Propety at the response data structure and can do it as long as the API Response Field referenced is under the Data Root. To autodiscover the nodePath it uses the API Response Schame nodePath to locate the Data Root, and then it follows the reference from the API Response Field Reference node to the API Response Field and climb upwards until it reach the API Response Schema. While climbing upwards it discovers the nodePath that it needs to grabb the value from the response data structure. That is how it works.", - "updated": 1621972472491 + "text": "In order to extract individual values for each Record Property, the API Data Fetcher Bot needs to dynamically discover the nodePath for each Record Propety at the response data structure and can do it as long as the API Response Field referenced is under the Data Root. To autodiscover the nodePath it uses the API Response Schema nodePath to locate the Data Root, and then it follows the reference from the API Response Field Reference node to the API Response Field and climbs upwards until it reach the API Response Schema. While climbing upwards it discovers the nodePath that it needs to grab the value from the response data structure. That is how it works.", + "updated": 1622372741883 }, { "style": "Text", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-response-field.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-response-field.json index 7b2825dde..fb4297a82 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-response-field.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-response-field.json @@ -17,8 +17,8 @@ }, { "style": "List", - "text": "fieldType: This property declares if the data is number, a string an object or an array, those are the 4 possible values.", - "updated": 1621022104672 + "text": "fieldType: This property declares if the data is number, a string, an object, or an array, those are the 4 possible values.", + "updated": 1622315306276 }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-response-schema.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-response-schema.json index 2f61a7434..941235287 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-response-schema.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-response-schema.json @@ -7,8 +7,8 @@ "paragraphs": [ { "style": "Text", - "text": "The API Map assumes the API Server will respond with string formatted in JSON. This means that the response will be a data structure of nestled objects and arrays. Users will need to map the response format into a API Response Schema by adding children to this node and to this node's children. All these descendants are of the same Node Type API Response Field. ", - "updated": 1621952655717 + "text": "The API Map assumes the API Server will respond with string formatted in JSON. This means that the response will be a data structure of nestled objects and arrays. Users will need to map the response format into an API Response Schema by adding children to this node and to this node's children. All these descendants are of the same Node Type API Response Field.", + "updated": 1622312357188 }, { "style": "Title", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/api-version.json b/Projects/Superalgos/Schemas/Docs-Nodes/api-version.json index 35abe1f17..9882af7f1 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/api-version.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/api-version.json @@ -7,8 +7,8 @@ "paragraphs": [ { "style": "Note", - "text": "We expect every API to have at leat one version.", - "updated": 1621951647515 + "text": "We expect every API to have at least one version.", + "updated": 1622291417472 }, { "style": "Include", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/record-property.json b/Projects/Superalgos/Schemas/Docs-Nodes/record-property.json index cf00f518a..2519ff947 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/record-property.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/record-property.json @@ -60,7 +60,7 @@ { "style": "Include", "text": "Superalgos->Topic->Data Mining - Fetching Data From APIs->Data Aggregation", - "updated": 1621974902589 + "updated": 1622336877604 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/data-mining-014-data-mining-fetching-data-from-apis.json b/Projects/Superalgos/Schemas/Docs-Topics/data-mining-014-data-mining-fetching-data-from-apis.json index 74e5daafe..f577ee689 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/data-mining-014-data-mining-fetching-data-from-apis.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/data-mining-014-data-mining-fetching-data-from-apis.json @@ -61,10 +61,14 @@ "text": "There is a Workspace called API Data Fetcher Bot Demo with a simple working example of the previous steps you can use as a reference.", "updated": 1622230619069 }, + { + "style": "Block", + "text": "Data Aggregation", + "updated": 1622336997587 + }, { "style": "Title", - "text": "How Does Data Aggregation Work?", - "updated": 1622230634850 + "text": "How Does Data Aggregation Work?" }, { "style": "Text", @@ -106,10 +110,14 @@ "style": "List", "text": "Avg: This means that the average of all values found in the time range will be used as the value for the Record Proeprty." }, + { + "style": "Block", + "text": "Step By Step", + "updated": 1622372437520 + }, { "style": "Title", - "text": "Step by Step Guide to Fetch Data from an API", - "updated": 1622231458352 + "text": "Step by Step Guide to Fetch Data from an API" }, { "style": "Text", @@ -133,8 +141,8 @@ }, { "style": "List", - "text": "Step #4: Read the API's documentation, indentify the endpoints, what parameters they require and what data they will provide you.", - "updated": 1621976675920 + "text": "Step #4: Read the API's documentation, indentify the endpoints, what parameters they require and what data they will provide you. Another helpful way to see how the api responds is by typing the api endpoint into your browser and looking at the raw output.", + "updated": 1622469791527 }, { "style": "List", @@ -143,8 +151,8 @@ }, { "style": "List", - "text": "Step #6: Create an API Map node, and start mapping the documented API by adding children to it.", - "updated": 1621976688595 + "text": "Step #6: Create an API Map node, and start mapping the documented API by adding children to it. Especially pay attention to unnamed arrays and objects that may wrap the data.", + "updated": 1622470221717 }, { "style": "List", @@ -196,8 +204,13 @@ }, { "style": "List", - "text": "Step #17: Pay attention to the special case of the required timeStamp Record Property. Specifically because it might be pointing to the header of the API response. Read the docs of the API Response Field Reference node to set up the nodePath property if necessary.", - "updated": 1622232714229 + "text": "Step #17: The timestamp record property is the only required property. It helps keep the records you save organized. Addtionally, the timestamp may live in the header of the API responce. Read the docs of the API Response Field Reference node to set up the nodePath property if necessary.", + "updated": 1622475120505 + }, + { + "style": "Note", + "text": "It is a good idea to make sure you get the api fetcher bot running and debugged before moving on to the next step.", + "updated": 1622475171484 }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Topics/how-to-003-create-the-plugins-docs-branch-in-old-forks.json b/Projects/Superalgos/Schemas/Docs-Topics/how-to-003-create-the-plugins-docs-branch-in-old-forks.json index db1ed00a6..1201b378e 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/how-to-003-create-the-plugins-docs-branch-in-old-forks.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/how-to-003-create-the-plugins-docs-branch-in-old-forks.json @@ -3,7 +3,7 @@ "pageNumber": "3", "type": "Create the Plugins-Docs Branch in Old Forks", "definition": { - "text": "If your Superalgos fork is older than April 6, 2021, you must create the plugin-docs branch before you may switch to that branch! Newer forks already have the branch, so you don't need to follow this guide in that case!", + "text": "If your Superalgos fork is older than April 6, 2021, you must create the plugins-docs branch before you may switch to that branch! Newer forks already have the branch, so you don't need to follow this guide in that case!", "updated": 1618155549345 }, "paragraphs": [ diff --git a/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-001-introduction.json b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-001-introduction.json new file mode 100644 index 000000000..05f7d728b --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-001-introduction.json @@ -0,0 +1,15 @@ +{ + "topic": "Repository Branches", + "pageNumber": "1", + "type": "Introduction", + "definition": { + "text": "The Superalgos Repository has 4 main branches, each one with it's own purpose: Master, Develop, Plugins-Docs and Next-Version.", + "updated": 1622467436519 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-002-master.json b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-002-master.json new file mode 100644 index 000000000..cc9698cfe --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-002-master.json @@ -0,0 +1,34 @@ +{ + "topic": "Repository Branches", + "pageNumber": "2", + "type": "Master", + "definition": { + "text": "The Master branch is where the stable code or current version is located at. This is the branch where the software is installed from by default. ", + "updated": 1622467520315 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Users of Superalgos running the stable version at Master discuss several topics here:", + "updated": 1622468372179 + }, + { + "style": "Link", + "text": "Telegram Community Group->t.me/superalgoscommunity", + "updated": 1622468544375 + }, + { + "style": "Text", + "text": "When they have issues with the stable version at Master, they ask for help here:" + }, + { + "style": "Link", + "text": "Telegram Technical Support Group->t.me/superalgossupport", + "updated": 1622468555501 + }, + { + "style": "Text", + "text": "" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-003-develop.json b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-003-develop.json new file mode 100644 index 000000000..682fb97da --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-003-develop.json @@ -0,0 +1,21 @@ +{ + "topic": "Repository Branches", + "pageNumber": "3", + "type": "Develop", + "definition": { + "text": "The Develop branch is the branch that is being used by developers involved in contributing to Superalgos. All the changes at this branch are sent to the Master branch everytime there is a new release. The Develop branch purpose is for accumulating changes at the codebase untiil the release date when all these changes are moved into the Master branch.", + "updated": 1622467883706 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Contributors working at this branch coordinate their here:", + "updated": 1622468223194 + }, + { + "style": "Link", + "text": "Telegram Developers Group->t.me/superalgosdevelop", + "updated": 1622468567484 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-004-plugins-docs.json b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-004-plugins-docs.json new file mode 100644 index 000000000..daa4c200e --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-004-plugins-docs.json @@ -0,0 +1,21 @@ +{ + "topic": "Repository Branches", + "pageNumber": "4", + "type": "Plugins-Docs", + "definition": { + "text": "The branch Plugins-Docs is used by contributors of Plugins, documentations or tutorials. This branch in syncronized with Develop and Master everytime a new version is released, and it's purpose is to allow the flow of docs pages, plugins and tutorials into the master branch at a higher rate than changes at the codebase done at the Develop branch. This means that the Master branch might have many updates in between releases.", + "updated": 1622467789596 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Contributors working at this branch coordinate their here:", + "updated": 1622468204165 + }, + { + "style": "Link", + "text": "Telegram Docs Group->t.me/superalgosdocs", + "updated": 1622468607270 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-005-next-version.json b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-005-next-version.json new file mode 100644 index 000000000..56a22b694 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/repository-branches-005-next-version.json @@ -0,0 +1,21 @@ +{ + "topic": "Repository Branches", + "pageNumber": "5", + "type": "Next-Version", + "definition": { + "text": "The Next-Version branch is where developers work when they are working on features that will not be part of the next release, but the release following that one. After a release, this branch is merged into Develop and devs continue working there. ", + "updated": 1622468029634 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Contributors working at this branch coordinate their here:", + "updated": 1622468300604 + }, + { + "style": "Link", + "text": "Telegram Developers Group->t.me/superalgosdevelop", + "updated": 1622468627270 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/beyond-the-basics-008-tutorial-step-switching-branches.json b/Projects/Superalgos/Schemas/Docs-Tutorials/beyond-the-basics-008-tutorial-step-switching-branches.json index 824bd7a35..6b0b5eb2b 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/beyond-the-basics-008-tutorial-step-switching-branches.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/beyond-the-basics-008-tutorial-step-switching-branches.json @@ -52,7 +52,7 @@ "translations": [ { "language": "IT", - "text": "Scorri la pagina dei Docs fino al footer e selezione Plugins/Docs come Contributions Branch! È l'opzione sulla destra, non al centro!", + "text": "Scorri la pagina dei Docs fino al footer e selezione Plugins-Docs come Contributions Branch! È l'opzione sulla destra, non al centro!", "updated": 1619633667745, "style": "Callout" } diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/beyond-the-basics-012-tutorial-step-lets-switch-already.json b/Projects/Superalgos/Schemas/Docs-Tutorials/beyond-the-basics-012-tutorial-step-lets-switch-already.json index 7468542c5..97d956d91 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/beyond-the-basics-012-tutorial-step-lets-switch-already.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/beyond-the-basics-012-tutorial-step-lets-switch-already.json @@ -39,7 +39,7 @@ "translations": [ { "language": "IT", - "text": "Torna al footer e seleziona Plugins/Docs come tuo Current Branch.", + "text": "Torna al footer e seleziona Plugins-Docs come tuo Current Branch.", "updated": 1619634755120, "style": "List" } diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-7.5-tutorial-step-repository-branches.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-7.5-tutorial-step-repository-branches.json index a32576193..a5ca5533c 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-7.5-tutorial-step-repository-branches.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-7.5-tutorial-step-repository-branches.json @@ -55,11 +55,11 @@ }, { "style": "List", - "text": "Plugins/Docs Branch: Features the version in the master branch plus the latest changes in the Docs and Plugins. Submit contributions of translations, improvements in the Docs, tutorials, and plugins such as data mines, trading systems, and so on!", + "text": "Plugins-Docs Branch: Features the version in the master branch plus the latest changes in the Docs and Plugins. Submit contributions of translations, improvements in the Docs, tutorials, and plugins such as data mines, trading systems, and so on!", "translations": [ { "language": "IT", - "text": "Plugins/Docs Branch: contiene la versione del master branch più le ultime modifiche a Docs e Plugins. Presenta qui i contributi a Docs, tutorial e plugins, come Data Mines, Trading Systems e così via!", + "text": "Plugins-Docs Branch: contiene la versione del master branch più le ultime modifiche a Docs e Plugins. Presenta qui i contributi a Docs, tutorial e plugins, come Data Mines, Trading Systems e così via!", "updated": 1619633285534 } ] diff --git a/Projects/Superalgos/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js b/Projects/Superalgos/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js index c93bd96a6..0286ed6cc 100644 --- a/Projects/Superalgos/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js +++ b/Projects/Superalgos/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js @@ -346,9 +346,19 @@ exports.newSuperalgosBotModulesFetchingProcess = function (processIndex) { if (apiQueryParameter.config.isPageNumber === true) { pageNumberParameter = apiQueryParameter } else { + /* + Whatever is in Value is the default value. + */ if (apiQueryParameter.config.codeName !== undefined && apiQueryParameter.config.value !== undefined) { parametersMap.set(apiQueryParameter.config.codeName, apiQueryParameter.config.value) } + /* + If there is a replace action to be made, then that could replace the default value. + */ + let replaceValue = checkReplaceBy(apiQueryParameter) + if (replaceValue !== undefined) { + parametersMap.set(apiQueryParameter.config.codeName, replaceValue) + } } } } @@ -393,23 +403,42 @@ exports.newSuperalgosBotModulesFetchingProcess = function (processIndex) { if (pathString === "") { pathString = '/' } let apiPathParameter = value let parameterValue = key // This is the default value - if (apiPathParameter.config.replaceBy !== undefined) { - switch (apiPathParameter.config.replaceBy) { - case '@BaseAsset': { - parameterValue = TS.projects.superalgos.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.baseAsset.referenceParent.config.codeName - break - } - case '@QuotedAsset': { - parameterValue = TS.projects.superalgos.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.quotedAsset.referenceParent.config.codeName - break - } - } + let replaceValue = checkReplaceBy(apiPathParameter) + + if (replaceValue !== undefined) { + parameterValue = replaceValue } + pathString = pathString + separator + parameterValue separator = "/" } } + function checkReplaceBy(apiParameter) { + let parameterValue + if (apiParameter.config.replaceBy !== undefined) { + switch (apiParameter.config.replaceBy) { + case '@BaseAsset': { + parameterValue = TS.projects.superalgos.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.baseAsset.referenceParent.config.codeName + break + } + case '@QuotedAsset': { + parameterValue = TS.projects.superalgos.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.quotedAsset.referenceParent.config.codeName + break + } + case '@BeginCurrentMinute': { + parameterValue = Math.trunc((new Date()).valueOf() / TS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS) * TS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS + break + } + case '@EndCurrentMinute': { + parameterValue = Math.trunc((new Date()).valueOf() / TS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS) * TS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS + TS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS - 1 + break + } + } + } + return parameterValue + } + async function fetchAllPages() { if (pageNumberParameter === undefined) { @@ -653,7 +682,7 @@ exports.newSuperalgosBotModulesFetchingProcess = function (processIndex) { resolve('NO_MORE_PAGES') } else { resolve('PAGE_FETCHED') - } + } /* If we received an errror code, we abort the processing at this point. */ diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js b/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js index 59404b1fe..d5ccaaa57 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js @@ -166,6 +166,7 @@ function newSuperalgosDocsFooter() { HTML = HTML + '