pixabay

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package pixabay implements the material.Searcher interface for the Pixabay stock platform.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey     string
	RPM        int // requests per minute; default 100
	HTTPClient *http.Client
}

Config configures the Pixabay searcher.

type Searcher

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

Searcher queries the Pixabay API for images and videos.

func New

func New(cfg Config) *Searcher

New creates a Pixabay searcher. If APIKey is empty, falls back to PIXABAY_API_KEY env var.

func (*Searcher) Search

func (s *Searcher) Search(ctx context.Context, req material.Request) (material.Result, error)

Search queries Pixabay for images and/or videos matching the request.

func (*Searcher) Source

func (s *Searcher) Source() string

func (*Searcher) SupportedMediaTypes

func (s *Searcher) SupportedMediaTypes() []string

Jump to

Keyboard shortcuts

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