-
Notifications
You must be signed in to change notification settings - Fork 4
/
urlTestingTools.clj
39 lines (33 loc) · 1.14 KB
/
urlTestingTools.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
(ns happygapi.searchconsole.urlTestingTools
"Google Search Console URL Testing Tools API: urlTestingTools.
Provides tools for running validation tests against single URLs
See: https://developers.google.com/webmaster-tools/search-console-api/api/reference/rest/v1/urlTestingTools"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn mobileFriendlyTest-run$
"https://developers.google.com/webmaster-tools/search-console-api/api/reference/rest/v1/urlTestingTools/mobileFriendlyTest/run
Required parameters: none
Optional parameters: none
Body:
{:url string, :requestScreenshot boolean}
Runs Mobile-Friendly Test for a given URL."
{:scopes nil}
[auth args body]
{:pre [(util/has-keys? args #{})]}
(util/get-response
(http/post
(util/get-url
"https://searchconsole.googleapis.com/"
"v1/urlTestingTools/mobileFriendlyTest:run"
#{}
args)
(merge-with
merge
{:content-type :json,
:body (json/generate-string body),
:throw-exceptions false,
:query-params args,
:accept :json,
:as :json}
auth))))