From 58b854c0896ebb63f28d53329a0dc89498eaca36 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Sat, 9 Nov 2024 08:01:27 -0800 Subject: [PATCH] Add id lookup --- .zshrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.zshrc b/.zshrc index 08c7ec4..93dd088 100644 --- a/.zshrc +++ b/.zshrc @@ -335,6 +335,18 @@ getprodadsktoken() { | jq -r '.access_token' } +devidlookup() { + curl -s -H "Authorization: Bearer ${$(getdevadsktoken)}" -H 'Content-Type: application/json' "https://developer-dev.api.autodesk.com/userprofile/v1/users/${1}" | jq -r .userId +} + +stageidlookup() { + curl -s -H "Authorization: Bearer ${$(getstageadsktoken)}" -H 'Content-Type: application/json' "https://developer-stg.api.autodesk.com/userprofile/v1/users/${1}" | jq -r .userId +} + +prodidlookup() { + curl -s -H "Authorization: Bearer ${$(getprodadsktoken)}" -H 'Content-Type: application/json' "https://developer.api.autodesk.com/userprofile/v1/users/${1}" | jq -r .userId +} + # load-nvm() { # export NVM_DIR="$HOME/.nvm" # [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm