Get available motions from the puppet.
(self)
| 55 | return False |
| 56 | |
| 57 | def get_motions(self): |
| 58 | """Get available motions from the puppet.""" |
| 59 | try: |
| 60 | response = requests.get(f"{self.base_url}/motions", timeout=2) |
| 61 | response.raise_for_status() |
| 62 | return response.json() |
| 63 | except requests.RequestException: |
| 64 | return {} |
| 65 | |
| 66 | def set_motion(self, motion): |
| 67 | """Set a motion on the puppet.""" |