rae

package module
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2025 License: MIT Imports: 13 Imported by: 2

README

📚 RAE API Go Client

Go Version Go Report Card Build Status

Un cliente Go elegante y eficiente para la rae-api.com, que proporciona acceso programático a definiciones de palabras, significados y conjugaciones verbales del diccionario de la Real Academia Española (RAE).

✨ Características

  • 🚀 API Simple - Interfaz limpia y fácil de usar
  • 📖 Múltiples Significados - Maneja palabras con múltiples acepciones
  • 🔄 Conjugaciones Completas - Todos los tiempos verbales (Indicativo, Subjuntivo, Imperativo)
  • 📝 Definiciones Ricas - Acceso a sinónimos, antónimos, etiquetas de uso
  • Lightweight - Sin dependencias pesadas
  • 🎯 Tipado Fuerte - Estructuras de datos bien definidas

Nota: Este no es un cliente oficial de la RAE. El uso de rae-api.com está sujeto a los términos y condiciones de la API.

📦 Instalación

go get github.com/rae-api-com/go-rae

🚀 Uso Rápido

Ejemplo Básico
package main

import (
	"context"
	"encoding/json"
	"fmt"
	"log"
	"time"

	rae "github.com/rae-api-com/go-rae"
)

func main() {
	// Crear un nuevo cliente
	client := rae.New()
	
	// Configurar timeout
	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
	defer cancel()
	
	// Buscar una palabra
	entry, err := client.Word(ctx, "hablar")
	if err != nil {
		log.Fatal(err)
	}
	
	// Mostrar resultado
	data, _ := json.MarshalIndent(entry, "", "  ")
	fmt.Println(string(data))
}
Con Opciones Personalizadas
client := rae.New(
	rae.WithTimeout(10*time.Second),
	rae.WithVersion("v1"),
)
Obtener Palabra Aleatoria
// Palabra aleatoria
randomWord, err := rae.GetRandom(ctx, "production")
if err != nil {
	log.Fatal(err)
}
fmt.Printf("Palabra del día: %s\n", randomWord)
Obtener Palabra Diaria
// Palabra diaria
dailyWord, err := rae.GetDaily(ctx, "production")
if err != nil {
	log.Fatal(err)
}
fmt.Printf("Palabra diaria: %s\n", dailyWord)

📋 Estructura de Respuesta

La API devuelve datos estructurados en el siguiente formato:

{
  "word": "hablar",
  "meanings": [
    {
      "origin": {
        "raw": "Del lat. comedĕre.",
        "type": "lat", 
        "text": "comedĕre"
      },
      "senses": [
        {
          "meaning_number": 1,
          "raw": "1. tr. Masticar...",
          "category": "verb",
          "usage": "common",
          "description": "Masticar y deglutir un alimento sólido.",
          "synonyms": ["masticar", "deglutir"],
          "antonyms": []
        }
      ],
      "conjugations": {
        "non_personal": {
          "infinitive": "hablar",
          "gerund": "hablando", 
          "participle": "hablado"
        },
        "indicative": {
          "present": {
            "singular_first_person": "hablo",
            "singular_second_person": "hablas",
            "singular_third_person": "habla"
            // ... más conjugaciones
          }
        }
        // ... más tiempos verbales
      }
    }
  ]
}

🛠️ API Reference

Tipos Principales
type Client struct {
    // campos internos
}

type Entry struct {
    Word     string    `json:"word"`
    Meanings []Meaning `json:"meanings"`
}

type Meaning struct {
    Origin       Origin       `json:"origin"`
    Senses       []Sense      `json:"senses"`
    Conjugations Conjugations `json:"conjugations,omitempty"`
}
Métodos del Cliente
Método Descripción Ejemplo
Word(ctx, word) Busca una palabra específica client.Word(ctx, "casa")
GetRandom(ctx, env) Obtiene una palabra aleatoria rae.GetRandom(ctx, "prod")
GetDaily(ctx, env) Obtiene la palabra del día rae.GetDaily(ctx, "prod")
Opciones de Configuración
// Configurar timeout personalizado
rae.WithTimeout(10 * time.Second)

