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

autoGoogleAPI not generating all methods for sheet v4 API #125

Closed
alberthkcheng opened this issue Jul 15, 2018 · 1 comment
Closed

autoGoogleAPI not generating all methods for sheet v4 API #125

alberthkcheng opened this issue Jul 15, 2018 · 1 comment

Comments

@alberthkcheng
Copy link
Contributor

It only generated function under "spreadsheets" section but not others, i.e. spreadsheets.values
https://developers.google.com/sheets/api/reference/rest/

The issue is that below function look for "methods" object in root level only but spreadsheets.values are under "resources" object and may be necessary to always enable recursive.

recursive_key_finder <- function(the_list, key = "methods"){
  
  if(key %in% names(the_list)){
    ## success - add to global
    set_global(c(get_global(), the_list[[key]]))
    ## but there could also be some within
  } else {
    ## recursive
    lapply(the_list, recursive_key_finder, key = key)
  }
  
  get_global()
}
@MarkEdmondson1234
Copy link
Owner

Thanks very much for this! I will just test it against some other API libraries and merge if successful.

MarkEdmondson1234 added a commit that referenced this issue Nov 11, 2018
Fix incomplete auto api generation [#125]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants