Package com.amilesend.onedrive
Class OneDrive
java.lang.Object
com.amilesend.onedrive.OneDrive
- Direct Known Subclasses:
BusinessOneDrive
The primary exposed object to consumers to access drives available to the authenticated user.
While this object can be instantiated directly by consumers, it is recommended to leverage the
OneDriveFactoryStateManager
instead. Doing so simplifies OAUTH authentication and persists the
authentication tokens for reuse. Without it, consumers are responsible for initiating the OAUTH handshake
to obtain the authorization code and managing persisted refresh tokens for future instantiation without
requiring the user to re-authorize the consumer application with their OneDrive account.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the authentication information associated with the current user connection.Gets the list of drives available to the authenticated user.Gets theDrive
for the givendriveId
.Gets the authenticated user's display name associated with their default drive.Gets the user's default drive that is associated with their account.
-
Constructor Details
-
OneDrive
-
-
Method Details
-
getUserDrive
Gets the user's default drive that is associated with their account.- Returns:
- the user's drive
- See Also:
-
getAvailableDrives
Gets the list of drives available to the authenticated user.- Returns:
- the list of available drives
- See Also:
-
getDrive
Gets theDrive
for the givendriveId
.- Parameters:
driveId
- the drive identifier- Returns:
- the drive
- See Also:
-
getUserDisplayName
Gets the authenticated user's display name associated with their default drive.- Returns:
- the user's display name
-
getAuthInfo
Gets the authentication information associated with the current user connection. Since this includes the access and refresh tokens, this should be treated as the customer's credentials. This can be persisted if consumers are managing their own token state for instantiation.- Returns:
- the authentication information
-