-
Notifications
You must be signed in to change notification settings - Fork 4
/
blogUserInfos.clj
34 lines (30 loc) · 1.11 KB
/
blogUserInfos.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
(ns happygapi.blogger.blogUserInfos
"Blogger API: blogUserInfos.
The Blogger API provides access to posts, comments and pages of a Blogger blog.
See: https://developers.google.com/blogger/docs/3.0/getting_startedapi/reference/rest/v3/blogUserInfos"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn get$
"https://developers.google.com/blogger/docs/3.0/getting_startedapi/reference/rest/v3/blogUserInfos/get
Required parameters: userId, blogId
Optional parameters: maxPosts
Gets one blog and user info pair by blog id and user id."
{:scopes ["https://www.googleapis.com/auth/blogger"
"https://www.googleapis.com/auth/blogger.readonly"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{:blogId :userId})]}
(util/get-response
(http/get
(util/get-url
"https://blogger.googleapis.com/"
"v3/users/{userId}/blogs/{blogId}"
#{:blogId :userId}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))