Skip to content

Commit 84b26e2

Browse files
committed
Add saved animation endpoints
1 parent 55847dc commit 84b26e2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

animatedledstrip/als_http_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ def get_sections_dict(self) -> Dict[str, 'Section']:
104104
def start_animation(self, anim_params: 'AnimationToRunParams') -> 'RunningAnimationParams':
105105
return self.decoder.decode_object_with_type(self._post_data('/start', anim_params), 'RunningAnimationParams')
106106

107+
def save_animation(self, anim_params: 'AnimationToRunParams') -> str:
108+
return self._post_data('/save', anim_params)
109+
110+
def get_saved_animations(self) -> List['AnimationToRunParams']:
111+
return self.decoder.decode_list_with_type(self._get_data('/saved'), 'AnimationToRunParams')
112+
107113
def clear_strip(self):
108114
# TODO: Fix 404
109115
self._post_data('/strip/clear', None)

0 commit comments

Comments
 (0)