aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/utils
diff options
context:
space:
mode:
authoralexwl <alexey.a.kiryushin@gmail.com>2019-02-20 18:58:57 +0300
committeralexwl <alexey.a.kiryushin@gmail.com>2019-02-20 18:58:57 +0300
commiteddf2c825dee199de0e958857f0daf3d08a07532 (patch)
treea2901b6273012308fb0b40a34c4610536a1da9e5 /javascript/app/utils
parentc831f86d259b6d949b0f71b894c7f2b07b4eed15 (diff)
Adds an option to use public Hoogle JSON API (https://github.com/ndmitchell/hoogle/blob/3dbf68bfd701f942d3af2e6debb74a0a78cd392e/docs/API.md#json-api) to get documentation for not indexed packages. Closes #21.
Diffstat (limited to 'javascript/app/utils')
-rw-r--r--javascript/app/utils/api-urls.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/javascript/app/utils/api-urls.js b/javascript/app/utils/api-urls.js
index d90c68a..7dce1c3 100644
--- a/javascript/app/utils/api-urls.js
+++ b/javascript/app/utils/api-urls.js
@@ -46,5 +46,8 @@ export const urls = {
},
globalIdentifiersUrl : function (query) {
return config.APP.apiUrlPrefix + "/globalIdentifiers/"+fixDots(encodeURIComponent(query));
+ },
+ hoogleDocsUrl : function (packageId,moduleName,entity,name) {
+ return config.APP.apiUrlPrefix + "/hoogleDocs/"+packageId+"/"+encodeURIComponent(moduleName)+"/"+entity+"/"+fixDots(encodeURIComponent(name));
}
}