1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

update inner code blocks

This commit is contained in:
Bogdan Fazakas 2023-09-29 10:50:51 +03:00
parent d9e64c7546
commit c5e62765b6
5 changed files with 28 additions and 6 deletions

View File

@ -1,6 +1,10 @@
# Consuming an asset # Consuming an asset
The process of consuming an asset is remarkably straightforward. To achieve this, you only need to execute a single command: <code>npm run cli download 'assetDID' 'download-location-path'</code> The process of consuming an asset is remarkably straightforward. To achieve this, you only need to execute a single command:
```bash
npm run cli download 'assetDID' 'download-location-path'
```
In this command, replace 'assetDID' with the specific DID of the asset you want to consume, and 'download-location-path' with the desired path where you wish to store the downloaded asset content In this command, replace 'assetDID' with the specific DID of the asset you want to consume, and 'download-location-path' with the desired path where you wish to store the downloaded asset content

View File

@ -2,10 +2,20 @@
To retrieve the compute results, we'll employ two distinct methods. Initially, we'll use the getJobStatus method, where we'll wait for or periodically check the status until it indicates that the job is finished. Subsequently, we'll utilize the method to obtain the actual results. To retrieve the compute results, we'll employ two distinct methods. Initially, we'll use the getJobStatus method, where we'll wait for or periodically check the status until it indicates that the job is finished. Subsequently, we'll utilize the method to obtain the actual results.
For the first method, you'll need both the dataset DID and the compute job DID. You can execute the following command: <code>npm run cli getJobStatus 'DATASET_DID' 'JOB_ID'</code>. This command will enable you to monitor the status of the job and ensure it has completed successfully. For the first method, you'll need both the dataset DID and the compute job DID. You can execute the following command:
```bash
npm run cli getJobStatus 'DATASET_DID' 'JOB_ID'
```
This command will enable you to monitor the status of the job and ensure it has completed successfully.
<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2FGURaTt0siyBHMDLwD1s5%2FScreenshot%202023-09-28%20at%2001.59.14.png?alt=media&token=528bd4e0-4a48-43f1-924d-c32976a7663b" alt=""><figcaption>getJobStatus</figcaption></figure> <figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2FGURaTt0siyBHMDLwD1s5%2FScreenshot%202023-09-28%20at%2001.59.14.png?alt=media&token=528bd4e0-4a48-43f1-924d-c32976a7663b" alt=""><figcaption>getJobStatus</figcaption></figure>
For the second method, the dataset DID is no longer required. Instead, you'll need to specify the job ID, the index of the result you wish to download from the available results for that job, and the destination folder where you want to save the downloaded content. The corresponding command is as follows: <code> npm run cli downloadJobResults 'JOB_ID' 'RESULT_INDEX' 'DESTINATION_FOLDER'</code> For the second method, the dataset DID is no longer required. Instead, you'll need to specify the job ID, the index of the result you wish to download from the available results for that job, and the destination folder where you want to save the downloaded content. The corresponding command is as follows:
```bash
npm run cli downloadJobResults 'JOB_ID' 'RESULT_INDEX' 'DESTINATION_FOLDER'
```
<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2FjvvCAOQVQvAv2ygNtPby%2FScreenshot%202023-09-28%20at%2002.01.42.png?alt=media&token=da8868d7-6fdb-4dce-ac9a-6b395a0960e5" alt=""><figcaption>downloadJobResults</figcaption></figure> <figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2FjvvCAOQVQvAv2ygNtPby%2FScreenshot%202023-09-28%20at%2002.01.42.png?alt=media&token=da8868d7-6fdb-4dce-ac9a-6b395a0960e5" alt=""><figcaption>downloadJobResults</figcaption></figure>

View File

@ -1,5 +1,9 @@
# Getting asset DDO # Getting asset DDO
Obtaining the DDO of an asset is a straightforward process. You can accomplish this task by executing the following command: <code>npm run cli getDDO 'assetDID'</code> Obtaining the DDO of an asset is a straightforward process. You can accomplish this task by executing the following command:
```bash
npm run cli getDDO 'assetDID'
```
<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fh3AQakJYiL7sDUEvfxhA%2FScreenshot%202023-09-28%20at%2001.06.55.png?alt=media&token=7c6c527a-b0cc-4517-8ec3-48cf27782261" alt=""><figcaption>getDDO method example</figcaption></figure> <figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fh3AQakJYiL7sDUEvfxhA%2FScreenshot%202023-09-28%20at%2001.06.55.png?alt=media&token=7c6c527a-b0cc-4517-8ec3-48cf27782261" alt=""><figcaption>getDDO method example</figcaption></figure>

View File

@ -2,7 +2,11 @@
To initiate a compute job, there are two main approaches you can take. The first method involves publishing both the dataset and algorithm, as detailed in the previous section Publish a dataset, and then proceeding to start the compute job. Alternatively, you can opt to explore available datasets and algorithms and initiate a compute-to-data job using a combination of your choice. To initiate a compute job, there are two main approaches you can take. The first method involves publishing both the dataset and algorithm, as detailed in the previous section Publish a dataset, and then proceeding to start the compute job. Alternatively, you can opt to explore available datasets and algorithms and initiate a compute-to-data job using a combination of your choice.
To demonstrate the latter option, you can utilize the following command: <code>npm run cli startCompute 'DATASET_DID' 'ALGO_DID'</code>. To demonstrate the latter option, you can utilize the following command:
```bash
npm run cli startCompute 'DATASET_DID' 'ALGO_DID'
```
In this command, 'DATASET_DID' should be replaced with the specific DID of the dataset you wish to employ, and 'ALGO_DID' with the DID of the algorithm you want to apply. By executing this command, you will trigger the initiation of a compute-to-data job that leverages the selected dataset and algorithm for processing. In this command, 'DATASET_DID' should be replaced with the specific DID of the dataset you wish to employ, and 'ALGO_DID' with the DID of the algorithm you want to apply. By executing this command, you will trigger the initiation of a compute-to-data job that leverages the selected dataset and algorithm for processing.

View File

@ -1,6 +1,6 @@
# Usage # Usage
The command <code>npm run cli h</code> returns a list of all commands and option flags. The command below returns a list of all commands and option flags.
```bash ```bash
npm run cli h npm run cli h