This API gathering script you have, which requires looking through BP's websites, scraping their BP.json files (if they exist!), and collecting all that information, finding which API nodes exist... is now replaced with a single command.
I've replaced the whole gathering process with a single call to the table, like so:
./cleos -u https://eos.greymass.com get table producerjson producerjson producerjson | jq .rows[].json --raw-output | jq ".nodes[] | select(.ssl_endpoint != null) .ssl_endpoint"
Tada! Output looks like
"https://node0.eosblocksmith.io"
"https://eos.greymass.com"
As right now only 2 BPCs have plugged in their bp info's. But as BP's add their data, this call will always get the latest info.
Now anyone can validate immediately and not require any websites, just the blockchain itself.
+1 Thanks for sharing anyx! Very elegant way to retrieve SSL endpoints:
Notice there's 3 endpoints now wink (EOS Nation the 3rd producer to register)
We have now done it.. But I do not see swedencornet by ./cleos -u https://eos.greymass.com get table producerjson producerjson producerjson
Ref: https://bloks.io/transaction/522eea0fa90bd9e9ea3f97189d32fddddd3ffb57ea9617a0e1f746021bc9b501
If the end of the json contains "more" : true , you need to use limits and pagination to get all the results.
Thanks! Done it now...