querydsl

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2025 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 Query

type Query struct {
	Text       string // free-text or phrase
	Author     string // family name or full string
	Title      string // words or phrase
	Category   string // arXiv primary category, e.g. "cs.AI"
	WorkType   string // Crossref/OpenAlex type, e.g. "journal-article"
	FromYear   int    // inclusive YYYY
	ToYear     int    // inclusive YYYY
	OpenAccess *bool  // true ➜ OA only, false ➜ closed only, nil ➜ ignore
	Sort       SortOrder
	MaxResults int // maximum number of results to return
}

func New

func New() *Query

New returns a zero-value Query you can chain.

func (*Query) Between

func (q *Query) Between(from, to int) *Query

func (*Query) OnlyOA

func (q *Query) OnlyOA(flag bool) *Query

func (*Query) Order

func (q *Query) Order(o SortOrder) *Query

func (*Query) ToArxiv

func (q *Query) ToArxiv() url.Values

ToArxiv returns url.Values containing search_query and sort parameters

func (*Query) ToCrossref

func (q *Query) ToCrossref() url.Values

ToCrossref returns querystring params ready for api.crossref.org/works

func (*Query) ToOpenAlex

func (q *Query) ToOpenAlex() url.Values

ToOpenAlex returns querystring params for /works

func (*Query) WithAuthor

func (q *Query) WithAuthor(a string) *Query

func (*Query) WithCategory

func (q *Query) WithCategory(c string) *Query

func (*Query) WithMaxResults

func (q *Query) WithMaxResults(n int) *Query

func (*Query) WithText

func (q *Query) WithText(s string) *Query

func (*Query) WithTitle

func (q *Query) WithTitle(t string) *Query

func (*Query) WithType

func (q *Query) WithType(t string) *Query

type SortOrder

type SortOrder int

SortOrder is intentionally tiny: just the options all three APIs share.

const (
	SortRelevance SortOrder = iota
	SortNewest
	SortOldest
)

Jump to

Keyboard shortcuts

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