From eca35b4a22da91bfd1366c22a31816239e0ac4ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Thu, 8 Feb 2024 01:01:13 +0100 Subject: [PATCH] [lexicon] Remove unused and deprecated API endpoints --- src/lexicon.js | 75 -------------------------------------------------- 1 file changed, 75 deletions(-) diff --git a/src/lexicon.js b/src/lexicon.js index 6b1f257..f3be88b 100644 --- a/src/lexicon.js +++ b/src/lexicon.js @@ -21,12 +21,6 @@ const lexicon = function (fetch, baseUrl, token) { delete (id) { return api.fetch(`nouns/${id}/`, 'DELETE') }, - addTraining (id, trainingId) { - return api.fetch(`nouns/${id}/add-training/`, 'POST', {training: trainingId}) - }, - removeTraining (id, trainingId) { - return api.fetch(`nouns/${id}/remove-training/`, 'POST', {training: trainingId}) - }, get (id) { return api.fetch(`nouns/${id}/`) }, @@ -37,29 +31,6 @@ const lexicon = function (fetch, baseUrl, token) { return api.fetch(`nouns/lemma-lookup/${trainingId}/${language}/${lemma}/`) } }, - missingNouns: { - list (training, options = {}) { - const query = { - training, - page: options.page, - ignored: options.ignored, - language: options.language, - search: options.search, - o: options.modified - } - const qs = new URLSearchParams(cleanQuery(query)).toString() - return api.fetch(`missing-nouns/?${qs}`) - }, - get (id) { - return api.fetch(`missing-nouns/${id}/`) - }, - ignore (id) { - return api.fetch(`missing-nouns/${id}/ignore/`, 'PUT') - }, - undoIgnore (id) { - return api.fetch(`missing-nouns/${id}/ignore/`, 'DELETE') - } - }, verbs: { list (trainings, options = {}) { const query = { @@ -94,29 +65,6 @@ const lexicon = function (fetch, baseUrl, token) { return api.fetch(`verbs/lemma-lookup/${trainingId}/${language}/${lemma}/`) } }, - missingVerbs: { - list (training, options = {}) { - const query = { - training, - page: options.page, - ignored: options.ignored, - language: options.language, - search: options.search, - o: options.modified - } - const qs = new URLSearchParams(cleanQuery(query)).toString() - return api.fetch(`missing-verbs/?${qs}`) - }, - get (id) { - return api.fetch(`missing-verbs/${id}/`) - }, - ignore (id) { - return api.fetch(`missing-verbs/${id}/ignore/`, 'PUT') - }, - undoIgnore (id) { - return api.fetch(`missing-verbs/${id}/ignore/`, 'DELETE') - } - }, adjectives: { list (trainings, options = {}) { const query = { @@ -151,29 +99,6 @@ const lexicon = function (fetch, baseUrl, token) { return api.fetch(`adjectives/lemma-lookup/${trainingId}/${language}/${lemma}/`) } }, - missingAdjectives: { - list (training, options = {}) { - const query = { - training, - page: options.page, - ignored: options.ignored, - language: options.language, - search: options.search, - o: options.modified - } - const qs = new URLSearchParams(cleanQuery(query)).toString() - return api.fetch(`missing-adjectives/?${qs}`) - }, - get (id) { - return api.fetch(`missing-adjectives/${id}/`) - }, - ignore (id) { - return api.fetch(`missing-adjectives/${id}/ignore/`, 'PUT') - }, - undoIgnore (id) { - return api.fetch(`missing-adjectives/${id}/ignore/`, 'DELETE') - } - }, languageDefinitions: { list () { return api.fetch('definitions/')