Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getFundersByName new method support #110

Closed
eblondel opened this issue Jan 10, 2023 · 9 comments
Closed

getFundersByName new method support #110

eblondel opened this issue Jan 10, 2023 · 9 comments
Assignees
Milestone

Comments

@eblondel
Copy link
Owner

Relates to #107

@eblondel eblondel added this to the 0.8 milestone Jan 10, 2023
@eblondel eblondel self-assigned this Jan 10, 2023
@eblondel eblondel changed the title getFunderByName new method support getFundersByName new method support Jan 10, 2023
@rkrug
Copy link

rkrug commented Jan 10, 2023

There is something strange happening. I would expect that the first results in less results than the second, as it filters for "Foundation" as well?

x <- zm$getFundersByName("Foundation")
grep("Sw", x$name) |> length()
[1] 16
zm$getFundersByName("Sw") |> nrow()
[1] 1

@eblondel
Copy link
Owner Author

Are you looking at Zenodo sandbox, or the official production Zenodo ?

@rkrug
Copy link

rkrug commented Jan 10, 2023

Official.

@rkrug
Copy link

rkrug commented Jan 10, 2023

zm <- ZenodoManager$new(
  url = "https://zenodo.org/api",
  token = "XXXX",
  logger = NULL,
  keyring_backend = "env"
)

@eblondel
Copy link
Owner Author

See https://help.zenodo.org/guides/search/ for query syntax. The getFundersByName species a quoted value in the query. For extended use, you can use the q argument of getFunders method.

@rkrug
Copy link

rkrug commented Jan 10, 2023

OK - thanks. That helps. But when running with two search terms (first example on the site you link), I get:

> zm$getFunders(q = "swiss fund")
Error in curl::curl_fetch_memory(url, handle = handle) : 
  URL using bad/illegal format or missing URL

@eblondel
Copy link
Owner Author

I was missing URL encoding for q. Please reinstall.
Btw, you will need to specify a property for searching, eg.

zm$getFunders(q = "name:swiss fund")

@rkrug
Copy link

rkrug commented Jan 10, 2023

Thanks - But I found the one I was looking for by using:

zm$getGrants(q = "310030_188431")

i.e. by searching for the grant number.

Thanks a .ot for your brilliant support!

@eblondel
Copy link
Owner Author

You're welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants