Class PhotosLibraryClientFactory
- java.lang.Object
-
- com.google.photos.library.sample.factories.PhotosLibraryClientFactory
-
public class PhotosLibraryClientFactory extends java.lang.Object
A factory class that helps initialize aPhotosLibraryClient
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 newPhotosLibraryClient
instance with credentials and scopes.
-
-
-
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 newPhotosLibraryClient
instance with credentials and scopes.- Parameters:
credentialsPath
- the key fileselectedScopes
- the scopecredentialsDataStoreDirectory
- the credentials data storage directory- Returns:
- the
PhotosLibraryClient
instance - Throws:
java.io.IOException
- cannot open or read the key filejava.security.GeneralSecurityException
- cannot get the credentials
-
-