@@ -81,7 +81,7 @@ An optional object which may have the following keys:
81
81
82
82
| Type | Description |
83
83
| -------- | -------- |
84
- | [ CID] [ ] | The CIDs that was pinned |
84
+ | [ CID] [ ] | The CID that was pinned |
85
85
86
86
### Example
87
87
@@ -295,13 +295,13 @@ An object may have the following optional fields:
295
295
296
296
| Type | Description |
297
297
| ---- | -------- |
298
- | Promise<void > | Resolves if added succesfully , or fails with error e.g. if service with such name is already registered |
298
+ | Promise<void > | Resolves if added successfully , or fails with error e.g. if service with such name is already registered |
299
299
300
300
301
301
### Example
302
302
303
303
``` JavaScript
304
- await ipfs .pin .remote .sevice .add (' pinata' , {
304
+ await ipfs .pin .remote .service .add (' pinata' , {
305
305
endpoint: new URL (' https://api.pinata.cloud' ),
306
306
key: ' your-pinata-key'
307
307
})
@@ -349,7 +349,7 @@ If stats could not be fetched from service (e.g. endpoint was unreachable) objec
349
349
| status | ` 'invalid' ` | Service status |
350
350
351
351
352
- If stats were fetched from service succesfully object has following form:
352
+ If stats were fetched from service successfully object has following form:
353
353
354
354
| Name | Type | Description |
355
355
| ---- | ---- | -------- |
@@ -372,7 +372,7 @@ Object has following fields:
372
372
### Example
373
373
374
374
``` JavaScript
375
- await ipfs .pin .remote .sevice .ls ()
375
+ await ipfs .pin .remote .service .ls ()
376
376
// [{
377
377
// service: 'pinata'
378
378
// endpoint: new URL('https://api.pinata.cloud'),
@@ -426,7 +426,7 @@ An object may have the following optional fields:
426
426
### Example
427
427
428
428
``` JavaScript
429
- await ipfs .pin .remote .sevice .rm (' pinata' )
429
+ await ipfs .pin .remote .service .rm (' pinata' )
430
430
```
431
431
432
432
A great source of [ examples] [ ] can be found in the tests for this API.
@@ -529,21 +529,20 @@ An object may have the following optional fields:
529
529
530
530
| Type | Description |
531
531
| ---- | -------- |
532
- | AyncIterable <[ Pin] [ ] > | Pin Objects |
532
+ | AysncIterable <[ Pin] [ ] > | Pin Objects |
533
533
534
534
### Example
535
535
536
536
``` JavaScript
537
- const pins = await ipfs .pin .remote .ls ({
538
- service: ' pinata'
539
- })
540
- console .log (pins)
537
+ for await (const pin of ipfs .pin .remote .ls ({ service: ' pinata' })) {
538
+ console .log (pin)
539
+ }
541
540
// Logs:
542
- // [ {
541
+ // {
543
542
// status: 'pinned',
544
543
// cid: CID('QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u'),
545
544
// name: 'block-party'
546
- // }]
545
+ // }
547
546
```
548
547
549
548
A great source of [ examples] [ ] can be found in the tests for this API.
0 commit comments