MCPcopy Create free account
hub / github.com/NyarchLinux/DesktopPuppet / get_motions

Method get_motions

puppet_extension.py:226–235  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

224 requests.post(f'{self.base_url}/expression', json={'expression': expression})
225
226 def get_motions(self):
227 if len(self._motions_raw) > 0:
228 return self._motions_raw
229 self._motions_raw = []
230 response = requests.get(f'{self.base_url}/motions')
231 if response.status_code == 200:
232 self._motions_raw = response.json()
233 else:
234 return []
235 return self._motions_raw
236
237 def do_motion(self, motion : str):
238 requests.post(f'{self.base_url}/motion', json={'motion': motion})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected