From 126272989aa0ac698b34f4dc22f41463a5ddca78 Mon Sep 17 00:00:00 2001 From: Maddison Hellstrom Date: Sat, 18 Nov 2017 00:59:01 -0800 Subject: [PATCH] Update Domainr completion to use Mashape API --- completions.js | 4 ++-- conf.priv.example.js | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/completions.js b/completions.js index d11d9c4..9de0bd6 100644 --- a/completions.js +++ b/completions.js @@ -157,7 +157,7 @@ completions.do = { alias: 'do', name: 'domainr', search: 'https://domainr.com/?q=', - compl: `https://api.domainr.com/v2/search?client_id=${keys.domainr}&query=%s`, + compl: `https://domainr.p.mashape.com/v2/search?mashape-key=${keys.domainr}&query=%s`, }; completions.do.callback = function(response) { @@ -176,7 +176,7 @@ completions.do.callback = function(response) { runtime.command({ action: 'request', method: 'get', - url: `https://api.domainr.com/v2/status?client_id=${keys.domainr}&domain=${domainQuery}` + url: `https://domainr.p.mashape.com/v2/status?mashape-key=${keys.domainr}&domain=${domainQuery}` }, function(sresponse) { var sres = JSON.parse(sresponse.text).status; sres.map(function(s) { diff --git a/conf.priv.example.js b/conf.priv.example.js index e813b7d..9eeb935 100644 --- a/conf.priv.example.js +++ b/conf.priv.example.js @@ -15,12 +15,7 @@ var keys = { google_cs: "", // https://developers.google.com/custom-search/json-api/v1/overview?hl=en_US google_yt: "", // https://developers.google.com/youtube/v3/docs/ wolframalpha: "", // https://products.wolframalpha.com/api/ - - // Note: - // The Domainr API is configured for High-Volume usage, not Mashape. - // You will need to modify the code in completions.js to work with the Mashape API if desired. - // Open an issue if you can't figure this out and I'd be happy to help. - domainr: "", // https://domainr.build/docs/overview#section-try-it-for-free + domainr: "", // https://market.mashape.com/domainr/domainr //*** Google Custom Search Engines ***// // Can be created at https://cse.google.com/cse