1
I need to get the revision history of Google Drive. I visited the website of Drive Developers and I saw that you can do this with several languages. I want to do Java and use Netbeans and the history I want is Google Docs. The code is already ready to get the history but you need to have the library. I downloaded the library at this link.
And then add in Netbeans (I’ve already added the library and the jar
files). I did as they say to do but nothing worked. How to do this? The code that gives error for not having the library are these 3 lines:
import com.google.api.services.drive.Drive;
import com.google.api.services.drive.model.Revision;
import com.google.api.services.drive.model.RevisionList;
The error is as follows:
package [name] doesnt exist
What I need to do?
Obs: The rest of the schedule is as follows(taken directly from the google Developers website, in item review > list):
package javaapplication8;
import com.google.api.services.drive.Drive;
import com.google.api.services.drive.model.Revision;
import com.google.api.services.drive.model.RevisionList;
import java.io.IOException;
import java.util.List;
public class MyClass {
private static List<Revision> retrieveRevisions(Drive service,
String fileId) {
fileId = "1XpNdeTFBr2KygyfPtlowBvkpcaJJzjgLckrGjp5oOhg0";
try {
RevisionList revisions = service.revisions().list(fileId).execute();
return revisions.getItems();
} catch (IOException e) {
System.out.println("An error occurred: " + e);
}
return null;
}
}