| Crates.io | arxiv-tools |
| lib.rs | arxiv-tools |
| version | 1.2.0 |
| created_at | 2024-12-13 13:55:05.806365+00 |
| updated_at | 2026-01-04 05:03:35.24966+00 |
| description | Tools for arXiv API. |
| homepage | |
| repository | https://github.com/akitenkrad/rs-arxiv-tools.git |
| max_upload_size | |
| id | 1482213 |
| size | 88,650 |
Tools for arXiv API.
To start using arxiv-tools, just add it to your project's dependencies in the Cargo.toml.
> cargo add arxiv-tools
Then, import it in your program.
use arxiv_tools::ArXiv;
use arxiv_tools::{ArXiv, QueryParams};
#[tokio::main]
async fn main() {
let mut arxiv = ArXiv::from_args(QueryParams::title("attention is all you need"));
let papers = arxiv.query().await;
println!("{:?}", papers.first().unwrap().title);
}
use arxiv_tools::ArXiv;
#[tokio::main]
async fn main() {
// Fetch specific papers by their arXiv IDs
let mut arxiv = ArXiv::from_id_list(vec!["1706.03762", "1810.04805"]);
let papers = arxiv.query().await;
for paper in papers {
println!("{}: {}", paper.id, paper.title);
}
}
See the Documents for more details.
id_list support for querying papers by arXiv IDs.ArXiv::from_id_list() constructor.ArXiv::id_list() method.submittedDate.start, max_results, sortBy, sortOrder.