Comments (3)
Yes this is a bug I haven't documented yet.
I fix this by using a helper function that removes all NULL
from a list, and pass that instead.
Here is my fix I used in a project recently.
I have two helper functions to help with NULLs:
#' A helper function that tests whether an object is either NULL _or_
#' a list of NULLs
#'
#' @keywords internal
is.NullOb <- function(x) is.null(x) | all(sapply(x, is.null))
#' Recursively step down into list, removing all such objects
#'
#' @keywords internal
rmNullObs <- function(x) {
x <- Filter(Negate(is.NullOb), x)
lapply(x, function(x) if (is.list(x)) rmNullObs(x) else x)
}
Then I use that like in this function for googleComputeEngineR
:
url <- sprintf("https://www.googleapis.com/compute/v1/projects/%s/aggregated/machineTypes",
project)
pars <- list(filter = filter,
maxResults = maxResults,
pageToken = pageToken)
## remove NULL obs as it breaks the API call
pars <- rmNullObs(pars)
# compute.machineTypes.aggregatedList
f <- gar_api_generator(url,
"GET",
pars_args = pars,
data_parse_function = function(x) x)
f()
I will add this fix to googleAuthR
and regenerate these libraries soon. Also be aware of another bug I found, the order of the parameters passed into the API can be in the wrong order. ( #2 )
from autogoogleapi.
Thanks for the fixes and heads-up on the other bug.
from autogoogleapi.
This is fixed from googleAuthR 0.5
from autogoogleapi.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autogoogleapi.