MCPcopy
hub / github.com/StackStorm/st2 / get

Function get

pants-plugins/release/packagecloud_rules.py:105–115  ·  view source on GitHub ↗
(url_path: str)

Source from the content-addressed store, hash-verified

103 client.auth = HTTPBasicAuth(package_cloud_token, "")
104
105 def get(url_path: str) -> list[dict[str, Any]]:
106 response = client.get(f"https://packagecloud.io{url_path}")
107 response.raise_for_status()
108 ret: list[dict[str, Any]] = response.json()
109 next_url = response.links.get("next", {}).get("url")
110 while next_url:
111 response = client.get(f"https://packagecloud.io{next_url}")
112 response.raise_for_status()
113 ret.extend(response.json())
114 next_url = response.links.get("next", {}).get("url")
115 return ret
116
117 distro_id = request.distro_id
118 distro_info = DISTRO_INFO[distro_id]

Callers 1

Calls 3

getMethod · 0.45
raise_for_statusMethod · 0.45
jsonMethod · 0.45

Tested by

no test coverage detected