randword

package
v0.0.0-...-1ee3c8e Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package randword provides a client to the random word generator API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an HTTP client for a random word generator API.

func NewClient

func NewClient(baseURL string) *Client

NewClient constructs a new client that is configured to use the given endpoint specified by baseURL.

func (*Client) Adjective

func (c *Client) Adjective() (string, error)

Adjective requests a random adjective.

func (*Client) Animal

func (c *Client) Animal() (string, error)

Animal requests a random animal name.

func (*Client) HumanReadableSlug

func (c *Client) HumanReadableSlug() (string, error)

HumanReadableSlug returns a randomly generated URL slug comprised of hyphen-separated words.

func (*Client) Noun

func (c *Client) Noun() (string, error)

Noun requests a random noun.

Jump to

Keyboard shortcuts

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