Expand description
§Semantic Scholar Tools
This library provides tools to interact with the Semantic Scholar API.
§Quick Start
This is a simple example to get you started with ss-tools
.
The following code snippet shows how to query a paper by its title:
use anyhow::Result;
use ss_tools::{SemanticScholar, QueryParams};
let query_text = "Attention Is All You Need";
// Create a new instance of SemanticScholar
let mut ss = SemanticScholar::new();
let mut query_params = QueryParams::default();
query_params.query_text(query_text);
let max_retry_count = 5;
let wait_time = 10;
let paper = ss.query_a_paper_by_title(query_params, max_retry_count, wait_time).await.unwrap();
assert_eq!(
paper.title.clone().unwrap().to_lowercase(),
"attention is all you need".to_string()
);
§Tutorials
- Step 1 - Hello
ss-tools
- Step 2 - Paper & Author structs
- Step 3 - Build QueryParam
- Step 4 - Available Endpoints