Commit ad580de
Fix fetch_markers passing list instead of dict (#451)
* Update user.py
The Twitch API describes the "videos" element in the response as "A list of videos that contain markers. The list contains a single video." Currently, that list is being passed when creating the VideoMarkers object, when only the first element of that "list" should be.
This fixes this issue that arises when retrieving markers:
``` File "C:\Users\Zari\AppData\Roaming\Python\Python312\site-packages\twitchio\models.py", line 814, in __init__
self.markers = [Marker(d) for d in data["markers"]]
~~~~^^^^^^^^^^^
TypeError: list indices must be integers or slices, not str```
* Update changelog.rst
* Update changelog.rst
---------
Co-authored-by: Tom <[email protected]>1 parent a5585de commit ad580de
2 files changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
773 | | - | |
| 773 | + | |
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
| |||
0 commit comments