Skip to content

murat/mwgoapi

Repository files navigation

Merriam Webster Golang API Wrapper

Codacy Badge Codacy Badge

Usage examples

func main() {
  c := mwgoapi.NewClient(&http.Client{}, mwgoapi.BaseURL, "YOUR_API_KEY")
	r, err := c.Get("hello")
	if err != nil {
		fmt.Printf("could not get response, err: %v\n", err)
		os.Exit(1)
	}

	var collegiateResponse []mwgoapi.Collegiate
	if err := c.UnmarshalResponse(r, &collegiateResponse); err != nil {
		fmt.Printf("could not unmarshal response, err: %v\n", err)
		os.Exit(1)
	}

  fmt.Println(collegiateResponse)
}

Releases

No releases published

Packages

No packages published