Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddWordRequest ¶
AddWordRequest is a request for AddWord
type AddWordWithContextRequest ¶ added in v0.0.2
type AddWordWithContextRequest struct { Word string `url:"word"` Translation string `url:"tword"` Context string `url:"context"` }
AddWordWithContextRequest is a request for AddWordWithContext
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an API client
func (Client) AddWordWithContext ¶ added in v0.0.2
AddWordWithContext add a word with a context ToDo: Rewrite the method to combine it with an AddWord call
func (Client) DownloadPicture ¶ added in v0.0.2
DownloadPicture posts a picture to the translation
type LoginRequest ¶
LoginRequest is a request for Login
type LoginResponse ¶
type LoginResponse struct { User UserDataResponse `json:"user"` // contains filtered or unexported fields }
LoginResponse is an entity which represents LoginResponse
type TranslationRequest ¶
type TranslationRequest struct {
Word string `url:"word"`
}
TranslationRequest is a request for Translation
type UserDataResponse ¶
type UserDataResponse struct { Username string `json:"nickname"` ID int `json:"user_id"` Key string `json:"autologin_key"` }
UserDataResponse is an entity which represents UserDataResponse
type UserDict ¶ added in v0.0.2
type UserDict struct { Name string `json:"name"` Count uint `json:"count"` Words []Word `json:"words"` }
UserDict is an entity which represents UserDict
type UserTranslate ¶
UserTranslate is an entity which represents UserTranslate
type Word ¶
type Word struct { ID uint `json:"word_id"` Value string `json:"word_value"` Transcript string `json:"transcription"` // Created time.Time `json:"created_at"` // LastUpdated time.Time `json:"last_updated_at"` Translations []UserTranslate `json:"translate"` TranslateID int `json:"translate_id"` SoundURL string `json:"sound_url"` PictureURL string `json:"pic_url"` // contains filtered or unexported fields }
Word is a word representation
Click to show internal directories.
Click to hide internal directories.