// Configurar versión de la API
rae.WithVersion("v1")

🤝 Contribuir

¡Las contribuciones son bienvenidas! Por favor:

  1. Haz fork del proyecto
  2. Crea una rama para tu feature (git checkout -b feature/AmazingFeature)
  3. Haz commit de tus cambios (git commit -m 'Add some AmazingFeature')
  4. Push a la rama (git push origin feature/AmazingFeature)
  5. Abre un Pull Request

📝 Licencia

Este proyecto está bajo la Licencia MIT.

🙏 Reconocimientos

  • Este cliente utiliza el servicio rae-api.com, que no está afiliado con la Real Academia Española
  • Todo el contenido del diccionario pertenece a la RAE y está sujeto a sus términos y condiciones
  • Gracias a todos los contribuidores

📧 Soporte

Si encuentras algún problema o tienes sugerencias:


Hecho con ❤️ para la comunidad Go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWordNotFound = errors.New("word not found")
)

Functions

This section is empty.

Types

type AdditionalSense

type AdditionalSense struct {
	Number     int        `json:"number"`
	Definition string     `json:"definition"`
	Locutions  []Locution `json:"locutions"`
}

func (AdditionalSense) MarshalEasyJSON added in v0.5.0

func (v AdditionalSense) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AdditionalSense) MarshalJSON added in v0.5.0

func (v AdditionalSense) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AdditionalSense) UnmarshalEasyJSON added in v0.5.0

func (v *AdditionalSense) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AdditionalSense) UnmarshalJSON added in v0.5.0

func (v *AdditionalSense) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ApiResponse added in v0.2.0

type ApiResponse[T any] struct {
	Ok          bool     `json:"ok"`
	Data        T        `json:"data"`
	Err         string   `json:"error"`
	Suggestions []string `json:"suggestions"`
}

type Article

type Article struct {
	Category ArticleCategory `json:"category"`
	Gender   Gender          `json:"gender"`
}

func (Article) MarshalEasyJSON added in v0.5.0

func (v Article) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Article) MarshalJSON added in v0.5.0

func (v Article) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Article) UnmarshalEasyJSON added in v0.5.0

func (v *Article) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Article) UnmarshalJSON added in v0.5.0

func (v *Article) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ArticleCategory

type ArticleCategory string
const (
	ArticleCategoryDefinite   ArticleCategory = "definite"
	ArticleCategoryIndefinite ArticleCategory = "indefinite"
	ArticleCategoryNeuter     ArticleCategory = "neuter"
)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...ClientOption) *Client

func (*Client) Daily added in v0.2.0

func (c *Client) Daily(ctx context.Context) (string, error)

func (*Client) Random added in v0.2.0

func (c *Client) Random(ctx context.Context) (string, error)

func (*Client) Search added in v0.7.0

func (c *Client) Search(ctx context.Context, terms string) ([]SearchResult, error)

func (*Client) Word

func (c *Client) Word(ctx context.Context, word string) (WordEntry, error)

type ClientOption

type ClientOption func(*Client)

func WithTimeout

func WithTimeout(timeout time.Duration) ClientOption

func WithVersion

func WithVersion(version string) ClientOption

type Conjugation

type Conjugation struct {
	SingularFirstPerson        string `json:"singular_first_person"`
	SingularSecondPerson       string `json:"singular_second_person"`
	SingularFormalSecondPerson string `json:"singular_formal_second_person"`
	SingularThirdPerson        string `json:"singular_third_person"`
	PluralFirstPerson          string `json:"plural_first_person"`
	PluralSecondPerson         string `json:"plural_second_person"`
	PluralFormalSecondPerson   string `json:"plural_formal_second_person"`
	PluralThirdPerson          string `json:"plural_third_person"`
}

