internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoGoodResult = errors.New("no good search results found")
	ErrAPIResponse  = errors.New("arXiv api responded with error")
)

Functions

This section is empty.

Types

type Client

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

Client defines an HTTP client for communicating with arXiv.

func NewClient

func NewClient(maxResults int, userAgent string) *Client

NewClient initializes a Client with arguments for setting a max results per search query and a value for the user agent header.

func (*Client) Search

func (client *Client) Search(ctx context.Context, query string) (string, error)

Search performs a search query and returns the result as string and an error if any.

type Result

type Result struct {
	Title       string
	Authors     []string
	Summary     string
	PdfURL      string
	PublishedAt string
}

Result defines a search query result type.

Jump to

Keyboard shortcuts

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