R/get_product_search_resource.R

Defines functions gcv_get_product_sets gcv_get_product_set

gcv_get_product_sets <- function(projectId, locationId) {
    response <- call_vision_api(
        body = NULL,
        apiEndpoint = glue::glue(
            "projects/{projectId}/locations/{locationId}/productSets"
        ),
        httpRequestType = "GET"
    )

    data.table(response[["content"]][["productSets"]][1:3])
}

gcv_get_product_set <- function(projectId,
                                locationId,
                                productSetId) {
    response <- call_vision_api(
        body = NULL,
        apiEndpoint = glue::glue(
            "projects/{projectId}/locations/{locationId}/productSets/{productSetId}"
        ),
        httpRequestType = "GET"
    )

    as.data.table(response[["content"]])
}
cloudyr/googleCloudVisionR documentation built on April 2, 2020, 10:56 p.m.