kbbi
Constants #
const (
entry_url = urllib.parse('https://kbbi.kemdikbud.go.id/entri') or { panic(err) }
login_url = urllib.parse('https://kbbi.kemdikbud.go.id/Account/Login') or { panic(err) }
)
fn entry #
fn entry(word string) ![]Entry
entry returns representations of KBBI search with key word
fn new_client_from_login #
fn new_client_from_login(c ClientFromLoginConfig) !Client
new_client_from_login creates a client by simulating a login using username and password
struct Client #
struct Client {
pub mut:
cookie string
}
fn (Client) entry #
fn (c Client) entry(word string) ![]Entry
entry returns representations of KBBI search with key word
fn (Client) is_logged_in #
fn (c Client) is_logged_in() !bool
is_logged_in returns true if cookies is valid (implies logged in)
struct ClientFromLoginConfig #
struct ClientFromLoginConfig {
username string [required]
password string [required]
}
struct Entry #
struct Entry {
pub:
title string
word string
nonstandard_word string
original_word string
entries []EntryItem
}
struct EntryExampleItem #
struct EntryExampleItem {
pub:
value string
description string
}
struct EntryItem #
struct EntryItem {
pub:
description string
examples []EntryExampleItem
kinds []EntryKindItem
}
struct EntryKindItem #
struct EntryKindItem {
pub:
abbreviation string
description string
}