func (Conjugation) MarshalEasyJSON added in v0.5.0

func (v Conjugation) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Conjugation) MarshalJSON added in v0.5.0

func (v Conjugation) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Conjugation) UnmarshalEasyJSON added in v0.5.0

func (v *Conjugation) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Conjugation) UnmarshalJSON added in v0.5.0

func (v *Conjugation) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ConjugationImperative

type ConjugationImperative struct {
	SingularSecondPerson       string `json:"singular_second_person"`
	SingularFormalSecondPerson string `json:"singular_formal_second_person"`
	PluralSecondPerson         string `json:"plural_second_person"`
	PluralFormalSecondPerson   string `json:"plural_formal_second_person"`
}

func (ConjugationImperative) MarshalEasyJSON added in v0.5.0

func (v ConjugationImperative) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ConjugationImperative) MarshalJSON added in v0.5.0

func (v ConjugationImperative) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ConjugationImperative) UnmarshalEasyJSON added in v0.5.0

func (v *ConjugationImperative) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ConjugationImperative) UnmarshalJSON added in v0.5.0

func (v *ConjugationImperative) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ConjugationIndicative

type ConjugationIndicative struct {
	Present            Conjugation `json:"present"`
	PresentPerfect     Conjugation `json:"present_perfect"`     // Pretérito perfecto compuesto / Antepresente
	Imperfect          Conjugation `json:"imperfect"`           // Pretérito imperfecto / Copretérito
	PastPerfect        Conjugation `json:"past_perfect"`        // Pretérito pluscuamperfecto / Antecopretérito
	Preterite          Conjugation `json:"preterite"`           // Pretérito perfecto simple / Pretérito
	PastAnterior       Conjugation `json:"past_anterior"`       // Pretérito anterior / Antepretérito
	Future             Conjugation `json:"future"`              // Futuro simple
	FuturePerfect      Conjugation `json:"future_perfect"`      // Futuro compuesto / Antefuturo
	Conditional        Conjugation `json:"conditional"`         // Condicional simple / Pospretérito
	ConditionalPerfect Conjugation `json:"conditional_perfect"` // Condicional compuesto / Antepospretérito
}

func (ConjugationIndicative) MarshalEasyJSON added in v0.5.0

func (v ConjugationIndicative) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ConjugationIndicative) MarshalJSON added in v0.5.0

func (v ConjugationIndicative) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ConjugationIndicative) UnmarshalEasyJSON added in v0.5.0

func (v *ConjugationIndicative) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ConjugationIndicative) UnmarshalJSON added in v0.5.0

func (v *ConjugationIndicative) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ConjugationNonPersonal

type ConjugationNonPersonal struct {
	Infinitive         string `json:"infinitive"`
	Participle         string `json:"participle"`
	Gerund             string `json:"gerund"`
	CompoundInfinitive string `json:"compound_infinitive"`
	CompoundGerund     string `json:"compound_gerund"`
}

func (ConjugationNonPersonal) MarshalEasyJSON added in v0.5.0

func (v ConjugationNonPersonal) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ConjugationNonPersonal) MarshalJSON added in v0.5.0

func (v ConjugationNonPersonal) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ConjugationNonPersonal) UnmarshalEasyJSON added in v0.5.0

func (v *ConjugationNonPersonal) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ConjugationNonPersonal) UnmarshalJSON added in v0.5.0

func (v *ConjugationNonPersonal) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ConjugationSubjunctive

type ConjugationSubjunctive struct {
	Present        Conjugation `json:"present"`
	PresentPerfect Conjugation `json:"present_perfect"` // Pretérito perfecto compuesto / Antepresente
	Imperfect      Conjugation `json:"imperfect"`       // Pretérito imperfecto / Pretérito
	PastPerfect    Conjugation `json:"past_perfect"`    // Pretérito pluscuamperfecto / Antepretérito
	Future         Conjugation `json:"future"`          // Futuro simple
	FuturePerfect  Conjugation `json:"future_perfect"`  // Futuro compuesto / Antefuturo
}

func (ConjugationSubjunctive) MarshalEasyJSON added in v0.5.0

func (v ConjugationSubjunctive) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ConjugationSubjunctive) MarshalJSON added in v0.5.0

func (v ConjugationSubjunctive) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ConjugationSubjunctive) UnmarshalEasyJSON added in v0.5.0

func (v *ConjugationSubjunctive) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ConjugationSubjunctive) UnmarshalJSON added in v0.5.0

func (v *ConjugationSubjunctive) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Conjugations

type Conjugations struct {
	ConjugationNonPersonal ConjugationNonPersonal `json:"non_personal"`
	ConjugationIndicative  ConjugationIndicative  `json:"indicative"`
	ConjugationSubjunctive ConjugationSubjunctive `json:"subjunctive"`
	ConjugationImperative  ConjugationImperative  `json:"imperative"`
}

func (Conjugations) MarshalEasyJSON added in v0.5.0

func (v Conjugations) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Conjugations) MarshalJSON added in v0.5.0

func (v Conjugations) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Conjugations) UnmarshalEasyJSON added in v0.5.0

func (v *Conjugations) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Conjugations) UnmarshalJSON added in v0.5.0

func (v *Conjugations) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Definition

type Definition struct {
	Raw           string        `json:"raw"`
	MeaningNumber int           `json:"meaning_number"`
	Category      WordCategory  `json:"category"`
	VerbCategory  *VerbCategory `json:"verb_category,omitempty"`
	Gender        *Gender       `json:"gender,omitempty"`
	Article       *Article      `json:"article,omitempty"`
	Usage         Usage         `json:"usage"`
	Description   string        `json:"description"`
	Synonyms      []string      `json:"synonyms"`
	Antonyms      []string      `json:"antonyms"`
}

Definition represents a word definition.

func (Definition) MarshalEasyJSON added in v0.5.0

func (v Definition) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Definition) MarshalJSON added in v0.5.0

func (v Definition) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Definition) UnmarshalEasyJSON added in v0.5.0

func (v *Definition) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Definition) UnmarshalJSON added in v0.5.0

func (v *Definition) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Gender

type Gender string
const (
	GenderMasculine Gender = "masculine"
	GenderFeminine  Gender = "feminine"
	GenderBoth      Gender = "masculine_and_feminine"
	GenderUnknown   Gender = "unknown"
)

type Locution

type Locution struct {
	Text       string `json:"text"`
	Definition string `json:"definition"`
}

func (Locution) MarshalEasyJSON added in v0.5.0

func (v Locution) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Locution) MarshalJSON added in v0.5.0

func (v Locution) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Locution) UnmarshalEasyJSON added in v0.5.0

func (v *Locution) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Locution) UnmarshalJSON added in v0.5.0

func (v *Locution) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Meaning

type Meaning struct {
	Origin       *Origin       `json:"origin,omitempty"`
	Definitions  []Definition  `json:"senses"`
	Conjugations *Conjugations `json:"conjugations,omitempty"`
}

func (Meaning) MarshalEasyJSON added in v0.5.0

func (v Meaning) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Meaning) MarshalJSON added in v0.5.0

func (v Meaning) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Meaning) UnmarshalEasyJSON added in v0.5.0

func (v *Meaning) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Meaning) UnmarshalJSON added in v0.5.0

func (v *Meaning) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Origin

type Origin struct {
	Raw   string     `json:"raw"`
	Type  OriginType `json:"type"`
	Voice VoiceType  `json:"voice"`
	Text  string     `json:"text"`
}

type OriginType

type OriginType string
const (
	OriginLatin     OriginType = "lat"
	OriginUncertain OriginType = "uncertain"
)

type SearchResult added in v0.7.0

type SearchResult struct {
	Doc  doc `json:"doc"`
	Hits int `json:"hits"`
}

func GetSearch added in v0.4.0

func GetSearch(
	ctx context.Context,
	version string,
	terms string,
) ([]SearchResult, error)

func (SearchResult) MarshalEasyJSON added in v0.7.0

func (v SearchResult) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SearchResult) MarshalJSON added in v0.7.0

func (v SearchResult) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SearchResult) UnmarshalEasyJSON added in v0.7.0

func (v *SearchResult) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SearchResult) UnmarshalJSON added in v0.7.0

func (v *SearchResult) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*SearchResult) WordEntry added in v0.7.0

func (sr *SearchResult) WordEntry() (*WordEntry, error)

type Usage

type Usage string

Usage represents the usage type.

const (
	UsageCommon     Usage = "common"
	UsageRare       Usage = "rare"
	UsageOutdated   Usage = "outdated"
	UsageColloquial Usage = "colloquial"
	UsageObsolete   Usage = "obsolete" // desuso
	UsageUnknown    Usage = "unknown"
)

type VerbCategory

type VerbCategory string
const (
	VerbCategoryTransitive   VerbCategory = "transitive"   // Verbos transitivos
	VerbCategoryIntransitive VerbCategory = "intransitive" // Verbos intransitivos
	VerbCategoryCopulative   VerbCategory = "copulative"   // Verbos copulativos
	VerbCategoryReflexive    VerbCategory = "reflexive"    // Verbos reflexivos
	VerbCategoryDefective    VerbCategory = "defective"    // Verbos defectivos
	VerbCategoryPronominal   VerbCategory = "pronominal"   // Verbos recíprocos
	VerbCategoryAuxiliary    VerbCategory = "auxiliary"    // Verbos auxiliares
	VerbCategoryPredicative  VerbCategory = "predicative"  // Verbos predicativos
)

type VerbalMode

type VerbalMode string
const (
	VerbalModeIndicative  VerbalMode = "indicative"
	VerbalModeSubjunctive VerbalMode = "subjunctive"
	VerbalModeImperative  VerbalMode = "imperative"
	VerbalModeNonPersonal VerbalMode = "nonpersonal"
)

type VoiceType

type VoiceType string
const (
	VoiceOnomatopoeic VoiceType = "onomatopoeic"
	VoiceExpressive   VoiceType = "expressive"
)

type WordCategory

type WordCategory string
const (
	CategoryArticle      WordCategory = "article" // articulo
	CategoryNoun         WordCategory = "noun"    // sustantivo
	CategoryPronoun      WordCategory = "pronoun"
	CategoryAdjective    WordCategory = "adjective"
	CategoryVerb         WordCategory = "verb"
	CategoryAdverb       WordCategory = "adverb"
	CategoryPreposition  WordCategory = "preposition"
	CategoryConjunction  WordCategory = "conjunction"
	CategoryInterjection WordCategory = "interjection"
)

type WordEntry

type WordEntry struct {
	Word        string    `json:"word"`
	Meanings    []Meaning `json:"meanings"`
	Suggestions []string  `json:"suggestions"`
}

func (WordEntry) MarshalEasyJSON added in v0.5.0

func (v WordEntry) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (WordEntry) MarshalJSON added in v0.5.0

func (v WordEntry) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*WordEntry) UnmarshalEasyJSON added in v0.5.0

func (v *WordEntry) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*WordEntry) UnmarshalJSON added in v0.5.0

func (v *WordEntry) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type WordEntryResponse

type WordEntryResponse = ApiResponse[WordEntry]

func GetWord

func GetWord(
	ctx context.Context,
	version, word string,
) (*WordEntryResponse, error)

type WordResponse added in v0.2.0

type WordResponse = ApiResponse[WordSingle]

func GetDaily added in v0.2.0

func GetDaily(
	ctx context.Context,
	version string,
) (*WordResponse, error)

func GetRandom added in v0.2.0

func GetRandom(
	ctx context.Context,
	version string,
) (*WordResponse, error)

type WordSingle added in v0.2.0

type WordSingle struct {
	Word string `json:"word"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL