-
Notifications
You must be signed in to change notification settings - Fork 4
/
onboarding.clj
59 lines (51 loc) · 1.74 KB
/
onboarding.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
(ns happygapi.books.onboarding
"Books API: onboarding.
The Google Books API allows clients to access the Google Books repository.
See: https://code.google.com/apis/books/docs/v1/getting_started.htmlapi/reference/rest/v1/onboarding"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn listCategories$
"https://code.google.com/apis/books/docs/v1/getting_started.htmlapi/reference/rest/v1/onboarding/listCategories
Required parameters: none
Optional parameters: locale
List categories for onboarding experience."
{:scopes ["https://www.googleapis.com/auth/books"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{})]}
(util/get-response
(http/get
(util/get-url
"https://books.googleapis.com/"
"books/v1/onboarding/listCategories"
#{}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))
(defn listCategoryVolumes$
"https://code.google.com/apis/books/docs/v1/getting_started.htmlapi/reference/rest/v1/onboarding/listCategoryVolumes
Required parameters: none
Optional parameters: categoryId, locale, maxAllowedMaturityRating, pageSize, pageToken
List available volumes under categories for onboarding experience."
{:scopes ["https://www.googleapis.com/auth/books"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{})]}
(util/get-response
(http/get
(util/get-url
"https://books.googleapis.com/"
"books/v1/onboarding/listCategoryVolumes"
#{}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))