Skip to content

Instantly share code, notes, and snippets.

@james-see
Created November 16, 2023 14:36
Show Gist options
  • Save james-see/174e4c2073c34eef57f468a56dff64a9 to your computer and use it in GitHub Desktop.
Save james-see/174e4c2073c34eef57f468a56dff64a9 to your computer and use it in GitHub Desktop.
draft kings api example with jq bare bones
#!/bin/bash
## must have jq installed already and curl
curl https://api.draftkings.com/draftgroups/v1/draftgroups/95258/draftables | jq '[.draftables[] | select(.isDisabled != true) | {displayName: .displayName, position: .position, salary: .salary, FPTG: (.draftStatAttributes | map(select(.id == 90)) | first.value // null), OPTS: (.draftStatAttributes | map(select(.id == -2)) | first.value // null)}] | unique_by(.displayName)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment