Documentation
¶
Overview ¶
Package tydaapi supplies functionality for querying tyda.se and defines a custom response format that plays well with JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Languages = map[string]string{
"sv": "Svenska",
"en": "Engelska",
"fr": "Franska",
"de": "Tyska",
"es": "Spanska",
"la": "Latin",
"nb": "Norska",
}
Languages is a map from short to long form of languages
Functions ¶
Types ¶
type Response ¶
type Response struct {
SearchTerm string `json:"search_term"`
Language string `json:"language"`
PronunciationURL string `json:"pronunciation_url"`
Conjugations []string `json:"conjugations"`
WordClass string `json:"word_class"`
Translations []Translation `json:"translations"`
Synonyms []Word `json:"synonyms"`
}
Response contains all data parsed that should be delivered
type Translation ¶
type Translation struct {
Language string `json:"language"`
Description string `json:"description"`
Words []Word `json:"words"`
}
Translation represents one type of translation
Click to show internal directories.
Click to hide internal directories.