Search in sources :

Example 1 with Fusiontables

use of com.google.api.services.fusiontables.Fusiontables in project OpenRefine by OpenRefine.

the class FusionTableHandler method getFusionTablesService.

public static Fusiontables getFusionTablesService(String token) {
    Credential credential = new GoogleCredential().setAccessToken(token);
    Fusiontables fusiontables = new Fusiontables.Builder(GDataExtension.HTTP_TRANSPORT, GDataExtension.JSON_FACTORY, credential).setApplicationName(GDataExtension.SERVICE_APP_NAME).build();
    ;
    return fusiontables;
}
Also used : GoogleCredential(com.google.api.client.googleapis.auth.oauth2.GoogleCredential) Credential(com.google.api.client.auth.oauth2.Credential) Fusiontables(com.google.api.services.fusiontables.Fusiontables) GoogleCredential(com.google.api.client.googleapis.auth.oauth2.GoogleCredential)

Example 2 with Fusiontables

use of com.google.api.services.fusiontables.Fusiontables in project OpenRefine by OpenRefine.

the class FusionTableImporter method parse.

public static void parse(String token, Project project, ProjectMetadata metadata, final ImportingJob job, int limit, JSONObject options, List<Exception> exceptions) {
    Fusiontables service = FusionTableHandler.getFusionTablesService(token);
    parse(service, project, metadata, job, limit, options, exceptions);
}
Also used : Fusiontables(com.google.api.services.fusiontables.Fusiontables)

Aggregations

Fusiontables (com.google.api.services.fusiontables.Fusiontables)2 Credential (com.google.api.client.auth.oauth2.Credential)1 GoogleCredential (com.google.api.client.googleapis.auth.oauth2.GoogleCredential)1