Skip to content

Instantly share code, notes, and snippets.

@a-tal
Created August 25, 2017 21:20
Show Gist options
  • Save a-tal/fb727dbb8cc2800918b6d243e18969c8 to your computer and use it in GitHub Desktop.
Save a-tal/fb727dbb8cc2800918b6d243e18969c8 to your computer and use it in GitHub Desktop.
list ESI endpoints by auth requirement
import json
import requests
def main():
spec = requests.get("https://esi.tech.ccp.is/latest/swagger.json").json()
print("## requires auth\n{}\n".format(
"\n".join(sorted(
" - {} {}".format(z, x) for
x, y in spec["paths"].items() for
z, r in y.items() if "security" in r
))
))
print("## does not require auth\n{}".format(
"\n".join(sorted(
" - {} {}".format(z, x) for
x, y in spec["paths"].items() for
z, r in y.items() if not "security" in r
))
))
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment