Class PhotosLibraryClientFactory


  • public class PhotosLibraryClientFactory
    extends java.lang.Object
    A factory class that helps initialize a PhotosLibraryClient instance. Modified to allow explicitly set credentials data-store directory and fixed JavaDoc.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.google.photos.library.v1.PhotosLibraryClient createClient​(java.lang.String credentialsPath, java.util.List<java.lang.String> selectedScopes, java.io.File credentialsDataStoreDirectory)
      Creates a new PhotosLibraryClient instance with credentials and scopes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createClient

        public static com.google.photos.library.v1.PhotosLibraryClient createClient​(java.lang.String credentialsPath,
                                                                                    java.util.List<java.lang.String> selectedScopes,
                                                                                    java.io.File credentialsDataStoreDirectory)
                                                                             throws java.io.IOException,
                                                                                    java.security.GeneralSecurityException
        Creates a new PhotosLibraryClient instance with credentials and scopes.
        Parameters:
        credentialsPath - the key file
        selectedScopes - the scope
        credentialsDataStoreDirectory - the credentials data storage directory
        Returns:
        the PhotosLibraryClient instance
        Throws:
        java.io.IOException - cannot open or read the key file
        java.security.GeneralSecurityException - cannot get the credentials