LookerSDK | R Documentation |
Top-level container for current user session and API settings.
Uses API settings contained in a config file, "looker.ini"
by default.
All of the endpoints that should be called by end-users are methods of this object.
Instantiate a new instance of this class with the $new
method shown below.
sdk <- LookerSDK$new(configFile = "looker.ini", login = TRUE, settings, userSession) sdk$login() sdk$isAuthenticated() sdk$logout()
Path to configuration file containing API settings and credentials.
If TRUE
, get an access token upon object creation.
Optional, directly supply an ApiSettings
object.
Optional, directly supply a UserSession
object.
Optional, directly supply a UserSession
object.
login()
Acquire an access token and authenticate the client.
logout()
Revoke current access token.
isAuthenticated()
Returns TRUE
when an unexpired token is being used.
activeToken()
Returns a list representing the current active token.
refresh()
If current active token is missing or expired, acquires a new token.
me()
Returns information about the current authenticated user.
runLook(lookId)
Returns the query result for the Look specified in lookId
.
allDashboards()
Returns a list of all dashboards in the instance.
runInlineQuery(model, view, fields, filters, sorts, limit, queryTimezone)
Provided with mandatory query parameters (model, view, fields
) plus optional parameters (filters, sorts, limit, queryTimezone
), returns the results of the defined query.
allProjects()
Returns a list of all projects in the instance.
allModels()
Return a list of all models in the instance.
## Not run:
# You can specify the configFile path directly
sdk <- lookr::LookerSDK$new(configFile = "path/to/file")
# Or use the looker.ini file in your working directory
sdk <- lookr::LookerSDK$new()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.