ArxivQuery
public struct ArxivQuery : Codable
extension ArxivQuery: CustomStringConvertible
extension ArxivQuery: ArxivRequest
Specifies search criteria for arXiv request.
ArxivQuery
represents either a search term in specified article field,
a date intervarl in which desired articles were published or updated or an arXive subject.
Queries can be combined to construct arbitrarily complex queries by using all
and any
combinators.
It is also possible to exclude articles matching a query by using excluding
combinator.
-
Used to restrict term search to specific article field.
To search given term in any field, use
See moreArxivQuery.Field.any
.Declaration
Swift
public struct Field : Codable
-
Returns a string representation of the query.
Declaration
Swift
var string: String { get }
-
Returns a new query for retrieving the articles matching the query AND NOT the provided subqueries.
Semantics of the returned query is to exclude the articles matching all of the provided subqueries. In other words,
.excluding { q1; q2; q3 }
is equivalent to.excluding { all { q1; q2; q3 } }
. Use.excluding { any { q1; q2; q3; } }
to exclude the articles mathing any of the subqueries.Declaration
Swift
func excluding(@ArxivQueryBuilder _ queries: () -> [ArxivQuery]) -> ArxivQuery
Parameters
queries
A query builder that creates list of subqueries to exclude.
-
Declaration
Swift
public var description: String { get }
-
Returns
ArxivRequestSpecification(query: self)
.Declaration
Swift
public var requestSpecification: ArxivRequestSpecification { get }
-
Creates a request for retrieving the articles matching the query and belonging to provided ID list.
To retrieve a specific version of an article, end the corresponding ID with
vN
suffix whereN
is the desired version number. If an identifier without the suffix is provided, the most recent version will be retrieved.ArxivEntry
type has properties for getting the version and versioned IDs of the corresponing article.For detailed explanation of arXiv identifiers see arXiv help.
Declaration
Swift
func scopedTo(_ firstID: String, _ otherIDs: String...) -> ArxivRequestSpecification
Parameters
firstID
An arXiv artile IDs.
otherIDs
Other optional IDs.