GpApiRequest: GpApiRequest

Description Usage Arguments Details

View source: R/GpApiRequest.R

Description

Perform an Google Prediction API request and return the results

Usage

1
2
3
  GpApiRequest(req_type, oauth, project, body_list = NULL,
    model_id = NULL, method = NULL,
    model_type = "trainedmodels")

Arguments

req_type

Character string specifying the type of http request to perform: "GET", "POST", "PUT", or "DELETE".

oauth

The httr OAuth2.0 token reference class object to use for authentication.

project

Character string. The name of the Google APIs project that the oauth token belong to.

body_list

optional An R list object containing the name value pairs for the body of the request, where applicable. This list is coverted into JSON by the GpApiRequest function.

model_id

optional Character string. The ID of the Google Prediction Model, where applicable to the request.

method

optional Character string. The Google Predication API method to perform, where not implied by req_type.

model_type

optional Character string. The type of model to use, only applies to request to perform a prediction. Possible values include

Details

Construct and perform an HTTP request to the Google Prediction API. Transform the JSON output into an R list.


jdeboer/gprediction documentation built on May 17, 2017, 8:14 p.m.