Documentation
¶
Index ¶
- type Query
- func (q *Query) Between(from, to int) *Query
- func (q *Query) OnlyOA(flag bool) *Query
- func (q *Query) Order(o SortOrder) *Query
- func (q *Query) ToArxiv() url.Values
- func (q *Query) ToCrossref() url.Values
- func (q *Query) ToOpenAlex() url.Values
- func (q *Query) WithAuthor(a string) *Query
- func (q *Query) WithCategory(c string) *Query
- func (q *Query) WithMaxResults(n int) *Query
- func (q *Query) WithText(s string) *Query
- func (q *Query) WithTitle(t string) *Query
- func (q *Query) WithType(t string) *Query
- type SortOrder
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 (*Query) ToCrossref ¶
ToCrossref returns querystring params ready for api.crossref.org/works
func (*Query) ToOpenAlex ¶
ToOpenAlex returns querystring params for /works
func (*Query) WithAuthor ¶
func (*Query) WithCategory ¶
func (*Query) WithMaxResults ¶
Click to show internal directories.
Click to hide internal directories.