-
Notifications
You must be signed in to change notification settings - Fork 4
/
superChatEvents.clj
35 lines (31 loc) · 1.15 KB
/
superChatEvents.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(ns happygapi.youtube.superChatEvents
"YouTube Data API v3: superChatEvents.
The YouTube Data API v3 is an API that provides access to YouTube data, such as videos, playlists, and channels.
See: https://developers.google.com/youtube/api/reference/rest/v3/superChatEvents"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn list$
"https://developers.google.com/youtube/api/reference/rest/v3/superChatEvents/list
Required parameters: part
Optional parameters: hl, maxResults, pageToken
Retrieves a list of resources, possibly filtered."
{:scopes ["https://www.googleapis.com/auth/youtube"
"https://www.googleapis.com/auth/youtube.force-ssl"
"https://www.googleapis.com/auth/youtube.readonly"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{:part})]}
(util/get-response
(http/get
(util/get-url
"https://youtube.googleapis.com/"
"youtube/v3/superChatEvents"
#{:part}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))