unsplash

package
v0.0.0-...-eb5df2c Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

func NewAPIClient

func NewAPIClient(token string) APIClient

func (*APIClient) Search

func (c *APIClient) Search(query string) (*APIResponse, error)

type APIResponse

type APIResponse struct {
	Total      int             `json:"total"`
	TotalPages int             `json:"total_pages"`
	Results    []PictureResult `json:"results"`
}

func LoadRockets

func LoadRockets() (*APIResponse, error)

type PictureResult

type PictureResult struct {
	ID      string            `json:"id"`
	Width   int               `json:"width"`
	Height  int               `json:"height"`
	URLs    map[string]string `json:"urls"`
	Resized string
}

Jump to

Keyboard shortcuts

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