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| #!/usr/bin/env bash |
| #2 | set -euo pipefail |
| #3 |
| #4 | if [ "$#" -lt 1 ]; then |
| #5 | echo "Usage: opensea-collections-batch.sh <slug1,slug2,...> | <body_json>" >&2 |
| #6 | echo "If the argument doesn't start with '{', it's treated as a comma-separated slug list" >&2 |
| #7 | exit 1 |
| #8 | fi |
| #9 |
| #10 | input="$1" |
| #11 |
| #12 | if [[ "$input" == \{* ]]; then |
| #13 | body="$input" |
| #14 | else |
| #15 | IFS=',' read -ra slugs <<<"$input" |
| #16 | arr="" |
| #17 | for s in "${slugs[@]}"; do |
| #18 | if [ -n "$arr" ]; then arr="$arr, "; fi |
| #19 | arr="$arr\"$s\"" |
| #20 | done |
| #21 | body="{\"slugs\":[$arr]}" |
| #22 | fi |
| #23 |
| #24 | "$(dirname "$0")/../opensea-post.sh" "/api/v2/collections/batch" "$body" |
| #25 |