Created
November 16, 2023 14:36
-
-
Save james-see/174e4c2073c34eef57f468a56dff64a9 to your computer and use it in GitHub Desktop.
draft kings api example with jq bare bones
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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