repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
Mirrored from https://github.com/ProjectOpenSea/opensea-skill
stars
latest
clone command
git clone gitlawb://did:key:z6MkqRzA...RfoM/ProjectOpenSea-...git clone gitlawb://did:key:z6MkqRzA.../ProjectOpenSea-...fef93001Release v2.14.012h ago| #1 |
| #!/usr/bin/env bash |
| #2 | set -euo pipefail |
| #3 |
| #4 | if [ "$#" -lt 1 ]; then |
| #5 | echo "Usage: opensea-collection-holders.sh <collection_slug> [limit] [cursor] [sort_direction] [owned_by]" >&2 |
| #6 | echo "Get holders of a collection ranked by quantity owned" >&2 |
| #7 | exit 1 |
| #8 | fi |
| #9 |
| #10 | slug="$1" |
| #11 | limit="${2:-20}" |
| #12 | cursor="${3:-}" |
| #13 | sort_direction="${4:-}" |
| #14 | owned_by="${5:-}" |
| #15 |
| #16 | query="limit=$limit" |
| #17 | if [ -n "$cursor" ]; then |
| #18 | query="$query&cursor=$cursor" |
| #19 | fi |
| #20 | if [ -n "$sort_direction" ]; then |
| #21 | query="$query&sort_direction=$sort_direction" |
| #22 | fi |
| #23 | if [ -n "$owned_by" ]; then |
| #24 | query="$query&owned_by=$owned_by" |
| #25 | fi |
| #26 |
| #27 | "$(dirname "$0")/../opensea-get.sh" "/api/v2/collections/${slug}/holders" "$query" |
| #28 |