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-account-favorites.sh <address> [limit] [after] [sort_by] [sort_direction] [chains]" >&2 |
| #6 | echo "Get items favorited by an account" >&2 |
| #7 | exit 1 |
| #8 | fi |
| #9 |
| #10 | address="$1" |
| #11 | limit="${2:-20}" |
| #12 | after="${3:-}" |
| #13 | sort_by="${4:-}" |
| #14 | sort_direction="${5:-}" |
| #15 | chains="${6:-}" |
| #16 |
| #17 | query="limit=$limit" |
| #18 | [ -n "$after" ] && query="$query&after=$after" |
| #19 | [ -n "$sort_by" ] && query="$query&sort_by=$sort_by" |
| #20 | [ -n "$sort_direction" ] && query="$query&sort_direction=$sort_direction" |
| #21 | [ -n "$chains" ] && query="$query&chains=$chains" |
| #22 |
| #23 | "$(dirname "$0")/../opensea-get.sh" "/api/v2/account/${address}/favorites" "$query" |
| #24 |