Simplified & fixed Dictionary plugin
This commit is contained in:
@@ -19,23 +19,11 @@ impl Default for Config {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
#[derive(Deserialize)]
|
||||
struct ApiResponse {
|
||||
word: String,
|
||||
phonetic: Option<String>,
|
||||
phonetics: Vec<Phonetic>,
|
||||
origin: Option<String>,
|
||||
meanings: Vec<Meaning>,
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
#[derive(Deserialize)]
|
||||
struct Phonetic {
|
||||
text: String,
|
||||
audio: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct Meaning {
|
||||
#[serde(rename = "partOfSpeech")]
|
||||
@@ -43,13 +31,9 @@ struct Meaning {
|
||||
definitions: Vec<Definition>,
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
#[derive(Deserialize)]
|
||||
struct Definition {
|
||||
definition: String,
|
||||
example: Option<String>,
|
||||
synonyms: Vec<String>,
|
||||
antonyms: Vec<String>,
|
||||
}
|
||||
|
||||
#[init]
|
||||
|
Reference in New Issue
Block a user