Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
moved to api_from_openapi()
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Jan 2, 2024
1 parent f42454b commit 38ea7a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/example_list_api_from_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys
import json

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))
import CloudFlare

Expand All @@ -13,10 +14,13 @@ def main():

cf = CloudFlare.CloudFlare()
try:
found_comands= cf.api_from_web()
found_comands = cf.api_from_openapi()
except Exception as e:
exit('api_from_web: - %s - api call connection failed' % (e))

# {"action": "GET", "cmd": "/accounts", "deprecated": false, "deprecated_date": "", "deprecated_already": false}
# {"action": "DELETE", "cmd": "/accounts/:id/addressing/prefixes/:id/delegations", "deprecated": false, "deprecated_date": "", "deprecated_already": false, "content_type": "application/json"}

cmds = {}
for r in found_comands:
if r['deprecated'] or r['deprecated_already']:
Expand Down

0 comments on commit 38ea7a2

Please sign in to comment.