Skip to content

Commit 9319b1e

Browse files
committed
Update endpoint to fetch a video data and add a new method/endpoint to fetch a clip data
1 parent f4bfbc1 commit 9319b1e

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

lib/twitch/client.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def channel_videos(channel_id, options = {})
289289
end
290290

291291
def video(video_id)
292-
path = "/videos/#{video_id}/"
292+
path = "/videos?id=#{video_id}"
293293
url = @base_url + path
294294

295295
get(url)
@@ -314,6 +314,15 @@ def top_videos(options = {})
314314
get(url)
315315
end
316316

317+
# Clips
318+
319+
def clip(clip_id)
320+
path = "/clips?id=#{clip_id}"
321+
url = @base_url + path
322+
323+
get(url)
324+
end
325+
317326
# Blocks
318327

319328
def blocks(user_id, options = {})

0 commit comments

Comments
 (0)