MCPcopy
hub / github.com/networkx/networkx / api

Function api

tools/team_list.py:24–29  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

22
23
24def api(url):
25 json = requests.get(url=url, headers={"Authorization": f"token {token}"}).json()
26 if "message" in json and json["message"] == "Bad credentials":
27 raise RuntimeError("Invalid token provided")
28 else:
29 return json
30
31
32resp = api(core_url)

Callers 2

team_list.pyFile · 0.85
render_teamFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected