Skip to content

Commit

Permalink
[lexicon] Remove unused and deprecated API endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-k committed Feb 8, 2024
1 parent 79f8922 commit eca35b4
Showing 1 changed file with 0 additions and 75 deletions.
75 changes: 0 additions & 75 deletions src/lexicon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}/`)
},
Expand All @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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/')
Expand Down

0 comments on commit eca35b4

Please sign in to comment.