MCPcopy Index your code
hub / github.com/StackStorm/st2 / get_all

Method get_all

st2client/st2client/models/core.py:221–252  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

219
220 @add_auth_token_to_kwargs_from_env
221 def get_all(self, **kwargs):
222 # TODO: This is ugly, stop abusing kwargs
223 url = "/%s" % self.resource.get_url_path_name()
224 limit = kwargs.pop("limit", None)
225 pack = kwargs.pop("pack", None)
226 prefix = kwargs.pop("prefix", None)
227 user = kwargs.pop("user", None)
228 offset = kwargs.pop("offset", 0)
229
230 params = kwargs.pop("params", {})
231
232 if limit:
233 params["limit"] = limit
234
235 if pack:
236 params["pack"] = pack
237
238 if prefix:
239 params["prefix"] = prefix
240
241 if user:
242 params["user"] = user
243
244 if offset:
245 params["offset"] = offset
246
247 response = self.client.get(url=url, params=params, **kwargs)
248 if response.status_code != http_client.OK:
249 self.handle_error(response)
250 return [
251 self.resource.deserialize(item) for item in parse_api_response(response)
252 ]
253
254 @add_auth_token_to_kwargs_from_env
255 def get_by_id(self, id, **kwargs):

Callers 15

test_resource_get_allMethod · 0.95
runMethod · 0.45
runMethod · 0.45
run_and_printMethod · 0.45
run_and_printMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45

Calls 6

handle_errorMethod · 0.95
parse_api_responseFunction · 0.85
get_url_path_nameMethod · 0.80
deserializeMethod · 0.80
popMethod · 0.45
getMethod · 0.45