Class GoogleAPIExtension


  • public abstract class GoogleAPIExtension
    extends Object
    • Field Detail

      • HTTP_TRANSPORT

        protected static final com.google.api.client.http.HttpTransport HTTP_TRANSPORT
        Global instance of the HTTP transport.
      • JSON_FACTORY

        protected static final com.google.api.client.json.JsonFactory JSON_FACTORY
        Global instance of the JSON factory.
    • Constructor Detail

      • GoogleAPIExtension

        public GoogleAPIExtension()
    • Method Detail

      • getTokenFromCode

        public static String getTokenFromCode​(edu.mit.simile.butterfly.ButterflyModule module,
                                              javax.servlet.http.HttpServletRequest request)
                                       throws IOException
        Throws:
        IOException
      • getDriveService

        public static com.google.api.services.drive.Drive getDriveService​(String token)
      • getSheetsService

        public static com.google.api.services.sheets.v4.Sheets getSheetsService​(String token)
                                                                         throws IOException
        Build and return an authorized Sheets API client service.
        Returns:
        an authorized Sheets API client service
        Throws:
        IOException