12 lines
497 B
Bash
Executable File
12 lines
497 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
API_URL="https://graphql.ordrestyring.dk/graphql"
|
|
KEY_FILE="$ROOT_DIR/apikey"
|
|
API_KEY=$(tr -d '\r\n' < "$KEY_FILE")
|
|
|
|
curl -sS -X POST "$API_URL" \
|
|
-H "Authorization: Bearer $API_KEY" \
|
|
-H "Content-Type: application/json" \
|
|
--data '{"query":"query { invoiceAdditions(pagination: {cursor: null, limit: 10}) { items { id name percentage fixedPrice type } nextCursor previousCursor } }" }' | jq .
|