Skip to content

Commit af279df

Browse files
authored
Merge pull request #21 from anxdpanic/dev
twitch added clips to v5, update clips to v5
2 parents 7d4649c + b7b4e23 commit af279df

File tree

6 files changed

+5
-16
lines changed

6 files changed

+5
-16
lines changed

addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="script.module.python.twitch" name="python-twitch for Kodi" version="1.0.0~beta4" provider-name="A Talented Community">
2+
<addon id="script.module.python.twitch" name="python-twitch for Kodi" version="1.0.0~beta5" provider-name="A Talented Community">
33
<requires>
44
<import addon="xbmc.python" version="2.1.0"/>
55
<import addon="script.module.six" version="1.9.0"/>

resources/lib/twitch/api/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- encoding: utf-8 -*-
22

3-
from twitch.api import v4
43
from twitch.api import v5
54
from twitch.api import v5 as default
65

7-
__all__ = ['v4', 'v5', 'default']
6+
__all__ = ['v5', 'default']

resources/lib/twitch/api/v4/__init__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

resources/lib/twitch/api/v5/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from twitch.api.v5 import channel_feed # NOQA
66
from twitch.api.v5 import channels # NOQA
77
from twitch.api.v5 import chat # NOQA
8-
from twitch.api.v4 import clips # NOQA
8+
from twitch.api.v5 import clips # NOQA
99
from twitch.api.v5 import collections # NOQA
1010
from twitch.api.v5 import communities # NOQA
1111
from twitch.api.v5 import games # NOQA

resources/lib/twitch/api/v4/clips.py renamed to resources/lib/twitch/api/v5/clips.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- encoding: utf-8 -*-
2-
# https://dev.twitch.tv/docs/v5/guides/clips-discovery/#clips-discovery-api-reference
2+
# https://dev.twitch.tv/docs/v5/reference/clips/
33

44
from twitch import keys
55
from twitch.api.parameters import Boolean, ClipPeriod, Cursor
6-
from twitch.queries import V4Query as Qry
6+
from twitch.queries import V5Query as Qry
77
from twitch.queries import query
88

99

resources/lib/twitch/queries.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
_clips_baseurl = 'https://clips.twitch.tv/'
1515
_uploads_baseurl = 'https://uploads.twitch.tv/'
1616

17-
_v4_headers = {'ACCEPT': 'application/vnd.twitchtv.v4+json'}
1817
_v5_headers = {'ACCEPT': 'application/vnd.twitchtv.v5+json'}
1918

2019

@@ -144,11 +143,6 @@ def __init__(self, path, headers={}, data={}, method=methods.PUT):
144143
self.add_path(path)
145144

146145

147-
class V4Query(ApiQuery):
148-
def __init__(self, path, method=methods.GET):
149-
super(V4Query, self).__init__(path, _v4_headers, method=method)
150-
151-
152146
class V5Query(ApiQuery):
153147
def __init__(self, path, method=methods.GET):
154148
super(V5Query, self).__init__(path, _v5_headers, method=method)

0 commit comments

Comments
 (0)