mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 05:39:06 +00:00
Do not version API. Premature given current state of the codebase
- Reason - All clients that currently consume the API are part of Khoj - Any breaking API changes will be fixed in clients immediately - So decoupling client from API is not required - This removes the burden of maintaining muliple versions of the API
This commit is contained in:
@@ -226,7 +226,7 @@ Use `which-key` if available, else display simple message in echo area"
|
||||
|
||||
(defun khoj--get-enabled-content-types ()
|
||||
"Get content types enabled for search from API."
|
||||
(let ((config-url (format "%s/api/v1.0/config/data" khoj-server-url)))
|
||||
(let ((config-url (format "%s/api/config/data" khoj-server-url)))
|
||||
(with-temp-buffer
|
||||
(erase-buffer)
|
||||
(url-insert-file-contents config-url)
|
||||
@@ -243,7 +243,7 @@ Use `which-key` if available, else display simple message in echo area"
|
||||
"Construct API Query from QUERY, SEARCH-TYPE and (optional) RERANK params."
|
||||
(let ((rerank (or rerank "false"))
|
||||
(encoded-query (url-hexify-string query)))
|
||||
(format "%s/api/v1.0/search?q=%s&t=%s&r=%s&n=%s" khoj-server-url encoded-query search-type rerank khoj-results-count)))
|
||||
(format "%s/api/search?q=%s&t=%s&r=%s&n=%s" khoj-server-url encoded-query search-type rerank khoj-results-count)))
|
||||
|
||||
(defun khoj--query-api-and-render-results (query search-type query-url buffer-name)
|
||||
"Query Khoj API using QUERY, SEARCH-TYPE, QUERY-URL.
|
||||
|
||||
Reference in New Issue
Block a user