[BAEL-16003] renamed artifactId. Removed specified articles from libraries module. Added smooks + google sheets resources into libraries-data-2. Tidied up libraries pom, removing unused dependencies.

This commit is contained in:
Sjmillington
2019-08-05 16:50:34 +01:00
parent 0f06cd46ca
commit 4dbeacad35
100 changed files with 2 additions and 2534 deletions

View File

@@ -0,0 +1,20 @@
package com.baeldung.google.sheets;
import java.io.IOException;
import java.security.GeneralSecurityException;
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.services.sheets.v4.Sheets;
public class SheetsServiceUtil {
private static final String APPLICATION_NAME = "Google Sheets Example";
public static Sheets getSheetsService() throws IOException, GeneralSecurityException {
Credential credential = GoogleAuthorizeUtil.authorize();
return new Sheets.Builder(GoogleNetHttpTransport.newTrustedTransport(), JacksonFactory.getDefaultInstance(), credential).setApplicationName(APPLICATION_NAME).build();
}
}