mirror of
https://github.com/aljazceru/pubky-core.git
synced 2025-12-31 12:54:35 +01:00
docs(js): update README with API documentation
This commit is contained in:
@@ -110,10 +110,20 @@ let response = await client.get(url)
|
||||
### delete
|
||||
|
||||
```js
|
||||
let response = await delete(url);
|
||||
let response = await client.delete(url);
|
||||
```
|
||||
- url: A string representing the Pubky URL.
|
||||
|
||||
### list
|
||||
```js
|
||||
let response = await client.list(url, cursor, reverse, limit)
|
||||
```
|
||||
- url: A string representing the Pubky URL. The path in that url is the prefix that you want to list files within.
|
||||
- cursor: Usually the last URL from previous calls. List urls after/before (depending on `reverse`) the cursor.
|
||||
- reverse: Whether or not return urls in reverse order.
|
||||
- limit: Number of urls to return.
|
||||
- Returns: A list of URLs of the files in the `url` you passed.
|
||||
|
||||
### Keypair
|
||||
|
||||
#### random
|
||||
@@ -186,5 +196,5 @@ Use the logged addresses as inputs to `PubkyClient`
|
||||
```js
|
||||
import { PubkyClient } from '../index.js'
|
||||
|
||||
const client = new PubkyClient().testnet();
|
||||
const client = PubkyClient().testnet();
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user