opensea-cli 0.1.0 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,25 +11,7 @@ npm install -g opensea-cli
|
|
|
11
11
|
Or use without installing:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npx opensea-cli collections get
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Local Development
|
|
18
|
-
|
|
19
|
-
To test locally without publishing:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
git clone https://github.com/ProjectOpenSea/opensea-cli.git
|
|
23
|
-
cd opensea-cli
|
|
24
|
-
npm install && npm run build
|
|
25
|
-
export OPENSEA_API_KEY=your-api-key
|
|
26
|
-
|
|
27
|
-
# Run directly with Node
|
|
28
|
-
node dist/cli.js collections get tiny-dinos-eth
|
|
29
|
-
|
|
30
|
-
# Or link globally to use the `opensea` command
|
|
31
|
-
npm link
|
|
32
|
-
opensea collections get tiny-dinos-eth
|
|
14
|
+
npx opensea-cli collections get mfers
|
|
33
15
|
```
|
|
34
16
|
|
|
35
17
|
## Authentication
|
|
@@ -38,10 +20,10 @@ Set your API key via environment variable or flag:
|
|
|
38
20
|
|
|
39
21
|
```bash
|
|
40
22
|
export OPENSEA_API_KEY=your-api-key
|
|
41
|
-
opensea collections get
|
|
23
|
+
opensea collections get mfers
|
|
42
24
|
|
|
43
25
|
# or pass inline
|
|
44
|
-
opensea --api-key your-api-key collections get
|
|
26
|
+
opensea --api-key your-api-key collections get mfers
|
|
45
27
|
```
|
|
46
28
|
|
|
47
29
|
Get an API key at [docs.opensea.io](https://docs.opensea.io/reference/api-keys).
|
|
@@ -118,11 +100,11 @@ import { OpenSeaCLI } from "opensea-cli"
|
|
|
118
100
|
|
|
119
101
|
const client = new OpenSeaCLI({ apiKey: process.env.OPENSEA_API_KEY })
|
|
120
102
|
|
|
121
|
-
const collection = await client.collections.get("
|
|
122
|
-
const stats = await client.collections.stats("
|
|
123
|
-
const nfts = await client.nfts.listByCollection("
|
|
124
|
-
const listings = await client.listings.best("
|
|
125
|
-
const events = await client.events.byCollection("
|
|
103
|
+
const collection = await client.collections.get("mfers")
|
|
104
|
+
const stats = await client.collections.stats("mfers")
|
|
105
|
+
const nfts = await client.nfts.listByCollection("mfers", { limit: 5 })
|
|
106
|
+
const listings = await client.listings.best("mfers", { limit: 10 })
|
|
107
|
+
const events = await client.events.byCollection("mfers", { eventType: "sale" })
|
|
126
108
|
const account = await client.accounts.get("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")
|
|
127
109
|
```
|
|
128
110
|
|
|
@@ -131,7 +113,7 @@ const account = await client.accounts.get("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA
|
|
|
131
113
|
JSON (default) - structured output for agents and scripts:
|
|
132
114
|
|
|
133
115
|
```bash
|
|
134
|
-
opensea collections get
|
|
116
|
+
opensea collections get mfers
|
|
135
117
|
```
|
|
136
118
|
|
|
137
119
|
Table - human-readable output:
|