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

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