Skip to content

Conversation

@drohit-cb
Copy link

@drohit-cb drohit-cb commented May 5, 2025

This PR helps make printing of metadata such as status code, JWT to screen optional behind explicit flags.

This allows the response body (if json) to directly be piped into tools such as jq.

Before

>> cdpcurl -k <API_KEY> https://api.cdp.coinbase.com/platform/v1/networks/ethereum-mainnet/addresses/0x87Bf57c3d7B211a100ee4d00dee08435130A62fA/reputation | jq .
200
jq: parse error: Invalid numeric literal at line 2, column 0

After

>> cdpcurl -k <API_KEY>https://api.cdp.coinbase.com/platform/v1/networks/ethereum-mainnet/addresses/0x87Bf57c3d7B211a100ee4d00dee08435130A62fA/reputation | jq .
{
  "metadata": {
    "activity_period_days": 631,
    "bridge_transactions_performed": 4,
    "current_active_streak": 0,
    "ens_contract_interactions": 0,
    "lend_borrow_stake_transactions": 29,
    "longest_active_streak": 3,
    "smart_contract_deployments": 0,
    "token_swaps_performed": 0,
    "total_transactions": 102,
    "unique_days_active": 55
  },
  "score": 51
}

@drohit-cb drohit-cb changed the title feat: make printing JWT and status code to screen optional so that a … feat: Make printing metadata to screen optional behind cmd flags. May 5, 2025
@drohit-cb drohit-cb requested a review from dimei-BT May 5, 2025 19:37
@drohit-cb drohit-cb marked this pull request as ready for review May 5, 2025 19:37
@derek-cb
Copy link

derek-cb commented May 5, 2025

Approved, pending changes have been tested!

@derek-cb derek-cb self-requested a review May 6, 2025 16:34
@drohit-cb drohit-cb closed this Jun 4, 2025
@drohit-cb drohit-cb reopened this Jun 4, 2025
@drohit-cb drohit-cb requested review from derek-cb and dimei-BT June 4, 2025 15:39
@drohit-cb drohit-cb closed this Jun 17, 2025
@drohit-cb drohit-cb reopened this Jun 17, 2025
@drohit-cb drohit-cb closed this Jun 17, 2025
@drohit-cb drohit-cb reopened this Jun 17, 2025
@cb-heimdall
Copy link

cb-heimdall commented Jun 17, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@drohit-cb
Copy link
Author

Looks like heimdall works now.. @dimei-BT can I get another review

@drohit-cb drohit-cb requested a review from dimei-BT June 17, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants