crossref-rs
crossref-rs copied to clipboard
Cannot request works
Hey, I tried using the API. This minimal example:
use crossref::*;
fn main() -> Result<()> {
let client = Crossref::builder().build()?;
let works =
client.works(WorksQuery::new("Itech").field_query(FieldQuery::author("Felix Knorr")))?;
Ok(())
}
Will produce
felix@ryzen-tr:~/tmp/crossrefexample$ cargo run
Compiling crossrefexample v0.1.0 (/home/felix/tmp/crossrefexample)
warning: unused variable: `works`
--> src/main.rs:5:9
|
5 | let works =
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_works`
|
= note: `#[warn(unused_variables)]` on by default
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 2.20s
Running `target/debug/crossrefexample`
Error: Error { ctx:
expected response item of type work-list but got validation-failure }
This will also happen if I add an email address via the builder