Skip to content

Cannot request works #7

@KnorrFG

Description

@KnorrFG

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions