LookerSDK: LookerSDK

LookerSDKR Documentation

LookerSDK

Description

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.

Usage

sdk <- LookerSDK$new(configFile = "looker.ini", login = TRUE,
                     settings, userSession)

sdk$login()
sdk$isAuthenticated()
sdk$logout()

Arguments

configFile

Path to configuration file containing API settings and credentials.

login

If TRUE, get an access token upon object creation.

settings

Optional, directly supply an ApiSettings object.

userSession

Optional, directly supply a UserSession object.

userSession

Optional, directly supply a UserSession object.

Authentication Methods

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.

Look Endpoints

runLook(lookId)

Returns the query result for the Look specified in lookId.

Dashboard Endpoints

allDashboards()

Returns a list of all dashboards in the instance.

Query Endpoints

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.

LookML Project Endpoints

allProjects()

Returns a list of all projects in the instance.

LookML Model Endpoints

allModels()

Return a list of all models in the instance.

Examples

## 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)

looker/lookr documentation built on Jan. 15, 2024, 2:49 a.m.